public abstract class Parameter extends Type
ParameterizedT listing all parameters.
Instantiation of a parameterized type does not require replacing
all parameters, but rather should be implemented by wrapping the
paramterized type in an InstantiatedT listing all
arguments. To support efficient unification, this class implements
union/find operations with path compression through the bind(Type) and lookup() operations.| Constructor and Description |
|---|
Parameter()
Create a new parameter.
|
Parameter(Type template)
Create a new parameter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(Type type)
Bind this parameter to the specified type.
|
boolean |
isParameter()
Determine whether this type is a type parameter.
|
Type |
lookup()
Look up this parameter's binding.
|
Parameter |
toParameter()
Get this type as a type parameter.
|
addAttribute, annotate, attribute, attribute, attribute, attributes, cast, checkNotSealed, constant, constant, copy, copy, deannotate, getAttribute, getAttribute, getConstant, getConstant, getLanguage, getLanguage, getLocation, getLocation, getScope, getScope, getShape, getShape, hasAlias, hasAnnotated, hasAttribute, hasAttribute, hasAttribute, hasAttribute, hasAttributes, hasConstant, hasConstant, hasEnum, hasEnumerator, hasError, hasInstantiated, hasLanguage, hasLanguage, hasLocation, hasLocation, hasParameterized, hasScope, hasScope, hasShape, hasShape, hasStructOrUnion, hasTag, hasTagged, hasVariable, hasWTag, isAlias, isAnnotated, isArray, isBoolean, isClass, isConcrete, isDerived, isEnum, isEnumerator, isError, isFloat, isFunction, isInstantiated, isInteger, isInterface, isInternal, isInternalParameter, isLabel, isMethod, isNamedParameter, isNumber, isPackage, isParameterized, isPointer, isSealed, isStruct, isTuple, isUnion, isUnit, isVariable, isVariant, isVoid, isWildcard, isWrapped, language, locate, locate, mark, properties, removeAttribute, removeProperty, resolve, resolve, scope, seal, seal, setLocation, setLocation, setProperty, shape, shape, tag, toAlias, toAnnotated, toArray, toBoolean, toClass, toEnum, toEnumerator, toFloat, toFunction, toInstantiated, toInteger, toInterface, toInternal, toInternalParameter, toLabel, toMethod, toNamedParameter, toNumber, toPackage, toParameterized, toPointer, toStruct, toStructOrUnion, toTagged, toTuple, toUnion, toUnit, toVariable, toVariant, toVoid, toWildcard, toWrapped, 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 Parameter()
public Parameter(Type template)
template - The type whose annotations to copy.public boolean isParameter()
TypeisParameter in class Typetrue if this type is a parameter.public Parameter toParameter()
TypetoParameter in class Typepublic void bind(Type type)
type - The type.java.lang.IllegalStateException - Signals that this parameter is
sealed or already bound.public Type lookup()
Copyright © 2014. All Rights Reserved.