public class BoxableTypeConstant extends ConstructedType
| Constructor and Description |
|---|
BoxableTypeConstant(Type type) |
BoxableTypeConstant(Type type,
boolean flag) |
| Modifier and Type | Method and Description |
|---|---|
Type |
copy(java.util.HashMap parameters)
Returns a copy of this type with a consistent renaming of all free type
parameters, and identyfing bound type parameters with their values.
|
int |
eqCode()
Returns a hash code for this type - the reason for using the name eqCode
(rather than overriding hashCode), is that it is important to preserve
the implementation of java.lang.Object.hashCode for type parameters (to
be compatible with ==).
|
boolean |
isBoxedType()
This returns true iff this type has been marked as boxed
(true by default - overridden by
TypeConstant).
|
boolean |
isEqualTo(Type type)
Returns true iff this type constant and the specified type
have equal underlying types and boxing information.
|
boolean |
isEqualTo(Type type,
java.util.HashMap parameters)
Returns true iff this boxable type constant and the specified type
are equal (parameters is disregarded because no type parameters
may occur in a boxable type constant.
|
byte |
kind()
This returns the value identifying what kind of type this is.
|
int |
numberOfTypeComponents()
Returns the number of type components making up this type.
|
Type |
setBoxed(boolean flag)
With true (resp.
|
void |
setTypeRefComponent(int n,
Type type)
Sets the n-th undereferenced type component of this type to the specified type;
throws a NoSuchTypeComponentException otherwise.
|
byte |
sort()
This returns the runtime sort for this type (OBJECT_SORT
by default - overridden by TypeConstant).
|
java.lang.String |
toString() |
Type |
type() |
Type |
typeRefComponent(int n)
Returns the n-th undereferenced type component in this type, if any; throws a
NoSuchTypeComponentException otherwise.
|
boolean |
unify(Type type)
This unifies this type with the specified type with no possibility of undoing any
effects.
|
void |
unify(Type type,
TypeChecker typeChecker)
This unifies this type with the specified type in the context
of the specified TypeChecker.
|
actualType, array, array, baseType, baseTypeRef, BOOLEAN, BOXED_BOOLEAN, BOXED_CHAR, BOXED_INT, BOXED_REAL, boxSort, CHAR, checkOccurrence, copy, curry, equals, findValue, flatten, getParameters, getParameters, getValue, instantiate, INT, is, isBag, isBoolean, isChar, isCollection, isGlobalUnsafe, isInt, isList, isPolymorphic, isPrimitive, isReal, isSet, isString, isVoid, kindString, rank, REAL, resetNames, shadowType, standardize, toFullString, toQuantifiedString, toQuantifiedString, typeComponent, unwrapper, value, wrapperpublic BoxableTypeConstant(Type type)
public BoxableTypeConstant(Type type, boolean flag)
public final int numberOfTypeComponents()
TypenumberOfTypeComponents in class Typepublic final Type typeRefComponent(int n) throws NoSuchTypeComponentException
TypetypeRefComponent in class TypeNoSuchTypeComponentExceptionpublic final void setTypeRefComponent(int n,
Type type)
throws NoSuchTypeComponentException
TypesetTypeRefComponent in class TypeNoSuchTypeComponentExceptionpublic final Type setBoxed(boolean flag)
TypeN.B.: The following definition specifies only the default behavior for this method. Specific subclasses are generally expected to override this method.
public final byte sort()
TypeN.B.: The following definition specifies only the default behavior for this method. Specific subclasses are generally expected to override this method.
public final Type type()
public final boolean isBoxedType()
TypeN.B.: The following definition specifies only the default behavior for this method. Specific subclasses are generally expected to override this method.
isBoxedType in class Typepublic final byte kind()
Typepublic final Type copy(java.util.HashMap parameters)
TypeN.B.: The following definition specifies only the default behavior for this method. Specific subclasses are generally expected to override this method.
public final void unify(Type type, TypeChecker typeChecker) throws FailedUnificationException
Typeunify in class TypeFailedUnificationExceptionpublic final boolean unify(Type type)
Typepublic final int eqCode()
Typepublic final boolean isEqualTo(Type type)
public final boolean isEqualTo(Type type, java.util.HashMap parameters)
public final java.lang.String toString()
toString in class java.lang.Object