|
||||||||||
| 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.WrappedT
xtc.type.EnumeratorT
public class EnumeratorT
An enumerator. An enumerator's type can be set after creation to support the deduction of the overall enum's type after all enumerators have been seen (C99 6.7.2.2).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class xtc.type.Type |
|---|
Type.Tag |
| Constructor Summary | |
|---|---|
EnumeratorT(Type type,
java.lang.String name,
java.math.BigInteger value)
Create a new enumerator. |
|
EnumeratorT(Type template,
Type type,
java.lang.String name,
java.math.BigInteger value)
Create a new enumerator. |
|
| Method Summary | |
|---|---|
EnumeratorT |
copy()
Create a deep copy of this type. |
java.lang.String |
getName()
Get the name. |
java.math.BigInteger |
getValue()
Get the value. |
boolean |
hasEnumerator()
Determine whether this type contains an enumerator. |
boolean |
hasName(java.lang.String name)
Determine whether this enumerator has the specified name. |
boolean |
isEnumerator()
Determine whether this type is an enumerator. |
EnumeratorT |
toEnumerator()
Get this type as an enumerator. |
void |
write(java.lang.Appendable out)
Write a human readable representation to the specified appendable. |
Type.Tag |
wtag()
Get this wrapped type's tag. |
| Methods inherited from class xtc.type.WrappedT |
|---|
equals, getAttribute, getConstant, getLanguage, getLocation, getScope, getShape, getType, hasAlias, hasAnnotated, hasAttribute, hasConstant, hasEnum, hashCode, hasInstantiated, hasLanguage, hasLocation, hasParameterized, hasScope, hasShape, hasTagged, hasVariable, isWrapped, resolve, seal, setType, tag, toAlias, toAnnotated, toEnum, toInstantiated, toParameterized, toStructOrUnion, toTagged, toVariable, toWrapped |
| 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 |
| Constructor Detail |
|---|
public EnumeratorT(Type type,
java.lang.String name,
java.math.BigInteger value)
integer or error type.
type - The type.name - The name.value - The value.
public EnumeratorT(Type template,
Type type,
java.lang.String name,
java.math.BigInteger value)
template - The type whose annotations to copy.type - The type.name - The name.value - The value.| Method Detail |
|---|
public EnumeratorT copy()
Type
copy in class Typepublic Type.Tag wtag()
Type
wtag in class TypeType.tag()public boolean isEnumerator()
Type
isEnumerator in class Typetrue if this type is an enumerator.public boolean hasEnumerator()
Type
hasEnumerator in class WrappedTtrue if this type contains an enumerator.public EnumeratorT toEnumerator()
Type
toEnumerator in class WrappedTpublic boolean hasName(java.lang.String name)
hasName in class Nodename - The name.
true if this enumerator has the name.public java.lang.String getName()
getName in class Nodepublic java.math.BigInteger getValue()
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 | |||||||||