public abstract class WrappedT extends Type
| Constructor and Description |
|---|
WrappedT(Type type)
Create a new wrapped type.
|
WrappedT(Type template,
Type type)
Create a new wrapped type.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addAttribute, annotate, attribute, attribute, attribute, attributes, cast, checkNotSealed, constant, constant, copy, 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, isEnum, 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, trace, wtagadd, 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, writepublic WrappedT(Type type)
type - The actual type.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()
Typetag in class TypeType.wtag()public boolean isWrapped()
Typepublic WrappedT toWrapped()
Typepublic boolean hasLocation(boolean forward)
TypehasLocation 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)
TypegetLocation 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)
TypehasLanguage 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)
TypegetLanguage 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)
Typepublic java.lang.String getScope(boolean forward)
Typepublic boolean hasConstant(boolean forward)
TypehasConstant 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)
TypegetConstant 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)
Typepublic Reference getShape(boolean forward)
Typepublic boolean hasAttribute(Attribute att, boolean forward)
TypehasAttribute 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)
TypegetAttribute 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()
TypehasAnnotated in class Typetrue if this type has an annotated type.public AnnotatedT toAnnotated()
TypetoAnnotated in class Typepublic boolean hasAlias()
Typepublic boolean hasEnum()
Typepublic boolean hasEnumerator()
TypehasEnumerator in class Typetrue if this type contains an enumerator.public EnumeratorT toEnumerator()
TypetoEnumerator in class Typepublic boolean hasVariable()
TypehasVariable in class Typetrue if this type contains a variable.Node.hasTraversal()public VariableT toVariable()
TypetoVariable in class Typepublic boolean hasInstantiated()
TypehasInstantiated in class Typetrue if this type has an instantiated type.public InstantiatedT toInstantiated()
TypetoInstantiated in class Typepublic boolean hasParameterized()
TypehasParameterized in class Typetrue if this type has a parameterized type.public ParameterizedT toParameterized()
TypetoParameterized in class Typepublic StructOrUnionT toStructOrUnion()
TypetoStructOrUnion in class Typepublic boolean hasTagged()
Typepublic Tagged toTagged()
TypetoTagged in class TypeType.hasTagged()public Type resolve()
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.Copyright © 2014. All Rights Reserved.