Top Description Fields Constructors Methods
bsh

public Class NameSpace

extends Object
implements Serializable, Listener, NameSource
Class Inheritance
All Implemented Interfaces
bsh.NameSource, bsh.BshClassManager.Listener, java.io.Serializable
Known Direct Subclasses
bsh.ExternalNameSpace, bsh.BlockNameSpace
Imports
java.util.*, java.io.InputStream, .BufferedReader, .InputStreamReader, .IOException, java.lang.reflect.Method, .Field

A namespace in which methods, variables, and imports (class names) live. This is package public because it is used in the implementation of some bsh commands. However for normal use you should be using methods on bsh.Interpreter to interact with your scripts.

A bsh.This object is a thin layer over a NameSpace that associates it with an Interpreter instance. Together they comprise a Bsh scripted object context.

Note

I'd really like to use collections here, but we have to keep this compatible with JDK1.1

Field Summary

Modifier and TypeField and Description
pack-priv SimpleNode
callerInfoNode

The node associated with the creation of this namespace.

private transient Hashtable<K, V>
classCache

Local class cache for classes resolved through this namespace using getClass() (taking into account imports).

pack-priv Object
private transient BshClassManager
pack-priv Class<T>
protected Hashtable<K, V>
private Vector<E>
private Vector<E>
private Vector<E>
private Vector<E>
pack-priv boolean
isClass

Note that the namespace is a class body or class instance namespace.

pack-priv boolean
isMethod

Note that the namespace is a method body namespace.

public static final NameSpace
private Hashtable<K, V>
private Hashtable<K, V>
names

Name resolver objects

pack-priv Vector<E>
private String
nsName

The name of this namespace.

private String
private NameSpace
private This
private Hashtable<K, V>

Constructor Summary

AccessConstructor and Description
public
NameSpace(NameSpace
the parent namespace of this namespace. Child namespaces inherit all variables and methods of their parent and can (of course) override / shadow them.
parent
,
String name)

public
NameSpace(BshClassManager classManager, String name)

public
NameSpace(NameSpace parent, BshClassManager classManager, String name)

Method Summary

Modifier and TypeMethod and Description
public void
addNameSourceListener(NameSource.Listener listener)

Implements bsh.NameSource.addNameSourceListener.

Implements NameSource Add a listener who is notified upon changes to names in this space.
pack-priv void
cacheClass(String name, Class<T> c)

Helper that caches class.

private Class<T>
public void
classLoaderChanged()

Implements bsh.BshClassManager.Listener.classLoaderChanged.

Clear all cached classes and names
public void
clear()

Clear all variables, methods, and imports from this namespace.

protected Variable
protected Variable
createVariable(String name, Class<T> type, Object value, Modifiers mods)

protected Variable
createVariable(String name, Class<T> type, LHS lhs)

public void
doSuperImport()

Perform "import *;" causing the entire classpath to be mapped.

private String[]
private BshMethod[]
flattenMethodCollection(Enumeration<E> e)

Flatten the vectors of overloaded methods to a single array.

public Object
get(String name, Interpreter interpreter)

Resolve name to an object through this namespace.

public String[]

Returns:

all variable and method names in this and all parent namespaces
getAllNames
()

Implements bsh.NameSource.getAllNames.

Implements NameSource
protected void
getAllNamesAux(Vector<E> vec)

Helper for implementing NameSource

public Class<T>

Returns:

null if not found.
getClass
(String name)

Load a class through this namespace taking into account imports.

private Class<T>

Returns:

null if not found.
getClassImpl
(String name)

Implementation of getClass() Load a class through this namespace taking into account imports.

pack-priv Object
public BshClassManager
public Object

Returns:

a BshMethod, Class, or null if no such command is found.
getCommand
(String
is the name of the desired command method
name
,
Class<T>[]
is the signature of the desired command method.
argTypes
,
Interpreter interpreter)

A command is a scripted method or compiled command class implementing a specified method signature.

public Variable[]
public This
getGlobal(Interpreter declaringInterpreter)

Get the top level namespace or this namespace if we are the top.

private Class<T>
getImportedClassImpl(String name)

Try to make the name into an imported class.

protected BshMethod
getImportedMethod(String name, Class<T>[] sig)

protected Variable
public int
public String
public BshMethod
getMethod(String name, Class<T>[] sig)

public BshMethod

Returns:

the BshMethod or null if not found
getMethod
(String name, Class<T>[] sig, boolean
if true then only methods declared directly in this namespace will be found and no inherited or imported methods will be visible.
declaredOnly
)

Get the bsh method matching the specified signature declared in this name space or a parent.

public String[]
getMethodNames()

Get the names of methods declared in this namespace.

public BshMethod[]
getMethods()

Get the methods defined in this namespace.

public String
getName()

The name of this namespace.

pack-priv Name
getNameResolver(String ambigname)

This is the factory for Name objects which resolve names within this namespace (e.g. toObject(), toClass(), toLHS()).

pack-priv SimpleNode
pack-priv String
public NameSpace
getParent()

Get the parent namespace.

public This
getSuper(Interpreter declaringInterpreter)

Get the parent namespace' This reference or this namespace' This reference if we are the top.

public This
getThis(Interpreter declaringInterpreter)

A This object is a thin layer over a namespace, comprising a bsh object context.

public Object

Returns:

The variable value or Primitive.VOID if it is not defined.
getVariable
(String name)

Get the specified variable in this namespace or a parent namespace.

public Object

Returns:

The variable value or Primitive.VOID if it is not defined.
getVariable
(String name, boolean
If recurse is true then we recursively search through parent namespaces for the variable.

Note

this method is primarily intended for use internally. If you use this method outside of the bsh package you will have to use Primitive.unwrap() to get primitive values.

recurse
)

Get the specified variable in this namespace.

protected Variable

Returns:

the Variable value or null if it is not defined
getVariableImpl
(String name, boolean recurse)

Locate a variable and return the Variable object with optional recursion through parent name spaces.

public String[]
getVariableNames()

Get the names of variables defined in this namespace.

public static Class<T>
identifierToClass(ClassIdentifier ci)

This is a helper method for working inside of bsh scripts and commands.

public void
importClass(String name)

Import a class name.

public void
importCommands(String name)

Import scripted or compiled BeanShell commands in the following package in the classpath.

public void
importObject(Object obj)

Import a compiled Java object's methods and variables into this namespace.

public void
importPackage(String name)

subsequent imports override earlier ones

public void
public Object
invokeMethod(String methodName, Object[] args, Interpreter interpreter)

Invoke a method in this namespace with the specified args and interpreter reference.

public Object
invokeMethod(String methodName, Object[] args, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo)

This method simply delegates to This.invokeMethod();

public void
loadDefaultImports()

Import standard packages.

private BshMethod
loadScriptedCommand(InputStream in, String name, Class<T>[] argTypes, String resourcePath, Interpreter interpreter)

Load a command script from the input stream and find the BshMethod in the target namespace.

public void
nameSpaceChanged()

Clear all cached classes and names

public void
prune()

Used for serialization

pack-priv void
pack-priv void
pack-priv void
pack-priv void
setLocalVariable(String name, Object value, boolean strictJava)

Set a variable explicitly in the local scope.

public void
setMethod(String name, BshMethod method)

Note

this is primarily for internal use.

public void
pack-priv void
setNode(SimpleNode node)

Set the node associated with the creation of this namespace.

pack-priv void
setPackage(String packageName)

Set the package name for classes defined in this namespace.

public void
public void
setTypedVariable(String name, Class<T> type, Object value, boolean isFinal)

Deprecated See #setTypedVariable( String, Class, Object, Modifiers )
public void
setTypedVariable(String name, Class<T> type, Object
If value is null, you'll get the default value for the type
value
,
Modifiers
may be null
modifiers
)

Declare a variable in the local scope and set its initial value.

public void
setVariable(String name, Object value, boolean
specifies whether strict java rules are applied.
strictJava
)

Set the variable through this namespace.

pack-priv 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
)

Set the value of a the variable 'name' through this namespace.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
unsetVariable(String name)

Remove the variable from the namespace.

protected Object

Returns:

return the variable value. A null var is mapped to Primitive.VOID
unwrapVariable
(Variable var)

Unwrap a variable to its value.

private synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

callerInfoNodeback to summary
pack-priv SimpleNode callerInfoNode

The node associated with the creation of this namespace. This is used support getInvocationLine() and getInvocationText().

classCacheback to summary
private transient Hashtable<K, V> classCache

Local class cache for classes resolved through this namespace using getClass() (taking into account imports). Only unqualified class names are cached here (those which might be imported). Qualified names are always absolute and are cached by BshClassManager.

classInstanceback to summary
pack-priv Object classInstance
classManagerback to summary
private transient BshClassManager classManager
classStaticback to summary
pack-priv Class<T> classStatic
importedClassesback to summary
protected Hashtable<K, V> importedClasses
importedCommandsback to summary
private Vector<E> importedCommands
importedObjectsback to summary
private Vector<E> importedObjects
importedPackagesback to summary
private Vector<E> importedPackages
importedStaticback to summary
private Vector<E> importedStatic
isClassback to summary
pack-priv boolean isClass

Note that the namespace is a class body or class instance namespace. This is used for controlling static/object import precedence, etc.

isMethodback to summary
pack-priv boolean isMethod

Note that the namespace is a method body namespace. This is used for printing stack traces in exceptions.

JAVACODEback to summary
public static final NameSpace JAVACODE
methodsback to summary
private Hashtable<K, V> methods
namesback to summary
private Hashtable<K, V> names

Name resolver objects

nameSourceListenersback to summary
pack-priv Vector<E> nameSourceListeners
nsNameback to summary
private String nsName

The name of this namespace. If the namespace is a method body namespace then this is the name of the method. If it's a class or class instance then it's the name of the class.

packageNameback to summary
private String packageName
parentback to summary
private NameSpace parent
thisReferenceback to summary
private This thisReference
variablesback to summary
private Hashtable<K, V> variables

Constructor Detail

NameSpaceback to summary
public NameSpace(NameSpace parent, String name)
Parameters
parent:NameSpace

the parent namespace of this namespace. Child namespaces inherit all variables and methods of their parent and can (of course) override / shadow them.

NameSpaceback to summary
public NameSpace(BshClassManager classManager, String name)
NameSpaceback to summary
public NameSpace(NameSpace parent, BshClassManager classManager, String name)

Method Detail

addNameSourceListenerback to summary
public void addNameSourceListener(NameSource.Listener listener)

Implements bsh.NameSource.addNameSourceListener.

Implements NameSource Add a listener who is notified upon changes to names in this space.

cacheClassback to summary
pack-priv void cacheClass(String name, Class<T> c)

Helper that caches class.

classForNameback to summary
private Class<T> classForName(String name)
classLoaderChangedback to summary
public void classLoaderChanged()

Implements bsh.BshClassManager.Listener.classLoaderChanged.

Clear all cached classes and names

clearback to summary
public void clear()

Clear all variables, methods, and imports from this namespace. If this namespace is the root, it will be reset to the default imports.

See Also
loadDefaultImports()
createVariableback to summary
protected Variable createVariable(String name, Object value, Modifiers mods) throws UtilEvalError
createVariableback to summary
protected Variable createVariable(String name, Class<T> type, Object value, Modifiers mods) throws UtilEvalError
createVariableback to summary
protected Variable createVariable(String name, Class<T> type, LHS lhs) throws UtilEvalError
doSuperImportback to summary
public void doSuperImport() throws UtilEvalError

Perform "import *;" causing the entire classpath to be mapped. This can take a while.

enumerationToStringArrayback to summary
private String[] enumerationToStringArray(Enumeration<E> e)
flattenMethodCollectionback to summary
private BshMethod[] flattenMethodCollection(Enumeration<E> e)

Flatten the vectors of overloaded methods to a single array.

See Also
getMethods()
getback to summary
public Object get(String name, Interpreter interpreter) throws UtilEvalError

Resolve name to an object through this namespace.

getAllNamesback to summary
public String[] getAllNames()

Implements bsh.NameSource.getAllNames.

Implements NameSource

Returns:String[]

all variable and method names in this and all parent namespaces

getAllNamesAuxback to summary
protected void getAllNamesAux(Vector<E> vec)

Helper for implementing NameSource

getClassback to summary
public Class<T> getClass(String name) throws UtilEvalError

Load a class through this namespace taking into account imports. The class search will proceed through the parent namespaces if necessary.

Returns:Class<T>

null if not found.

getClassImplback to summary
private Class<T> getClassImpl(String name) throws UtilEvalError

Implementation of getClass() Load a class through this namespace taking into account imports.

Check the cache first. If an unqualified name look for imported class or package. Else try to load absolute name.

This method implements caching of unqualified names (normally imports). Qualified names are cached by the BshClassManager. Unqualified absolute class names (e.g. unpackaged Foo) are cached too so that we don't go searching through the imports for them each time.

Returns:Class<T>

null if not found.

getClassInstanceback to summary
pack-priv Object getClassInstance() throws UtilEvalError
getClassManagerback to summary
public BshClassManager getClassManager()
getCommandback to summary
public Object getCommand(String name, Class<T>[] argTypes, Interpreter interpreter) throws UtilEvalError

A command is a scripted method or compiled command class implementing a specified method signature. Commands are loaded from the classpath and may be imported using the importCommands() method.

This method searches the imported commands packages for a script or command object corresponding to the name of the method. If it is a script the script is sourced into this namespace and the BshMethod for the requested signature is returned. If it is a compiled class the class is returned. (Compiled command classes implement static invoke() methods).

The imported packages are searched in reverse order, so that later imports take priority. Currently only the first object (script or class) with the appropriate name is checked. If another, overloaded form, is located in another package it will not currently be found. This could be fixed.

Parameters
name:String

is the name of the desired command method

argTypes:Class<T>[]

is the signature of the desired command method.

Returns:Object

a BshMethod, Class, or null if no such command is found.

Exceptions
UtilEvalError:
if loadScriptedCommand throws UtilEvalError i.e. on errors loading a script that was found
getDeclaredVariablesback to summary
public Variable[] getDeclaredVariables()
getGlobalback to summary
public This getGlobal(Interpreter declaringInterpreter)

Get the top level namespace or this namespace if we are the top.

Note

this method should probably return type bsh.This to be consistent with getThis();

getImportedClassImplback to summary
private Class<T> getImportedClassImpl(String name) throws UtilEvalError

Try to make the name into an imported class. This method takes into account only imports (class or package) found directly in this NameSpace (no parent chain).

getImportedMethodback to summary
protected BshMethod getImportedMethod(String name, Class<T>[] sig) throws UtilEvalError
getImportedVarback to summary
protected Variable getImportedVar(String name) throws UtilEvalError
getInvocationLineback to summary
public int getInvocationLine()
getInvocationTextback to summary
public String getInvocationText()
getMethodback to summary
public BshMethod getMethod(String name, Class<T>[] sig) throws UtilEvalError
See Also
getMethod(String, Class [], boolean), getMethod(String, Class [])
getMethodback to summary
public BshMethod getMethod(String name, Class<T>[] sig, boolean declaredOnly) throws UtilEvalError

Get the bsh method matching the specified signature declared in this name space or a parent.

Note

this method is primarily intended for use internally. If you use this method outside of the bsh package you will have to be familiar with BeanShell's use of the Primitive wrapper class.

Parameters
declaredOnly:boolean

if true then only methods declared directly in this namespace will be found and no inherited or imported methods will be visible.

Returns:BshMethod

the BshMethod or null if not found

See Also
bsh.Primitive
getMethodNamesback to summary
public String[] getMethodNames()

Get the names of methods declared in this namespace. (This does not include methods in parent namespaces).

getMethodsback to summary
public BshMethod[] getMethods()

Get the methods defined in this namespace. (This does not show methods in parent namespaces).

Note

This will probably be renamed getDeclaredMethods()

getNameback to summary
public String getName()

The name of this namespace. If the namespace is a method body namespace then this is the name of the method. If it's a class or class instance then it's the name of the class.

getNameResolverback to summary
pack-priv Name getNameResolver(String ambigname)

This is the factory for Name objects which resolve names within this namespace (e.g. toObject(), toClass(), toLHS()).

This was intended to support name resolver caching, allowing Name objects to cache info about the resolution of names for performance reasons. However this not proven useful yet.

We'll leave the caching as it will at least minimize Name object creation.

(This method would be called getName() if it weren't already used for the simple name of the NameSpace)

This method was public for a time, which was a mistake. Use get() instead.

getNodeback to summary
pack-priv SimpleNode getNode()
getPackageback to summary
pack-priv String getPackage()
getParentback to summary
public NameSpace getParent()

Get the parent namespace.

Note

this isn't quite the same as getSuper(). getSuper() returns 'this' if we are at the root namespace.

getSuperback to summary
public This getSuper(Interpreter declaringInterpreter)

Get the parent namespace' This reference or this namespace' This reference if we are the top.

getThisback to summary
public This getThis(Interpreter declaringInterpreter)

A This object is a thin layer over a namespace, comprising a bsh object context. It handles things like the interface types the bsh object supports and aspects of method invocation on it.

The declaringInterpreter is here to support callbacks from Java through generated proxies. The scripted object "remembers" who created it for things like printing messages and other per-interpreter phenomenon when called externally from Java.

getVariableback to summary
public Object getVariable(String name) throws UtilEvalError

Get the specified variable in this namespace or a parent namespace.

Note

this method is primarily intended for use internally. If you use this method outside of the bsh package you will have to use Primitive.unwrap() to get primitive values.

Returns:Object

The variable value or Primitive.VOID if it is not defined.

See Also
Primitive#unwrap(Object)
getVariableback to summary
public Object getVariable(String name, boolean recurse) throws UtilEvalError

Get the specified variable in this namespace.

Parameters
recurse:boolean

If recurse is true then we recursively search through parent namespaces for the variable.

Note

this method is primarily intended for use internally. If you use this method outside of the bsh package you will have to use Primitive.unwrap() to get primitive values.

Returns:Object

The variable value or Primitive.VOID if it is not defined.

See Also
Primitive#unwrap(Object)
getVariableImplback to summary
protected Variable getVariableImpl(String name, boolean recurse) throws UtilEvalError

Locate a variable and return the Variable object with optional recursion through parent name spaces.

If this namespace is static, return only static variables.

Returns:Variable

the Variable value or null if it is not defined

getVariableNamesback to summary
public String[] getVariableNames()

Get the names of variables defined in this namespace. (This does not show variables in parent namespaces).

identifierToClassback to summary
public static Class<T> identifierToClass(ClassIdentifier ci)

This is a helper method for working inside of bsh scripts and commands. In that context it is impossible to see a ClassIdentifier object for what it is. Attempting to access a method on a ClassIdentifier will look like a static method invocation. This method is in NameSpace for convenience (you don't have to import bsh.ClassIdentifier to use it );

importClassback to summary
public void importClass(String name)

Import a class name. Subsequent imports override earlier ones

importCommandsback to summary
public void importCommands(String name)

Import scripted or compiled BeanShell commands in the following package in the classpath. You may use either "/" path or "." package notation. e.g. importCommands("/bsh/commands") or importCommands("bsh.commands") are equivalent. If a relative path style specifier is used then it is made into an absolute path by prepending "/".

importObjectback to summary
public void importObject(Object obj)

Import a compiled Java object's methods and variables into this namespace. When no scripted method / command or variable is found locally in this namespace method / fields of the object will be checked. Objects are checked in the order of import with later imports taking precedence.

importPackageback to summary
public void importPackage(String name)

subsequent imports override earlier ones

importStaticback to summary
public void importStatic(Class<T> clas)
invokeMethodback to summary
public Object invokeMethod(String methodName, Object[] args, Interpreter interpreter) throws EvalError

Invoke a method in this namespace with the specified args and interpreter reference. No caller information or call stack is required. The method will appear as if called externally from Java.

See Also
bsh.This.invokeMethod(String methodName, Object [] args, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo, boolean)
invokeMethodback to summary
public Object invokeMethod(String methodName, Object[] args, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo) throws EvalError

This method simply delegates to This.invokeMethod();

See Also
bsh.This.invokeMethod(String methodName, Object [] args, Interpreter interpreter, CallStack callstack, SimpleNode callerInfo)
loadDefaultImportsback to summary
public void loadDefaultImports()

Import standard packages. Currently:

	importClass("bsh.EvalError");
	importClass("bsh.Interpreter");
	importPackage("javax.swing.event");
	importPackage("javax.swing");
	importPackage("java.awt.event");
	importPackage("java.awt");
	importPackage("java.net");
	importPackage("java.util");
	importPackage("java.io");
	importPackage("java.lang");
	importCommands("/bsh/commands");
loadScriptedCommandback to summary
private BshMethod loadScriptedCommand(InputStream in, String name, Class<T>[] argTypes, String resourcePath, Interpreter interpreter) throws UtilEvalError

Load a command script from the input stream and find the BshMethod in the target namespace.

Exceptions
UtilEvalError:
on error in parsing the script or if the the method is not found after parsing the script.
nameSpaceChangedback to summary
public void nameSpaceChanged()

Clear all cached classes and names

pruneback to summary
public void prune()

Used for serialization

setClassInstanceback to summary
pack-priv void setClassInstance(Object instance)
setClassManagerback to summary
pack-priv void setClassManager(BshClassManager classManager)
setClassStaticback to summary
pack-priv void setClassStatic(Class<T> clas)
setLocalVariableback to summary
pack-priv void setLocalVariable(String name, Object value, boolean strictJava) throws UtilEvalError

Set a variable explicitly in the local scope.

setMethodback to summary
public void setMethod(String name, BshMethod method) throws UtilEvalError

Note

this is primarily for internal use.

See Also
Interpreter#source(String), Interpreter#eval(String)
setNameback to summary
public void setName(String name)
setNodeback to summary
pack-priv void setNode(SimpleNode node)

Set the node associated with the creation of this namespace. This is used in debugging and to support the getInvocationLine() and getInvocationText() methods.

setPackageback to summary
pack-priv void setPackage(String packageName)

Set the package name for classes defined in this namespace. Subsequent sets override the package.

setParentback to summary
public void setParent(NameSpace parent)
setTypedVariableback to summary
public void setTypedVariable(String name, Class<T> type, Object value, boolean isFinal) throws UtilEvalError

Deprecated

See #setTypedVariable( String, Class, Object, Modifiers )

setTypedVariableback to summary
public void setTypedVariable(String name, Class<T> type, Object value, Modifiers modifiers) throws UtilEvalError

Declare a variable in the local scope and set its initial value. Value may be null to indicate that we would like the default value for the variable type. (e.g. 0 for integer types, null for object types). An existing typed variable may only be set to the same type. If an untyped variable of the same name exists it will be overridden with the new typed var. The set will perform a Types.getAssignableForm() on the value if necessary.

Note

this method is primarily intended for use internally. If you use this method outside of the bsh package and wish to set variables with primitive values you will have to wrap them using bsh.Primitive.

Parameters
value:Object

If value is null, you'll get the default value for the type

modifiers:Modifiers

may be null

See Also
bsh.Primitive
setVariableback to summary
public void setVariable(String name, Object value, boolean strictJava) throws UtilEvalError

Set the variable through this namespace. This method obeys the LOCALSCOPING property to determine how variables are set.

Note

this method is primarily intended for use internally. If you use this method outside of the bsh package and wish to set variables with primitive values you will have to wrap them using bsh.Primitive.

Parameters
strictJava:boolean

specifies whether strict java rules are applied.

See Also
<p> Setting a new variable (which didn't exist before) or removing a variable causes a namespace change.
setVariableback to summary
pack-priv void setVariable(String name, Object value, boolean strictJava, boolean recurse) throws UtilEvalError

Set the value of a the variable 'name' through this namespace. The variable may be an existing or non-existing variable. It may live in this namespace or in a parent namespace if recurse is true.

Note

This method is not public and does *not* know about LOCALSCOPING. Its caller methods must set recurse intelligently in all situations (perhaps based on LOCALSCOPING).

Note

this method is primarily intended for use internally. If you use this method outside of the bsh package and wish to set variables with primitive values you will have to wrap them using bsh.Primitive.

Parameters
strictJava:boolean

specifies whether strict java rules are applied.

recurse:boolean

determines whether we will search for the variable in our parent's scope before assigning locally.

See Also
<p> Setting a new variable (which didn't exist before) or removing a variable causes a namespace change.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

unsetVariableback to summary
public void unsetVariable(String name)

Remove the variable from the namespace.

unwrapVariableback to summary
protected Object unwrapVariable(Variable var) throws UtilEvalError

Unwrap a variable to its value.

Returns:Object

return the variable value. A null var is mapped to Primitive.VOID

writeObjectback to summary
private synchronized void writeObject(ObjectOutputStream s) throws IOException