|
||||||||||
| 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
xtc.type.UnionT
public class UnionT
A union type.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class xtc.type.Type |
|---|
Type.Tag |
| Field Summary |
|---|
| Fields inherited from class xtc.type.StructOrUnionT |
|---|
members, name, nonce |
| Constructor Summary | |
|---|---|
UnionT(java.lang.String tag)
Create a new, incomplete union type. |
|
UnionT(java.lang.String tag,
java.util.List<VariableT> members)
Create a new union type with a fresh nonce. |
|
UnionT(Type template,
Nonce nonce,
java.lang.String tag,
java.util.List<VariableT> members)
Create a new union type. |
|
| Method Summary | |
|---|---|
UnionT |
copy()
Create a deep copy of this type. |
boolean |
isUnion()
Determine whether this type is a union. |
Type.Tag |
tag()
Get this type's tag. |
UnionT |
toUnion()
Get this type as a union. |
void |
write(java.lang.Appendable out)
Write a human readable representation to the specified appendable. |
| Methods inherited from class xtc.type.StructOrUnionT |
|---|
equals, getMember, getMemberCount, getMembers, getName, getNonce, hashCode, hasName, hasTagged, isUnnamed, lookup, seal, setMembers, toStructOrUnion, toTagged |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface xtc.type.Tagged |
|---|
isEnum, isStruct |
| Constructor Detail |
|---|
public UnionT(java.lang.String tag)
tag - The tag.
java.lang.NullPointerException - Signals a null tag.
public UnionT(java.lang.String tag,
java.util.List<VariableT> members)
tag - The tag.members - The members.
java.lang.NullPointerException - Signals a null tag.
public UnionT(Type template,
Nonce nonce,
java.lang.String tag,
java.util.List<VariableT> members)
template - The type whose annotations to copy.nonce - The nonce.tag - The tag.members - The members.
java.lang.NullPointerException - Signals a null tag.| Method Detail |
|---|
public UnionT copy()
Type
copy in class Typepublic Type.Tag tag()
Type
tag in class TypeType.wtag()public boolean isUnion()
Type
isUnion in interface TaggedisUnion in class Typetrue if this type is a union.public UnionT toUnion()
Type
toUnion in class Type
public void write(java.lang.Appendable out)
throws java.io.IOException
NodeObject.toString().
write in class Nodeout - The appendable.
java.io.IOException - Signals an I/O error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||