code: public boolean matches( VarNamePattern varName)
      {
      boolean matched =
        // Variable name defined?
        varName != null
  
        // Variable name and this pattern both (non-)empty?
        && (varName.varNamePath_ == null) == (varNamePath_ == null)
  
        // Variable name identifies single variable of depth no less than this pattern?
        && !varName.wildcard_
        && varName.minDepth_ >= minDepth_;
  
      if( matched && varNamePath_ != null)
        {
        // Variable name matches this pattern up to wildcard?
        int i;
        for( i = 0;
  
             i < minDepth_
               && (matched = varName.varNamePath_[i].equals( varNamePath_[i]));
  
             i++);
  
        if( matched)
          {
          int membersLeft = varName.minDepth_ - minDepth_;
  
          String wildcardType =
            !wildcard_
            ? null
            : varNamePath_[i];
            
          matched =
            // No wildcard to match?
            wildcardType == null
            ? (membersLeft == 0)
  
            // This variable is a matching child?
            : ((membersLeft == 1 && wildcardType.equals( ALL_CHILDREN))
               ||
               // This variable is a matching descendant?
               wildcardType.equals( ALL_DESCENDANTS));
          }
        }
        
      return matched;
      }
docs: Returns true if the given variable name matches this pattern.