WISA.wisa3D.shell
Class ShellVar

java.lang.Object
  |
  +--WISA.wisa3D.shell.ShellVar

public class ShellVar
extends java.lang.Object

ShellVar is a wrapper for variables in the Wisa3D-console. A ShellVar consists of a Object and a name with which the object can be referenced in the console. Therefore the name of each ShellVar has to be unique.


Field Summary
protected static java.util.Hashtable All_Variables
          Holds all ShellVars ever constructed in this VM.
protected  java.lang.String Name
          The name of this ShellVar.
protected  java.lang.Object Var
          The variable of this ShellVar.
 
Constructor Summary
ShellVar(java.lang.Object var, java.lang.String name)
          Construct a new ShellVar from the given variable and name.
 
Method Summary
 java.lang.String getName()
          Get the name of this ShellVar.
static ShellVar getShellVar(java.lang.String name)
          Get the ShellVar with the given name.
 java.lang.Object getVar()
          Get the variable of this ShellVar.
 void setName(java.lang.String name)
          Set the unique name of this ShellVar.
 void setVar(java.lang.Object var)
          Set the variable of this ShellVar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

All_Variables

protected static java.util.Hashtable All_Variables
Holds all ShellVars ever constructed in this VM.


Var

protected java.lang.Object Var
The variable of this ShellVar.


Name

protected java.lang.String Name
The name of this ShellVar.

Constructor Detail

ShellVar

public ShellVar(java.lang.Object var,
                java.lang.String name)
         throws ConsoleException
Construct a new ShellVar from the given variable and name.

Parameters:
var - The variable of this ShellVar.
name - The name with which the variable can be referenced in the Console.
Throws:
ConsoleException - If a variable with the same name allready exists.
Method Detail

setVar

public void setVar(java.lang.Object var)
Set the variable of this ShellVar.

Parameters:
var - The new variable of this ShellVar.

setName

public void setName(java.lang.String name)
             throws ConsoleException
Set the unique name of this ShellVar.

Parameters:
name - The name of this ShellVar.
Throws:
ConsoleException - If a variable with the same name allready exists.

getVar

public java.lang.Object getVar()
Get the variable of this ShellVar.

Returns:
The variable of this ShellVar.

getName

public java.lang.String getName()
Get the name of this ShellVar.

Returns:
The name of this ShellVar.

getShellVar

public static ShellVar getShellVar(java.lang.String name)
Get the ShellVar with the given name.

Parameters:
name - The name of the ShellVar.
Returns:
The ShellVar with the given name or null if it does not exist.