public class ExternalNameSpace extends NameSpace
NameSource.ListenerimportedClasses, JAVACODE| Constructor and Description |
|---|
ExternalNameSpace() |
ExternalNameSpace(NameSpace parent,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> externalMap) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all variables, methods, and imports from this namespace and clear
all values from the external map (via Map clear()).
|
Variable |
createVariable(java.lang.String name,
java.lang.Class type,
java.lang.Object value,
Modifiers mods)
Creates the variable.
|
java.util.Map<java.lang.String,java.lang.Object> |
getMap()
Get the map view of this namespace.
|
protected Variable |
getVariableImpl(java.lang.String name,
boolean recurse)
Locate a variable and return the Variable object with optional recursion
through parent name spaces.
|
java.lang.String[] |
getVariableNames()
Get the names of variables defined in this namespace.
|
void |
setMap(java.util.Map<java.lang.String,java.lang.Object> map)
Set the external Map which to which this namespace synchronizes.
|
void |
unsetVariable(java.lang.String name)
Remove the variable from the namespace.
|
addNameSourceListener, classLoaderChanged, createVariable, createVariable, doSuperImport, get, getAllNames, getAllNamesAux, getClass, getClassManager, getCommand, getDeclaredVariables, getGlobal, getImportedMethod, getImportedVar, getInvocationLine, getInvocationText, getMethod, getMethod, getMethodNames, getMethods, getName, getParent, getSuper, getThis, getVariable, getVariable, getVariableOrProperty, getVariables, identifierToClass, importClass, importCommands, importObject, importPackage, importStatic, invokeCommand, invokeCommand, invokeDefaultInvokeMethod, invokeMethod, invokeMethod, isChildOf, loadDefaultImports, nameSpaceChanged, prune, setLocalVariable, setMethod, setName, setParent, setTypedVariable, setTypedVariable, setVariable, setVariableImpl, setVariableOrProperty, toString, unwrapVariablepublic ExternalNameSpace()
public ExternalNameSpace(NameSpace parent, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> externalMap)
public java.util.Map<java.lang.String,java.lang.Object> getMap()
public void setMap(java.util.Map<java.lang.String,java.lang.Object> map)
public void unsetVariable(java.lang.String name)
NameSpaceunsetVariable in class NameSpacename - the namepublic java.lang.String[] getVariableNames()
NameSpacegetVariableNames in class NameSpaceprotected Variable getVariableImpl(java.lang.String name, boolean recurse) throws UtilEvalError
NameSpacegetVariableImpl in class NameSpacename - the namerecurse - the recurseUtilEvalError - the util eval errorpublic Variable createVariable(java.lang.String name, java.lang.Class type, java.lang.Object value, Modifiers mods)
NameSpacecreateVariable in class NameSpacename - the nametype - the typevalue - the valuemods - the modspublic void clear()
clear in class NameSpaceNameSpace.loadDefaultImports()