|
||||||||||
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.System
public final class System
The compilation unit for a BIR document. Multiple keywords can be used to set off the unit. The choice of which keyword affects interpretation:
system
is a self-contained runnable modelunit
is a unit test in which all
void
-typed 0-arity functions whose names begin with
"test"
Nested Class Summary | |
---|---|
static class |
System.DeclarationKeyword
|
Field Summary |
---|
Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
---|
ILLEGAL_LOCAL_ID_CHAR |
Constructor Summary | |
---|---|
System(String id,
List<? extends SystemMember> systemMembers)
Default constructors. |
|
System(System.DeclarationKeyword keyword,
String id,
List<? extends SystemMember> systemMembers)
Default constructors. |
Method Summary | |
---|---|
System |
clone()
Clones this object (deep clone); including location info. |
void |
dispose()
Removes reference to id, and disposes systemMembers. |
System.DeclarationKeyword |
getDeclarationKeyword()
|
String |
getId()
Gets the system id. |
SystemMember |
getSystemMember(int index)
Gets a system member at a specified index. |
int |
getSystemMemberCount()
Gets the number of system members. |
void |
setDeclarationKeyword(System.DeclarationKeyword newKeyword)
|
void |
setId(String newId)
Sets the system id. |
void |
setSystemMembers(List<? extends SystemMember> newSystemMembers)
Sets the system members. |
String |
toString()
Returns the string representation of this object. |
void |
visit(ASTVisitor visitor)
|
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 System(System.DeclarationKeyword keyword, String id, List<? extends SystemMember> systemMembers)
keyword
- The keyword which was used to denote this compilation unit.id
- The system id. Must be non-null.systemMembers
- The system members. Must be non-null. Each element must be
instance of SystemMember.public System(String id, List<? extends SystemMember> systemMembers)
Default constructors. Sets this object as each definition's, each
global's parent, and each fsm's parent. It's assumed that the keyword
used to denote this compilation unit was system
, thus this
constructor is equivalent to
new System(System.DeclarationKeyword.SYSTEM, id, systemMembers)
id
- The system id. Must be non-null.systemMembers
- The system members. Must be non-null. Each element must be
instance of SystemMember.Method Detail |
---|
public System.DeclarationKeyword getDeclarationKeyword()
public void setDeclarationKeyword(System.DeclarationKeyword newKeyword)
public void setId(String newId)
newId
- The new system id. Must be non-null.public String getId()
public SystemMember getSystemMember(int index)
index
- The index of the system member. Must be between 0 and
getSystemMemberCount() - 1, inclusive.
public int getSystemMemberCount()
public void setSystemMembers(List<? extends SystemMember> newSystemMembers)
newSystemMembers
- The new system members. Must be non-null. Each element must be
instance of SystemMember.public System clone()
clone
in class Node
public void dispose()
dispose
in interface Disposable
dispose
in class Node
public String toString()
toString
in class Node
"system id\n" + "{\n" + " { definition\n | global | function }\n" + "}\n"
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 |