src/com/google/javascript/rhino/Node.java
/**
   * Returns whether a node matches a simple or a qualified name, such as
   * <code>x</code> or <code>a.b.c</code> or <code>this.a</code>.
   */
Returns whether a node matches a simple or a qualified name, such as
x or a.b.c or this.a.
Returns whether a node matches a simple or a qualified name such as x or a . b . c or this . a .
private boolean matchesQualifiedName(String qname, int endIndex) {
    int start = qname.lastIndexOf('.', endIndex - 1) + 1;
    switch (this.getToken()) {
      case NAME:
      case MEMBER_FUNCTION_DEF:
        String name = getString();
        return start == 0 && !name.isEmpty() && name.length() == endIndex && qname.startsWith(name);
      case THIS:
        return start == 0 && 4 == endIndex && qname.startsWith("this");
      case SUPER:
        return start == 0 && 5 == endIndex && qname.startsWith("super");
      case GETPROP:
        String prop = getLastChild().getString();
        return start > 1
            && prop.length() == endIndex - start
            && prop.regionMatches(0, qname, start, endIndex - start)
            && getFirstChild().matchesQualifiedName(qname, start - 1);
      default:
        return false;
    }
  }
private boolean matchesQualifiedName ( String qname , int endIndex ) { int start = qname . lastIndexOf ( '.' , endIndex - 1 ) + 1 ; switch ( this . getToken ( ) ) { case NAME : case MEMBER_FUNCTION_DEF : String name = getString ( ) ; return start == 0 && ! name . isEmpty ( ) && name . length ( ) == endIndex && qname . startsWith ( name ) ; case THIS : return start == 0 && 4 == endIndex && qname . startsWith ( "this" ) ; case SUPER : return start == 0 && 5 == endIndex && qname . startsWith ( "super" ) ; case GETPROP : String prop = getLastChild ( ) . getString ( ) ; return start > 1 && prop . length ( ) == endIndex - start && prop . regionMatches ( 0 , qname , start , endIndex - start ) && getFirstChild ( ) . matchesQualifiedName ( qname , start - 1 ) ; default : return false ; } }
Returns whether a node matches a simple or a qualified name, such as
 <code>x</code> or <code>a.b.c</code> or <code>this.a</code>.
Returns whether a node matches a simple or a qualified name such as <code > x< / code > or <code > a . b . c< / code > or <code > this . a< / code > .