| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private NameSpace | |
| public This | getSuper(Interpreter declaringInterpreter)
Overrides bsh. |
| public This | getThis(Interpreter declaringInterpreter)
Overrides bsh. |
| public void | |
| public void | |
| public void | |
| public void | setMethod(String name, BshMethod method)
Overrides bsh. Note this is primarily for internal use. |
| public void | setVariable(String name, Object value, boolean
specifies whether strict java rules are applied. strictJava, boolean determines whether we will search for the variable in
our parent's scope before assigning locally. recurse)Overrides bsh. |
| private boolean |
| BlockNameSpace | back to summary |
|---|---|
| public BlockNameSpace(NameSpace parent) throws EvalError | |
| getNonBlockParent | back to summary |
|---|---|
| private NameSpace getNonBlockParent() do we need this? | |
| getSuper | back to summary |
|---|---|
| public This getSuper(Interpreter declaringInterpreter) Overrides bsh. super is our parent's super | |
| getThis | back to summary |
|---|---|
| public This getThis(Interpreter declaringInterpreter) Overrides bsh. Get a 'this' reference is our parent's 'this' for the object closure. e.g. Normally a 'this' reference to a BlockNameSpace (e.g. if () { } ) resolves to the parent namespace (e.g. the namespace containing the "if" statement).
| |
| importClass | back to summary |
|---|---|
| public void importClass(String name) Overrides bsh. delegate import to our parent | |
| importPackage | back to summary |
|---|---|
| public void importPackage(String name) Overrides bsh. delegate import to our parent | |
| setBlockVariable | back to summary |
|---|---|
| public void setBlockVariable(String name, Object value) throws UtilEvalError Set an untyped variable in the block namespace. The BlockNameSpace would normally delegate this set to the parent. Typed variables are naturally set locally. This is used in try/catch block argument. | |
| setMethod | back to summary |
|---|---|
| public void setMethod(String name, BshMethod method) throws UtilEvalError Overrides bsh. Doc from bsh. Note this is primarily for internal use. | |
| setVariable | back to summary |
|---|---|
| public void setVariable(String name, Object value, boolean strictJava, boolean recurse) throws UtilEvalError Overrides bsh. Override the standard namespace behavior to make assignments happen in our parent (enclosing) namespace, unless the variable has already been assigned here via a typed declaration or through the special setBlockVariable() (used for untyped args in try/catch). i.e. only allow typed var declaration to happen in this namespace. Typed vars are handled in the ordinary way local scope. All untyped assignments are delegated to the enclosing context.
| |
| weHaveVar | back to summary |
|---|---|
| private boolean weHaveVar(String name) We have the variable: either it was declared here with a type, giving it block local scope or an untyped var was explicitly set here via setBlockVariable(). | |