edu.wis.jtlv.env.module
Class ModuleParamHolder

java.lang.Object
  extended by edu.wis.jtlv.env.module.ModuleParamHolder

public class ModuleParamHolder
extends java.lang.Object

An object representing a parameter to a module. Its implementation is as a pointer. The pointer is to a "kind of like" define in the module which instantiated this module. (Will be adjusted to the ModuleEntity in the future...)

Version:
"1.3.2"
Author:
yaniv sa'ar.

Constructor Summary
ModuleParamHolder(SMVModule a_for_instance, java.lang.String a_local_name, java.lang.String an_init_string)
           The constructor takes as arguments the instance to which he is parameter to, its local name in that instance, and its instantiating (unparsed) string.
 
Method Summary
 void ___attachPointer()
          Deprecated. INTERNAL PROCEDURE - will be encapsulated and removed from the external API in the following few releases.
 ModuleBDDDefine getDefine()
           The define this pointer points to, if this is not a define, then null is returned.
 SMVModule getForInstance()
           Getter for the module to which this parameter belongs to.
 java.lang.String getInitString()
           Getter for instantiating string.
 SMVModule getInstance()
           The module this pointer points to, if this is not a module, then null is returned.
 SMVModule[] getInstanceArray()
           The module array this pointer points to, if this is not a module array, then null is returned.
 java.lang.String getLocalName()
           Getter for the local name.
 ModuleBDDField getVar()
           The variable this pointer points to, if this is not a variable, then null is returned.
 ModuleBDDField[] getVarArray()
           The variable array this pointer points to, if this is not a variable array, then null is returned.
 boolean isDefine()
           Check if this pointer points to define.
 boolean isInstance()
           Check if this pointer points to module.
 boolean isInstanceArray()
           Check if this pointer points to module array.
 boolean isVar()
           Check if this pointer points to variable.
 boolean isVarArray()
           Check if this pointer points to variable array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleParamHolder

public ModuleParamHolder(SMVModule a_for_instance,
                         java.lang.String a_local_name,
                         java.lang.String an_init_string)

The constructor takes as arguments the instance to which he is parameter to, its local name in that instance, and its instantiating (unparsed) string.

The actual instantiation is done just-in-time. i.e. only when it is needed, it will go to the "kind of like" define in the executer Module, and fetch the value.

Parameters:
a_for_instance - The instance to which this parameter belongs to.
a_local_name - The local name of this parameter.
an_init_string - The instantiating string.
Method Detail

getLocalName

public java.lang.String getLocalName()

Getter for the local name.

Returns:
The local name of the parameter.

getInitString

public java.lang.String getInitString()

Getter for instantiating string.

Returns:
The instantiating string.

getForInstance

public SMVModule getForInstance()

Getter for the module to which this parameter belongs to.

Returns:
The module to which this parameter belongs to.

___attachPointer

public void ___attachPointer()
                      throws ModuleException
Deprecated. INTERNAL PROCEDURE - will be encapsulated and removed from the external API in the following few releases.

Attach the pointer. Go to the instantiating module, and construct the value that had been passed.

Throws:
ModuleException - If this pointer is actually a local define, then it might be that a new define needs to be declared in this module. For such case, there could be an exception for wrong Module manipulation.

isVar

public boolean isVar()

Check if this pointer points to variable.

Returns:
true if this pointer point to a variable, otherwise false.
See Also:
getVar()

isVarArray

public boolean isVarArray()

Check if this pointer points to variable array.

Returns:
true if this pointer point to a variable array, otherwise false.
See Also:
getVarArray()

isInstance

public boolean isInstance()

Check if this pointer points to module.

Returns:
true if this pointer point to a module, otherwise false.
See Also:
getInstance()

isInstanceArray

public boolean isInstanceArray()

Check if this pointer points to module array.

Returns:
true if this pointer point to a module array, otherwise false.
See Also:
getInstanceArray()

isDefine

public boolean isDefine()

Check if this pointer points to define.

Returns:
true if this pointer point to a define, otherwise false.
See Also:
getDefine()

getVar

public ModuleBDDField getVar()

The variable this pointer points to, if this is not a variable, then null is returned.

Returns:
The variable this pointer points to, if this is not a variable, then null is returned.
See Also:
isVar()

getVarArray

public ModuleBDDField[] getVarArray()

The variable array this pointer points to, if this is not a variable array, then null is returned.

Returns:
The variable array this pointer points to, if this is not a variable array, then null is returned.
See Also:
isVarArray()

getInstance

public SMVModule getInstance()

The module this pointer points to, if this is not a module, then null is returned.

Returns:
The module this pointer points to, if this is not a module, then null is returned.
See Also:
isInstance()

getInstanceArray

public SMVModule[] getInstanceArray()

The module array this pointer points to, if this is not a module array, then null is returned.

Returns:
The module array this pointer points to, if this is not a module array, then null is returned.
See Also:
isInstanceArray()

getDefine

public ModuleBDDDefine getDefine()

The define this pointer points to, if this is not a define, then null is returned.

Returns:
The define this pointer points to, if this is not a define, then null is returned.
See Also:
isDefine()