private static SubclassType typeofClassDefiningName ( Node callName ) { // Check if the method name matches one of the class-defining methods. String methodName = null ; if ( callName . isGetProp ( ) ) { methodName = callName . getLastChild ( ) . getString ( ) ; } else if ( callName . isName ( ) ) { String name = callName . getString ( ) ; int dollarIndex = name . lastIndexOf ( ' ' ) ; if ( dollarIndex != - 1 ) { methodName = name . substring ( dollarIndex + 1 ) ; } } if ( methodName != null ) { if ( methodName . equals ( "inherits" ) ) { return SubclassType . INHERITS ; } else if ( methodName . equals ( "mixin" ) ) { return SubclassType . MIXIN ; } } return null ; }
Determines whether the given node is a class - defining name like inherits or mixin .