|
||||||||||
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.RecordDefinition
public final class RecordDefinition
Record definition AST.
Field Summary |
---|
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
ILLEGAL_LOCAL_ID_CHAR |
Constructor Summary | |
---|---|
RecordDefinition(boolean top,
boolean throwable,
String id,
List<String> superIds,
List<Field> fields)
Constructor with super-id. |
Method Summary | |
---|---|
RecordDefinition |
clone()
Clones this object (deep clone); including location info. |
void |
dispose()
Disposes fields. |
Field |
getField(int index)
Gets a typed-id at the specified index. |
int |
getFieldCount()
Gets the number of typed-ids. |
String |
getId()
Gets the id. |
ArrayList<String> |
getOptionalSuperIds()
Gets the optional super-id. |
boolean |
getThrowable()
Gets the throwable. |
boolean |
getTop()
Gets the top. |
void |
setFields(List<Field> newTypedIds)
Sets the fields. |
void |
setId(String newId)
Sets the id. |
void |
setSuperIds(List<String> newSuperIds)
Sets the super-id. |
void |
setThrowable(boolean newThrowable)
Sets the throwable. |
void |
setTop(boolean newTop)
Sets the top. |
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 RecordDefinition(boolean top, boolean throwable, String id, List<String> superIds, List<Field> fields)
top
- The top.throwable
- The throwable.id
- The id. Must be non-null.superIds
- The super-ids. Must be non-null.fields
- The fields declared immediately in this record type
(decorated with modifiers such as transient
).
Must be non-null. Each element must be instance
of Pair<TypedId,Boolean>.Method Detail |
---|
public void setId(String newId)
newId
- The new id. Must be non-null.public String getId()
public ArrayList<String> getOptionalSuperIds()
public void setSuperIds(List<String> newSuperIds)
newSuperId
- The new super-id. Must be non-null.public void setThrowable(boolean newThrowable)
newThrowable
- The new throwable.public boolean getThrowable()
public void setTop(boolean newTop)
newTop
- The new top.public boolean getTop()
public Field getField(int index)
index
- The index of the typed-id. Must be less than getFieldCount().
public int getFieldCount()
public void setFields(List<Field> newTypedIds)
newTypedIds
- The new typed-ids. Must be non-null. Each element must be
instance of TypedId.public RecordDefinition 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 |