private boolean isDefinedInSources ( NodeTraversal t , String varName ) { Var objectVar = t . getScope ( ) . getVar ( varName ) ; return objectVar != null && ! objectVar . isExtern ( ) ; }
Is a variable with the given name defined in the source code being compiled?