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 .
@SuppressWarnings("ReferenceEquality")
  public final boolean matchesQualifiedName(Node n) {
    if (n == null || n.token != token) {
      return false;
    }
    switch (token) {
      case NAME:
        return !getString().isEmpty() && getString() == n.getString();
      case THIS:
      case SUPER:
        return true;
      case GETPROP:
        return getLastChild().getString() == n.getLastChild().getString()
            && getFirstChild().matchesQualifiedName(n.getFirstChild());
      default:
        return false;
    }
  }
@ SuppressWarnings ( "ReferenceEquality" ) public final boolean matchesQualifiedName ( Node n ) { if ( n == null || n . token != token ) { return false ; } switch ( token ) { case NAME : return ! getString ( ) . isEmpty ( ) && getString ( ) == n . getString ( ) ; case THIS : case SUPER : return true ; case GETPROP : return getLastChild ( ) . getString ( ) == n . getLastChild ( ) . getString ( ) && getFirstChild ( ) . matchesQualifiedName ( n . getFirstChild ( ) ) ; 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 > .
// ==, rather than equal as it is intern'd in setString // ==, rather than equal as it is intern'd in setString