|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.tree.Node
xtc.type.Type
xtc.type.DerivedT
xtc.type.StructOrUnionT
public abstract class StructOrUnionT
The superclass of struct and union types.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class xtc.type.Type |
|---|
Type.Tag |
| Field Summary | |
|---|---|
protected java.util.List<VariableT> |
members
The list of members represents as VariableT. |
protected java.lang.String |
name
The name. |
protected Nonce |
nonce
The nonce. |
| Constructor Summary | |
|---|---|
StructOrUnionT(Type template,
Nonce nonce,
java.lang.String name,
java.util.List<VariableT> members)
Create a new struct or union type. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Determine whether this type equals the specified object. |
VariableT |
getMember(int index)
Get the member with the specified index. |
int |
getMemberCount()
Get the number of members. |
java.util.List<VariableT> |
getMembers()
Get the members of the tagged type. |
java.lang.String |
getName()
Get the name of this node. |
Nonce |
getNonce()
Get this tagged type's nonce. |
int |
hashCode()
|
boolean |
hasName(java.lang.String name)
Determine whether this node's name is the same as the specified name. |
boolean |
hasTagged()
Determine whether this type is tagged. |
boolean |
isUnnamed()
Determine whether this tagged type is unnamed. |
Type |
lookup(java.lang.String name)
Look up the member with the specified name. |
Type |
seal()
Seal this struct or union. |
void |
setMembers(java.util.List<VariableT> members)
Set the members. |
StructOrUnionT |
toStructOrUnion()
Get this type as a struct or union. |
Tagged |
toTagged()
Get this type as a tagged type. |
| Methods inherited from class xtc.type.DerivedT |
|---|
isDerived |
| Methods inherited from class xtc.tree.Node |
|---|
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getNode, getProperty, getString, getStringProperty, getTokenText, hasProperty, hasTraversal, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, remove, set, size, strip, toAnnotation, toList, toString, toToken, write |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface xtc.type.Tagged |
|---|
isEnum, isStruct, isUnion |
| Field Detail |
|---|
protected final Nonce nonce
protected final java.lang.String name
protected java.util.List<VariableT> members
VariableT.
| Constructor Detail |
|---|
public StructOrUnionT(Type template,
Nonce nonce,
java.lang.String name,
java.util.List<VariableT> members)
template - The type whose annotations to copy.nonce - The nonce.name - The name.members - The members.
java.lang.NullPointerException - Signals a null name.| Method Detail |
|---|
public Type seal()
seal in class TypeType.seal(List)public StructOrUnionT toStructOrUnion()
Type
toStructOrUnion in class Typepublic boolean hasTagged()
Type
hasTagged in class Typetrue if this type is tagged.public Tagged toTagged()
Type
toTagged in class TypeType.hasTagged()public Nonce getNonce()
Tagged
getNonce in interface Taggedpublic boolean isUnnamed()
Taggedtag(nonce).
isUnnamed in interface Taggedtrue if this tagged type is unnamed.public boolean hasName(java.lang.String name)
Node
hasName in interface TaggedhasName in class Nodename - The name.
true if this node's name equals the
specified name.public java.lang.String getName()
Node
getName in interface TaggedgetName in class Nodepublic Type lookup(java.lang.String name)
Tagged
lookup in interface Taggedname - The name.
ErrorT.TYPE if the tagged type has no
such member.public int getMemberCount()
Tagged
getMemberCount in interface Tagged-1 if this type is
incomplete.public VariableT getMember(int index)
Tagged
getMember in interface Taggedindex - The index.
public java.util.List<VariableT> getMembers()
Tagged
getMembers in interface Taggednull if this type is
incomplete.public void setMembers(java.util.List<VariableT> members)
members - The members.
java.lang.IllegalStateException - Signals that this type is sealed.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - The object.
true if this type equals the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||