| java.lang.Object bsh.NameSpace bsh.ExternalNameSpace
ExternalNameSpace | public class ExternalNameSpace extends NameSpace (Code) | | A namespace which maintains an external map of values held in variables in
its scope. This mechanism provides a standard collections based interface
to the namespace as well as a convenient way to export and view values of
the namespace without the ordinary BeanShell wrappers.
Variables are maintained internally in the normal fashion to support
meta-information (such as variable type and visibility modifiers), but
exported and imported in a synchronized way. Variables are exported each
time they are written by BeanShell. Imported variables from the map appear
in the BeanShell namespace as untyped variables with no modifiers and
shadow any previously defined variables in the scope.
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.
|
ExternalNameSpace | public ExternalNameSpace()(Code) | | |
clear | public void clear()(Code) | | Clear all variables, methods, and imports from this namespace and clear
all values from the external map (via Map clear()).
|
getMap | public Map getMap()(Code) | | Get the map view of this namespace.
|
setMap | public void setMap(Map map)(Code) | | 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.
|
Methods inherited from bsh.NameSpace | public void addNameSourceListener(NameSource.Listener listener)(Code)(Java Doc) boolean attemptSetPropertyValue(String propName, Object value, Interpreter interp) throws UtilEvalError(Code)(Java Doc) void cacheClass(String name, Class c)(Code)(Java Doc) public void classLoaderChanged()(Code)(Java Doc) public void clear()(Code)(Java Doc) protected Variable createVariable(String name, Object value, Modifiers mods) throws UtilEvalError(Code)(Java Doc) protected Variable createVariable(String name, Class type, Object value, Modifiers mods) throws UtilEvalError(Code)(Java Doc) protected Variable createVariable(String name, Class type, LHS lhs) throws UtilEvalError(Code)(Java Doc) public void doSuperImport() throws UtilEvalError(Code)(Java Doc) public Object get(String name, Interpreter interpreter) throws UtilEvalError(Code)(Java Doc) public String[] getAllNames()(Code)(Java Doc) protected void getAllNamesAux(Vector vec)(Code)(Java Doc) public Class getClass(String name) throws UtilEvalError(Code)(Java Doc) Object getClassInstance() throws UtilEvalError(Code)(Java Doc) public BshClassManager getClassManager()(Code)(Java Doc) public Object getCommand(String name, Class[] argTypes, Interpreter interpreter) throws UtilEvalError(Code)(Java Doc) public Variable[] getDeclaredVariables()(Code)(Java Doc) public This getGlobal(Interpreter declaringInterpreter)(Code)(Java Doc) protected BshMethod getImportedMethod(String name, Class[] sig) throws UtilEvalError(Code)(Java Doc) protected Variable getImportedVar(String name) throws UtilEvalError(Code)(Java Doc) public int getInvocationLine()(Code)(Java Doc) public String getInvocationText()(Code)(Java Doc) public BshMethod getMethod(String name, Class[] sig) throws UtilEvalError(Code)(Java Doc) public BshMethod getMethod(String name, Class[] sig, boolean declaredOnly) throws UtilEvalError(Code)(Java Doc) public String[] getMethodNames()(Code)(Java Doc) public BshMethod[] getMethods()(Code)(Java Doc) public String getName()(Code)(Java Doc) Name getNameResolver(String ambigname)(Code)(Java Doc) SimpleNode getNode()(Code)(Java Doc) String getPackage()(Code)(Java Doc) public NameSpace getParent()(Code)(Java Doc) Object getPropertyValue(String propName, Interpreter interp) throws UtilEvalError(Code)(Java Doc) public This getSuper(Interpreter declaringInterpreter)(Code)(Java Doc) public This getThis(Interpreter declaringInterpreter)(Code)(Java Doc) public Object getVariable(String name) throws UtilEvalError(Code)(Java Doc) public Object getVariable(String name, boolean recurse) throws UtilEvalError(Code)(Java Doc) protected Variable getVariableImpl(String name, boolean recurse) throws UtilEvalError(Code)(Java Doc) public String[] getVariableNames()(Code)(Java Doc) public Object getVariableOrProperty(String name, Interpreter interp) throws UtilEvalError(Code)(Java Doc) public static Class identifierToClass(ClassIdentifier ci)(Code)(Java Doc) public void importClass(String name)(Code)(Java Doc) public void importCommands(String name)(Code)(Java Doc) public void importObject(Object obj)(Code)(Java Doc) public void importPackage(String name)(Code)(Java Doc) public void importStatic(Class clas)(Code)(Java Doc) public Object invokeMethod(String methodName, Object[] args, Interpreter interpreter) throws EvalError(Code)(Java Doc) public Object invokeMethod(String methodName, Object[] args, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo) throws EvalError(Code)(Java Doc) public void loadDefaultImports()(Code)(Java Doc) public void nameSpaceChanged()(Code)(Java Doc) public void prune()(Code)(Java Doc) void setClassInstance(Object instance)(Code)(Java Doc) void setClassManager(BshClassManager classManager)(Code)(Java Doc) void setClassStatic(Class clas)(Code)(Java Doc) void setLocalVariable(String name, Object value, boolean strictJava) throws UtilEvalError(Code)(Java Doc) void setLocalVariableOrProperty(String name, Object value, boolean strictJava) throws UtilEvalError(Code)(Java Doc) public void setMethod(String name, BshMethod method) throws UtilEvalError(Code)(Java Doc) public void setName(String name)(Code)(Java Doc) void setNode(SimpleNode node)(Code)(Java Doc) void setPackage(String packageName)(Code)(Java Doc) public void setParent(NameSpace parent)(Code)(Java Doc) public void setTypedVariable(String name, Class type, Object value, boolean isFinal) throws UtilEvalError(Code)(Java Doc) public void setTypedVariable(String name, Class type, Object value, Modifiers modifiers) throws UtilEvalError(Code)(Java Doc) public void setVariable(String name, Object value, boolean strictJava) throws UtilEvalError(Code)(Java Doc) void setVariable(String name, Object value, boolean strictJava, boolean recurse) throws UtilEvalError(Code)(Java Doc) public void setVariableOrProperty(String name, Object value, boolean strictJava) throws UtilEvalError(Code)(Java Doc) void setVariableOrProperty(String name, Object value, boolean strictJava, boolean recurse) throws UtilEvalError(Code)(Java Doc) public String toString()(Code)(Java Doc) public void unsetVariable(String name)(Code)(Java Doc) protected Object unwrapVariable(Variable var) throws UtilEvalError(Code)(Java Doc)
|
|
|