|
||||||||||
| 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
public abstract class WrappedT
The superclass of all wrapped types. A wrapped type adds (mostly) symbolic information to another, more basic type.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class xtc.type.Type |
|---|
Type.Tag |
| Constructor Summary | |
|---|---|
WrappedT(Type type)
Create a new wrapped type. |
|
WrappedT(Type template,
Type type)
Create a new wrapped type. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Determine whether this type equals the specified object. |
Attribute |
getAttribute(java.lang.String name,
boolean forward)
Get the attribute with the specified name. |
Constant |
getConstant(boolean forward)
Get this type's or any wrapped type's constant. |
Language |
getLanguage(boolean forward)
Get this type's or any wrapped type's language. |
Location |
getLocation(boolean forward)
Get this type's or any wrapped type's location. |
java.lang.String |
getScope(boolean forward)
Get this type's or any wrapped type's scope. |
Reference |
getShape(boolean forward)
Get this type's or any wrapped type's shape. |
Type |
getType()
Get the type. |
boolean |
hasAlias()
Determine whether this type contains an alias. |
boolean |
hasAnnotated()
Determine whether this type has an annotated type. |
boolean |
hasAttribute(Attribute att,
boolean forward)
Determine whether this type or any wrapped type has the specified attribute. |
boolean |
hasConstant(boolean forward)
Determine whether this type or any wrapped type has a constant. |
boolean |
hasEnum()
Determine whether this type contains an enum. |
boolean |
hasEnumerator()
Determine whether this type contains an enumerator. |
int |
hashCode()
Get this type's hash code. |
boolean |
hasInstantiated()
Determine whether this type has an instantiated type. |
boolean |
hasLanguage(boolean forward)
Determine whether this type or any wrapped type has a language. |
boolean |
hasLocation(boolean forward)
Determine whether this type or any wrapped type has a location. |
boolean |
hasParameterized()
Determine whether this type has a parameterized type. |
boolean |
hasScope(boolean forward)
Determine whether this type or any wrapped type has a scope. |
boolean |
hasShape(boolean forward)
Determine whether this type or any wrapped type has a shape. |
boolean |
hasTagged()
Determine whether this type is tagged. |
boolean |
hasVariable()
Determine whether this type contains a variable. |
boolean |
isWrapped()
Determine whether this type is wrapped. |
Type |
resolve()
Resolve this type. |
Type |
seal()
Seal this type. |
void |
setType(Type type)
Set the type. |
Type.Tag |
tag()
Get this type's tag. |
AliasT |
toAlias()
Get this type as an alias. |
AnnotatedT |
toAnnotated()
Get this type as an annotated type. |
EnumT |
toEnum()
Get this type as an enum. |
EnumeratorT |
toEnumerator()
Get this type as an enumerator. |
InstantiatedT |
toInstantiated()
Get this type as an instantiated type. |
ParameterizedT |
toParameterized()
Get this type as a parameterized type. |
StructOrUnionT |
toStructOrUnion()
Get this type as a struct or union. |
Tagged |
toTagged()
Get this type as a tagged type. |
VariableT |
toVariable()
Get this type as a variable. |
WrappedT |
toWrapped()
Get this type as a wrapped type. |
| Methods inherited from class xtc.tree.Node |
|---|
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getName, getNode, getProperty, getString, getStringProperty, getTokenText, hasName, 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 |
| Constructor Detail |
|---|
public WrappedT(Type type)
type - The actual type.
public WrappedT(Type template,
Type type)
template - The type whose annotations to copy.type - The actual type.| Method Detail |
|---|
public Type seal()
Typetype, the corresponding overridden method reads:
public Type seal() {
if (! isSealed()) {
super.seal();
type.seal();
}
return this;
}
First testing whether a type is sealed and then invoking the
superclass' seal() method avoids infinite recursions
for mutually recursive types.
seal in class TypeType.seal(List)public Type.Tag tag()
Type
tag in class TypeType.wtag()public boolean isWrapped()
Type
isWrapped in class Typetrue if this type is wrapped.public WrappedT toWrapped()
Type
toWrapped in class Typepublic boolean hasLocation(boolean forward)
Type
hasLocation in class Typeforward - The flag for whether to forward this method across
wrapped types.
true if this type or any wrapped type has a
location.public Location getLocation(boolean forward)
Type
getLocation in class Typeforward - The flag for whether to forward this method across
wrapped types.
null if this type or any
wrapped type does not have a location.public boolean hasLanguage(boolean forward)
Type
hasLanguage in class Typeforward - The flag for whether to forward this method across
wrapped types.
true if this type or any wrapped type has a
language.public Language getLanguage(boolean forward)
Type
getLanguage in class Typeforward - The flag for whether to forward this method across
wrapped types.
null if this type or any
wrapped type does not have a language.public boolean hasScope(boolean forward)
Type
hasScope in class Typeforward - The flag for whether to forward this method across
wrapped types.
true if this type or any wrapped type has a
scope.public java.lang.String getScope(boolean forward)
Type
getScope in class Typeforward - The flag for whether to forward this method across
wrapped types.
null if this type or any
wrapped type does not have a scope.public boolean hasConstant(boolean forward)
Type
hasConstant in class Typeforward - The flag for whether to forward this method across
wrapped types.
true if this type or any wrapped type has a
constant.public Constant getConstant(boolean forward)
Type
getConstant in class Typeforward - The flag for whether to forward this method across
wrapped types.
null if this type or any
wrapped type does not have a constant.public boolean hasShape(boolean forward)
Type
hasShape in class Typeforward - The flag for whether to forward this method across
wrapped types.
true if this type or any wrapped type has a
shape.public Reference getShape(boolean forward)
Type
getShape in class Typeforward - The flag for whether to forward this method across
wrapped types.
null if this type or any
wrapped type does not have a shape.
public boolean hasAttribute(Attribute att,
boolean forward)
Type
hasAttribute in class Typeatt - The attribute.forward - The flag for whether to forward this method across
wrapped types.
true if this type or any wrapped type has
the attribute.
public Attribute getAttribute(java.lang.String name,
boolean forward)
Type
getAttribute in class Typename - The name.forward - The flag for whether to forward this method across
wrapped types.
null if this
or any wrapped type does not have such an attribute.public Type getType()
public void setType(Type type)
type - The type.
java.lang.IllegalStateException - Signals that this type is sealed.public boolean hasAnnotated()
Type
hasAnnotated in class Typetrue if this type has an annotated type.public AnnotatedT toAnnotated()
Type
toAnnotated in class Typepublic boolean hasAlias()
Type
hasAlias in class Typetrue if this type contains an alias.public AliasT toAlias()
Type
toAlias in class Typepublic boolean hasEnum()
Type
hasEnum in class Typetrue if this type contains an enum.public EnumT toEnum()
Type
toEnum in class Typepublic boolean hasEnumerator()
Type
hasEnumerator in class Typetrue if this type contains an enumerator.public EnumeratorT toEnumerator()
Type
toEnumerator in class Typepublic boolean hasVariable()
Type
hasVariable in class Typetrue if this type contains a variable.Node.hasTraversal()public VariableT toVariable()
Type
toVariable in class Typepublic boolean hasInstantiated()
Type
hasInstantiated in class Typetrue if this type has an instantiated type.public InstantiatedT toInstantiated()
Type
toInstantiated in class Typepublic boolean hasParameterized()
Type
hasParameterized in class Typetrue if this type has a parameterized type.public ParameterizedT toParameterized()
Type
toParameterized in class Typepublic 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 Type resolve()
Type
resolve in class Typepublic 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 | |||||||||