edu.ksu.cis.projects.bogor.symboltable
Class ExtSymbolTable

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.symboltable.ExtSymbolTable
All Implemented Interfaces:
Disposable, Serializable

public class ExtSymbolTable
extends Object
implements Disposable, Serializable

This class is used as a symbol table for an action/expression extension.

Version:
CVS $Revision: 1.4 $ $Date: 2004/09/14 04:07:37 $
Author:
Robby
See Also:
Serialized Form

Field Summary
protected  String className
          The fully qualified Java class name of the module that implements this extension.
protected  Type expType
          The expression type of this extension.
protected  int extDesc
          Holds the extension descriptor.
protected  String extId
          The extension id of this extension.
protected  String id
          The id of this extension.
protected  boolean isAction
          Indicates whether this symbol table is used for an action extension (or an expression extension).
protected  Method m
          Holds the Java method that implements this extension.
protected  Type[] paramTypes
          The parameter types of this extension.
protected  String[] typeVarIds
          The type variable ids of this extension.
protected  boolean variableParamLength
          Indicates whether this extension has a variable length parameter.
 
Constructor Summary
ExtSymbolTable(boolean isAction, int extDesc, String extId, String id, String className, String[] typeVarIds, Type[] paramTypes, boolean variableParamLength)
          Default constructor.
 
Method Summary
 void dispose()
          Remove references.
 String getClassName()
          Gets the fully qualified Java class name of the module that implements this extension.
 Type getExpType()
          Gets the expression type of this extension.
 int getExtDesc()
          Gets this extension descriptor.
 String getExtId()
          Gets the extension id of this extension.
 String getId()
          Gets the id of this extension.
 Method getMethod()
          Gets the Java method that implements this extension.
 Type getParameterType(int index)
          Gets the parameter type at a certain index.
 int getParameterTypeCount()
          Gets the number of parameter types.
 int getTypeVariableCount()
          Gets the number of type variables.
 String getTypeVariableId(int index)
          Gets the type variable id at a certain index.
 boolean isAction()
          Determines whether this symbol table is used for an action extension.
 boolean isVariableParamLength()
          Determines whether this extension has a variable length parameter.
 void setExpType(Type type)
          Sets the expression type of this extension.
 void setMethod(Method method)
          Sets the Java method that implements this extension.
 String toString()
          Returns the String representation of this symbol table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isAction

protected boolean isAction
Indicates whether this symbol table is used for an action extension (or an expression extension).


extDesc

protected int extDesc
Holds the extension descriptor.


className

protected String className
The fully qualified Java class name of the module that implements this extension. Non-null.


extId

protected String extId
The extension id of this extension. Non-null.


id

protected String id
The id of this extension. Non-null.


expType

protected Type expType
The expression type of this extension. Null if isAction is true. Non-null otherwise.


paramTypes

protected Type[] paramTypes
The parameter types of this extension. Non-null. Each element is non-null.


typeVarIds

protected String[] typeVarIds
The type variable ids of this extension. Non-null. Each element is non-null.


variableParamLength

protected boolean variableParamLength
Indicates whether this extension has a variable length parameter.


m

protected Method m
Holds the Java method that implements this extension.

Constructor Detail

ExtSymbolTable

public ExtSymbolTable(boolean isAction,
                      int extDesc,
                      String extId,
                      String id,
                      String className,
                      String[] typeVarIds,
                      Type[] paramTypes,
                      boolean variableParamLength)
Default constructor.

Parameters:
isAction - Indicates whether this symbol table is used for an action extension (or an expression extension)
extDesc - The extension descriptor for this extension.
extId - The extension id of this extension. Must be non-null.
id - The id of this extension. Must be non-null.
className - The fully qualified Java class name of the module that implements this extension. Must be non-null.
typeVarIds - The type variable ids of this extension. Must be non-null. Each element must be non-null.
paramTypes - The parameter types of this extension. Must be non-null. Each element must be non-null.
variableParamLength - Indicates whether this extension has a variable length parameter.
Method Detail

isAction

public boolean isAction()
Determines whether this symbol table is used for an action extension.

Returns:
True, if this symbol table is used for an action extension. False, if this symbol table is used for an expression extension.

getClassName

public String getClassName()
Gets the fully qualified Java class name of the module that implements this extension.

Returns:
The fully qualified Java class name of the module that implements this extension. Non-null.

setExpType

public void setExpType(Type type)
Sets the expression type of this extension.

Parameters:
type - The expression type for this extension. Must be non-null and isAction is false.

getExpType

public Type getExpType()
Gets the expression type of this extension.

Returns:
The expression type of this extension. Non-null if isAction is false.

getExtDesc

public int getExtDesc()
Gets this extension descriptor.

Returns:
This extension descriptor.

getExtId

public String getExtId()
Gets the extension id of this extension.

Returns:
The extension id of this extension. Non-null.

getId

public String getId()
Gets the id of this extension.

Returns:
The id of this extension. Non-null.

setMethod

public void setMethod(Method method)
Sets the Java method that implements this extension.

Parameters:
method - The Java method that implements this extension. Must be non-null.

getMethod

public Method getMethod()
Gets the Java method that implements this extension.

Returns:
The Java method that implements this extension. Non-null.

getParameterType

public Type getParameterType(int index)
Gets the parameter type at a certain index.

Parameters:
index - The index of the parameter. Must be between 0 and getParameterTypeCount() - 1.
Returns:
The parameter type at the given index. Non-null.

getParameterTypeCount

public int getParameterTypeCount()
Gets the number of parameter types.

Returns:
The number of parameter types.

getTypeVariableCount

public int getTypeVariableCount()
Gets the number of type variables.

Returns:
The number of type variables.

getTypeVariableId

public String getTypeVariableId(int index)
Gets the type variable id at a certain index.

Parameters:
index - The index of the type variable. Must be between 0 and getTypeVariableCount() - 1.
Returns:
The type variable id at the given index. Non-null.

isVariableParamLength

public boolean isVariableParamLength()
Determines whether this extension has a variable length parameter.

Returns:
True, if this extension has a variable length parameter. False, otherwise.

dispose

public void dispose()
Description copied from interface: Disposable
Remove references. Once called, avoid using this object.

Specified by:
dispose in interface Disposable

toString

public String toString()
Returns the String representation of this symbol table.

Overrides:
toString in class Object
Returns:
The String representation of this symbol table. Non-null.