|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.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.EnumDefinition
public final class EnumDefinition
Enum definition AST.
| Field Summary |
|---|
| Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
|---|
ILLEGAL_LOCAL_ID_CHAR |
| Constructor Summary | |
|---|---|
EnumDefinition(String id,
List<String> enumConstants)
Default constructor. |
|
| Method Summary | |
|---|---|
EnumDefinition |
clone()
Clones this object (deep clone); including location info. |
void |
dispose()
Disposes enumConstants. |
String |
getEnumConstant(int index)
Gets an enum constant at a specified index. |
int |
getEnumConstantCount()
Gets the number of enum constants. |
String |
getId()
Gets the id. |
void |
setEnumConstants(List<String> newEnumConstants)
Sets the enum 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 EnumDefinition(String id,
List<String> enumConstants)
id - The id. Must be non-null.enumConstants - The enum constants. Must be non-null. Each element must be
instance of String. The number of elements must be greater
than zero.| Method Detail |
|---|
public String getEnumConstant(int index)
index - The index of the enum constant. Must be between 0 and
getEnumConstantCount() - 1, inclusive.
public int getEnumConstantCount()
public void setEnumConstants(List<String> newEnumConstants)
newEnumConstants - The new enum constants. Must be non-null. Each element must be
instance of String. The number of elements must be greater
than zero.public void setId(String newId)
newId - The new id. Must be non-null.public String getId()
public EnumDefinition clone()
clone in class Definitionpublic void dispose()
dispose in interface Disposabledispose in class SystemMemberpublic String toString()
toString in class Nodepublic void visit(ASTVisitor visitor)
visit in class Node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||