Note
this class is inherentely dependent on Java 1.2 (for Map), however it is not used directly by the core as other than type NameSpace, so no dependency is introduced.
| Modifier and Type | Field and Description |
|---|---|
| private Map |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Overrides bsh. |
| public Variable | createVariable(String name, Class<T> type, Object value, Modifiers mods)
Overrides bsh. |
| public Map | |
| protected Variable | getVariableImpl(String name, boolean recurse)
Overrides bsh. |
| public String[] | getVariableNames()
Overrides bsh. |
| public void | |
| public void | unsetVariable(String name)
Overrides bsh. |
| externalMap | back to summary |
|---|---|
| private Map<K, V> externalMap | |
| ExternalNameSpace | back to summary |
|---|---|
| public ExternalNameSpace() | |
| ExternalNameSpace | back to summary |
|---|---|
| public ExternalNameSpace(NameSpace parent, String name, Map<K, V> externalMap) | |
| clear | back to summary |
|---|---|
| public void clear() Overrides bsh. Clear all variables, methods, and imports from this namespace and clear all values from the external map (via Map clear()). | |
| createVariable | back to summary |
|---|---|
| public Variable createVariable(String name, Class<T> type, Object value, Modifiers mods) Overrides bsh. | |
| getMap | back to summary |
|---|---|
| public Map Get the map view of this namespace. | |
| getVariableImpl | back to summary |
|---|---|
| protected Variable getVariableImpl(String name, boolean recurse) throws UtilEvalError Overrides bsh. Doc from bsh. Locate a variable and return the Variable object with optional recursion through parent name spaces. If this namespace is static, return only static variables.
| |
| getVariableNames | back to summary |
|---|---|
| public String[] getVariableNames() Overrides bsh. Doc from bsh. Get the names of variables defined in this namespace. (This does not show variables in parent namespaces). | |
| setMap | back to summary |
|---|---|
| public void setMap(Map<K, V> map) Set the external Map which to which this namespace synchronizes. The previous external map is detached from this namespace. Previous map values are retained in the external map, but are removed from the BeanShell namespace. | |
| unsetVariable | back to summary |
|---|---|
| public void unsetVariable(String name) Overrides bsh. Doc from bsh. Remove the variable from the namespace. | |