|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.projects.bogor.ast.Node edu.ksu.cis.projects.bogor.ast.SystemMember edu.ksu.cis.projects.bogor.ast.Definition edu.ksu.cis.projects.bogor.ast.ConstantDefinition
public final class ConstantDefinition
Constant definition AST.
Field Summary |
---|
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
ILLEGAL_LOCAL_ID_CHAR |
Constructor Summary | |
---|---|
ConstantDefinition(String id,
List<? extends Constant> constants)
Default constructor. |
Method Summary | |
---|---|
ConstantDefinition |
clone()
Clones this object (deep clone); including location info. |
void |
dispose()
Removes reference to id, and disposes constants. |
Constant |
getConstant(int index)
Gets a constant at a specified index. |
int |
getConstantCount()
Gets the number of constants. |
String |
getId()
Gets the id. |
void |
setConstants(List<? extends Constant> newConstants)
Sets the constants. |
void |
setId(String newId)
Sets the id. |
String |
toString()
Returns the string representation of this object. |
void |
visit(ASTVisitor visitor)
|
Methods inherited from class edu.ksu.cis.projects.bogor.ast.SystemMember |
---|
getParent, setParent |
Methods inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
getLocationInfo, getProperty, putProperty, setLocationInfo |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConstantDefinition(String id, List<? extends Constant> constants)
id
- The id. Must be non-null.constants
- The constants. Must be non-null. Each element must be instance
of Constant.Method Detail |
---|
public Constant getConstant(int index)
index
- The index of the constant. Must be between 0 and
getConstantCount() - 1, inclusive.
public int getConstantCount()
public void setConstants(List<? extends Constant> newConstants)
newConstants
- The new constants. Must be non-null. Each element must be
instance of Constant.public void setId(String newId)
newId
- The new id. Must be non-null.public String getId()
public ConstantDefinition clone()
clone
in class Definition
public void dispose()
dispose
in interface Disposable
dispose
in class SystemMember
public String toString()
toString
in class Node
public void visit(ASTVisitor visitor)
visit
in class Node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |