@ Nullable public final String getOriginalQualifiedName ( ) { if ( token == Token . NAME || getBooleanProp ( Prop . IS_MODULE_NAME ) ) { String name = getOriginalName ( ) ; if ( name == null ) { name = getString ( ) ; } return name . isEmpty ( ) ? null : name ; } else if ( token == Token . GETPROP ) { String left = getFirstChild ( ) . getOriginalQualifiedName ( ) ; if ( left == null ) { return null ; } String right = getLastChild ( ) . getOriginalName ( ) ; if ( right == null ) { right = getLastChild ( ) . getString ( ) ; } return left + "." + right ; } else if ( token == Token . THIS ) { return "this" ; } else if ( token == Token . SUPER ) { return "super" ; } else { return null ; } }
This function takes a set of GETPROP nodes and produces a string that is each property separated by dots . If the node ultimately under the left sub - tree is not a simple name this is not a valid qualified name . This method returns the original name of each segment rather than the renamed version .