public class ExternalNameSpace extends NameSpace
NameSource.Listener
importedClasses, JAVACODE
Constructor and Description |
---|
ExternalNameSpace() |
ExternalNameSpace(NameSpace parent,
java.lang.String name,
java.util.Map 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) |
java.util.Map |
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 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, identifierToClass, importClass, importCommands, importObject, importPackage, importStatic, invokeMethod, invokeMethod, loadDefaultImports, nameSpaceChanged, prune, setMethod, setName, setParent, setTypedVariable, setTypedVariable, setVariable, setVariableOrProperty, toString, unwrapVariable
public ExternalNameSpace()
public ExternalNameSpace(NameSpace parent, java.lang.String name, java.util.Map externalMap)
public java.util.Map getMap()
public void setMap(java.util.Map map)
public void unsetVariable(java.lang.String name)
NameSpace
unsetVariable
in class NameSpace
public java.lang.String[] getVariableNames()
NameSpace
getVariableNames
in class NameSpace
protected Variable getVariableImpl(java.lang.String name, boolean recurse) throws UtilEvalError
NameSpace
getVariableImpl
in class NameSpace
UtilEvalError
public Variable createVariable(java.lang.String name, java.lang.Class type, java.lang.Object value, Modifiers mods)
createVariable
in class NameSpace
public void clear()
clear
in class NameSpace
NameSpace.loadDefaultImports()
© 2000-2005 pat@pat.net :-)