| Constructor and Description |
|---|
EnumT(java.lang.String name)
Create a new, incomplete enum type.
|
EnumT(Type type,
java.lang.String name,
java.util.List<EnumeratorT> enumerators)
Create a new enum type.
|
EnumT(Type template,
Type type,
Nonce nonce,
java.lang.String name,
java.util.List<EnumeratorT> enumerators)
Create a new enum type.
|
| Modifier and Type | Method and Description |
|---|---|
EnumT |
copy()
Create a deep copy of this type.
|
boolean |
equals(java.lang.Object o)
Determine whether this type equals the specified object.
|
EnumeratorT |
getMember(int index)
Get the member with the specified index.
|
int |
getMemberCount()
Get the number of members.
|
java.util.List<EnumeratorT> |
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.
|
boolean |
hasEnum()
Determine whether this type contains an enum.
|
int |
hashCode()
Get this type's hash code.
|
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 |
isEnum()
Determine whether this type is an enum.
|
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 enum.
|
void |
setMembers(java.util.List<EnumeratorT> enumerators)
Set the list of
enumerators. |
void |
setType(Type type)
Set the type.
|
EnumT |
toEnum()
Get this type as an enum.
|
Tagged |
toTagged()
Get this type as a tagged type.
|
void |
write(java.lang.Appendable out)
Write a human readable representation to the specified
appendable.
|
Type.Tag |
wtag()
Get this wrapped type's tag.
|
getAttribute, getConstant, getLanguage, getLocation, getScope, getShape, getType, hasAlias, hasAnnotated, hasAttribute, hasConstant, hasEnumerator, hasInstantiated, hasLanguage, hasLocation, hasParameterized, hasScope, hasShape, hasVariable, isWrapped, resolve, tag, toAlias, toAnnotated, toEnumerator, toInstantiated, toParameterized, toStructOrUnion, toVariable, toWrappedaddAttribute, annotate, attribute, attribute, attribute, attributes, cast, checkNotSealed, constant, constant, copy, deannotate, getAttribute, getConstant, getLanguage, getLocation, getScope, getShape, hasAttribute, hasAttribute, hasAttribute, hasAttributes, hasConstant, hasError, hasLanguage, hasLocation, hasScope, hasShape, hasStructOrUnion, hasTag, hasWTag, isAlias, isAnnotated, isArray, isBoolean, isClass, isConcrete, isDerived, isEnumerator, isError, isFloat, isFunction, isInstantiated, isInteger, isInterface, isInternal, isInternalParameter, isLabel, isMethod, isNamedParameter, isNumber, isPackage, isParameter, isParameterized, isPointer, isSealed, isStruct, isTuple, isUnion, isUnit, isVariable, isVariant, isVoid, isWildcard, language, locate, locate, mark, properties, removeAttribute, removeProperty, resolve, scope, seal, setLocation, setLocation, setProperty, shape, shape, toArray, toBoolean, toClass, toFloat, toFunction, toInteger, toInterface, toInternal, toInternalParameter, toLabel, toMethod, toNamedParameter, toNumber, toPackage, toParameter, toPointer, toStruct, toTuple, toUnion, toUnit, toVariant, toVoid, toWildcard, traceadd, 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, toTokenpublic EnumT(java.lang.String name)
ErrorT.TYPE as its type.name - The name.java.lang.NullPointerException - Signals a null name.public EnumT(Type type, java.lang.String name, java.util.List<EnumeratorT> enumerators)
type - The underlying type.name - The name.enumerators - The enumerators.java.lang.NullPointerException - Signals a null name.public EnumT(Type template, Type type, Nonce nonce, java.lang.String name, java.util.List<EnumeratorT> enumerators)
template - The type whose annotations to copy.type - The underlying type.nonce - The nonce.name - The name.enumerators - The enumerators.java.lang.NullPointerException - Signals a null name.public EnumT copy()
Typepublic Type seal()
seal in class WrappedTType.seal(List)public Type.Tag wtag()
Typewtag in class TypeType.tag()public boolean isEnum()
Typepublic boolean hasEnum()
Typepublic boolean hasTagged()
Typepublic Tagged toTagged()
TypetoTagged in class WrappedTType.hasTagged()public void setType(Type type)
sets
the enumerators' types to the specified type, which should be an
integer. When modifying an incomplete type,
this method should be called after the appropriate call to setMembers(List).public Nonce getNonce()
Taggedpublic boolean isUnnamed()
Taggedtag(nonce).public boolean hasName(java.lang.String name)
Nodepublic java.lang.String getName()
Nodepublic Type lookup(java.lang.String name)
Taggedlookup in interface Taggedname - The name.ErrorT.TYPE if the tagged type has no
such member.public int getMemberCount()
TaggedgetMemberCount in interface Tagged-1 if this type is
incomplete.public EnumeratorT getMember(int index)
Taggedpublic java.util.List<EnumeratorT> getMembers()
TaggedgetMembers in interface Taggednull if this type is
incomplete.public void setMembers(java.util.List<EnumeratorT> enumerators)
enumerators. This method
does not change the type of the enumerators.enumerators - The enumerators.java.lang.IllegalStateException - Signals that this type is sealed.public int hashCode()
WrappedTpublic boolean equals(java.lang.Object o)
public void write(java.lang.Appendable out)
throws java.io.IOException
NodeObject.toString().Copyright © 2014. All Rights Reserved.