public Variable declareVariable ( Variable var , boolean isPrivate ) { if ( mVariables . containsKey ( var ) ) { var = mVariables . get ( var ) ; } else { mVariables . put ( var , var ) ; } mDeclared . put ( var . getName ( ) , var ) ; if ( isPrivate ) { if ( mPrivateVars == null ) { mPrivateVars = new HashSet < Variable > ( 7 ) ; } mPrivateVars . add ( var ) ; } else { if ( mPrivateVars != null ) { mPrivateVars . remove ( var ) ; } } return var ; }
Declare a variable for use in this scope . If no variable of this name and type has been defined it is added to the shared set of pooled variables . Returns the actual Variable object that should be used instead .