| java.lang.Object org.eclipse.jdt.internal.compiler.lookup.Binding org.eclipse.jdt.internal.compiler.lookup.TypeBinding
All known Subclasses: org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding, org.eclipse.jdt.internal.compiler.lookup.ArrayBinding, org.eclipse.jdt.internal.compiler.lookup.BaseTypeBinding,
TypeBinding | abstract public class TypeBinding extends Binding (Code) | | |
Method Summary | |
public boolean | canBeInstantiated() | public TypeBinding | capture(Scope scope, int position) | public void | collectSubstitutes(Scope scope, TypeBinding actualType, InferenceContext inferenceContext, int constraint) Collect the substitutes into a map for certain type variables inside the receiver type
e.g. | abstract public char[] | constantPoolName() Answer the receiver's constant pool name.
NOTE: This method should only be used during/after code gen.
e.g. | public String | debugName() | public int | dimensions() | public ReferenceBinding | enclosingType() | public TypeBinding | erasure() | public ReferenceBinding | findSuperTypeErasingTo(int wellKnownErasureID, boolean erasureIsClass) Find supertype which erases to a given well-known type, or null if not found
(using id avoids triggering the load of well-known type: 73740)
NOTE: only works for erasures of well-known types, as random other types may share
same id though being distincts. | public TypeBinding | findSuperTypeWithSameErasure(TypeBinding otherType) | public TypeBinding | genericCast(TypeBinding otherType) | public char[] | genericTypeSignature() Answer the receiver classfile signature. | abstract public PackageBinding | getPackage() | public boolean | isAnnotationType() | final public boolean | isAnonymousType() | final public boolean | isArrayType() | final public boolean | isBaseType() | public boolean | isBoundParameterizedType() | public boolean | isCapture() | public boolean | isClass() | abstract public boolean | isCompatibleWith(TypeBinding right) | public boolean | isEnum() | public boolean | isEquivalentTo(TypeBinding otherType) Returns true if a type is identical to another one,
or for generic types, true if compared to its raw type. | public boolean | isGenericType() | final public boolean | isHierarchyInconsistent() | public boolean | isInterface() | public boolean | isIntersectingWith(TypeBinding otherType) | public boolean | isIntersectionType() | final public boolean | isLocalType() | final public boolean | isMemberType() | final public boolean | isNestedType() | final public boolean | isNumericType() | public boolean | isParameterizedType() Returns true if the type is parameterized, e.g. | public boolean | isParameterizedWithOwnVariables() | public boolean | isProvablyDistinctFrom(TypeBinding otherType, int depth) Returns true if the two types are statically known to be different at compile-time,
e.g. | public boolean | isRawType() | public boolean | isReifiable() JLS(3) 4.7. | public boolean | isThrowable() | public boolean | isTypeArgumentContainedBy(TypeBinding otherType) | public boolean | isTypeArgumentIntersecting(TypeBinding otherArgument) | public boolean | isTypeVariable() | public boolean | isUnboundWildcard() | public boolean | isUncheckedException(boolean includeSupertype) | public boolean | isWildcard() | public int | kind() | public TypeBinding | leafComponentType() | public boolean | needsUncheckedConversion(TypeBinding targetType) | public char[] | qualifiedPackageName() Answer the qualified name of the receiver's package separated by periods
or an empty string if its the default package. | abstract public char[] | qualifiedSourceName() Answer the source name for the type. | public char[] | signature() Answer the receiver classfile signature. | abstract public char[] | sourceName() | public void | swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment environment) | public TypeVariableBinding[] | typeVariables() | final public static TypeBinding | wellKnownType(Scope scope, int id) |
tagBits | public long tagBits(Code) | | |
canBeInstantiated | public boolean canBeInstantiated()(Code) | | |
capture | public TypeBinding capture(Scope scope, int position)(Code) | | Perform capture conversion on a given type (only effective on parameterized type with wildcards)
|
collectSubstitutes | public void collectSubstitutes(Scope scope, TypeBinding actualType, InferenceContext inferenceContext, int constraint)(Code) | | Collect the substitutes into a map for certain type variables inside the receiver type
e.g. Collection.findSubstitute(T, Collection>): T --> List
Constraints:
A << F corresponds to: F.collectSubstitutes(..., A, ..., CONSTRAINT_EXTENDS (1))
A = F corresponds to: F.collectSubstitutes(..., A, ..., CONSTRAINT_EQUAL (0))
A >> F corresponds to: F.collectSubstitutes(..., A, ..., CONSTRAINT_SUPER (2))
|
constantPoolName | abstract public char[] constantPoolName()(Code) | | Answer the receiver's constant pool name.
NOTE: This method should only be used during/after code gen.
e.g. 'java/lang/Object'
|
dimensions | public int dimensions()(Code) | | |
findSuperTypeErasingTo | public ReferenceBinding findSuperTypeErasingTo(int wellKnownErasureID, boolean erasureIsClass)(Code) | | Find supertype which erases to a given well-known type, or null if not found
(using id avoids triggering the load of well-known type: 73740)
NOTE: only works for erasures of well-known types, as random other types may share
same id though being distincts.
|
findSuperTypeWithSameErasure | public TypeBinding findSuperTypeWithSameErasure(TypeBinding otherType)(Code) | | Find supertype which erases to a given type, or null if not found
|
genericTypeSignature | public char[] genericTypeSignature()(Code) | | Answer the receiver classfile signature.
Arrays & base types do not distinguish between signature() & constantPoolName().
NOTE: This method should only be used during/after code gen.
|
isAnnotationType | public boolean isAnnotationType()(Code) | | |
isAnonymousType | final public boolean isAnonymousType()(Code) | | |
isArrayType | final public boolean isArrayType()(Code) | | |
isBaseType | final public boolean isBaseType()(Code) | | |
isBoundParameterizedType | public boolean isBoundParameterizedType()(Code) | | Returns true if parameterized type AND not of the form List>
|
isCapture | public boolean isCapture()(Code) | | Returns true if the type is the capture of some wildcard
|
isClass | public boolean isClass()(Code) | | |
isEnum | public boolean isEnum()(Code) | | |
isEquivalentTo | public boolean isEquivalentTo(TypeBinding otherType)(Code) | | Returns true if a type is identical to another one,
or for generic types, true if compared to its raw type.
|
isGenericType | public boolean isGenericType()(Code) | | |
isHierarchyInconsistent | final public boolean isHierarchyInconsistent()(Code) | | |
isInterface | public boolean isInterface()(Code) | | |
isIntersectingWith | public boolean isIntersectingWith(TypeBinding otherType)(Code) | | Returns true if a type is intersecting with another one,
|
isIntersectionType | public boolean isIntersectionType()(Code) | | Returns true if the current type denotes an intersection type: Number & Comparable>
|
isLocalType | final public boolean isLocalType()(Code) | | |
isMemberType | final public boolean isMemberType()(Code) | | |
isNestedType | final public boolean isNestedType()(Code) | | |
isNumericType | final public boolean isNumericType()(Code) | | |
isParameterizedType | public boolean isParameterizedType()(Code) | | Returns true if the type is parameterized, e.g. List
|
isParameterizedWithOwnVariables | public boolean isParameterizedWithOwnVariables()(Code) | | Returns true if the type is parameterized using its own type variables as arguments
|
isProvablyDistinctFrom | public boolean isProvablyDistinctFrom(TypeBinding otherType, int depth)(Code) | | Returns true if the two types are statically known to be different at compile-time,
e.g. a type variable is not provably known to be distinct from another type
|
isRawType | public boolean isRawType()(Code) | | |
isReifiable | public boolean isReifiable()(Code) | | JLS(3) 4.7.
Note: Foo>.Bar is also reifiable
|
isThrowable | public boolean isThrowable()(Code) | | Returns true if a given type may be thrown
|
isTypeArgumentContainedBy | public boolean isTypeArgumentContainedBy(TypeBinding otherType)(Code) | | |
isTypeArgumentIntersecting | public boolean isTypeArgumentIntersecting(TypeBinding otherArgument)(Code) | | Returns false if two given types could not intersect as argument types:
List & List --> false
List extends Throwable> & List extends Runnable> --> true
List extends String> & List extends Runnable> --> false
|
isTypeVariable | public boolean isTypeVariable()(Code) | | Returns true if the type was declared as a type variable
|
isUnboundWildcard | public boolean isUnboundWildcard()(Code) | | Returns true if wildcard type of the form '?' (no bound)
|
isUncheckedException | public boolean isUncheckedException(boolean includeSupertype)(Code) | | Returns true if the type is a subclass of java.lang.Error or java.lang.RuntimeException
|
isWildcard | public boolean isWildcard()(Code) | | Returns true if the type is a wildcard
|
needsUncheckedConversion | public boolean needsUncheckedConversion(TypeBinding targetType)(Code) | | Meant to be invoked on compatible types, to figure if unchecked conversion is necessary
|
qualifiedPackageName | public char[] qualifiedPackageName()(Code) | | Answer the qualified name of the receiver's package separated by periods
or an empty string if its the default package.
For example, {java.util}.
|
qualifiedSourceName | abstract public char[] qualifiedSourceName()(Code) | | Answer the source name for the type.
In the case of member types, as the qualified name from its top level type.
For example, for a member type N defined inside M & A: "A.M.N".
|
signature | public char[] signature()(Code) | | Answer the receiver classfile signature.
Arrays & base types do not distinguish between signature() & constantPoolName().
NOTE: This method should only be used during/after code gen.
|
sourceName | abstract public char[] sourceName()(Code) | | |
wellKnownType | final public static TypeBinding wellKnownType(Scope scope, int id)(Code) | | Match a well-known type id to its binding
|
|
|