|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.internal.compiler.lookup.Binding
org.eclipse.jdt.internal.compiler.lookup.TypeBinding
public abstract class TypeBinding
Field Summary | |
---|---|
static BaseTypeBinding |
BOOLEAN
|
static BaseTypeBinding |
BYTE
|
static BaseTypeBinding |
CHAR
|
static BaseTypeBinding |
DOUBLE
|
static BaseTypeBinding |
FLOAT
|
int |
id
|
static BaseTypeBinding |
INT
Base type definitions |
static BaseTypeBinding |
LONG
|
static BaseTypeBinding |
NULL
|
static BaseTypeBinding |
SHORT
|
long |
tagBits
|
static BaseTypeBinding |
VOID
|
Fields inherited from class org.eclipse.jdt.internal.compiler.lookup.Binding |
---|
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, FIELD, GENERIC_TYPE, IMPORT, LOCAL, METHOD, NO_ANNOTATIONS, NO_ELEMENT_VALUE_PAIRS, NO_EXCEPTIONS, NO_FIELDS, NO_MEMBER_TYPES, NO_METHODS, NO_PARAMETERS, NO_SUPERINTERFACES, NO_TYPE_VARIABLES, NO_TYPES, PACKAGE, PARAMETERIZED_TYPE, RAW_TYPE, TYPE, TYPE_PARAMETER, VARIABLE, WILDCARD_TYPE |
Constructor Summary | |
---|---|
TypeBinding()
|
Method Summary | |
---|---|
boolean |
canBeInstantiated()
|
TypeBinding |
capture(Scope scope,
int position)
Perform capture conversion on a given type (only effective on parameterized type with wildcards) |
void |
collectSubstitutes(Scope scope,
TypeBinding actualType,
java.util.Map substitutes,
int constraint)
Collect the substitutes into a map for certain type variables inside the receiver type e.g. |
abstract char[] |
constantPoolName()
Answer the receiver's constant pool name. |
java.lang.String |
debugName()
|
int |
dimensions()
|
ReferenceBinding |
enclosingType()
|
TypeBinding |
erasure()
|
TypeBinding |
findSuperTypeWithSameErasure(TypeBinding otherType)
Find supertype which erases to a given type, or null if not found |
TypeBinding |
genericCast(TypeBinding otherType)
Returns the type to use for generic cast, or null if none required |
char[] |
genericTypeSignature()
Answer the receiver classfile signature. |
abstract PackageBinding |
getPackage()
|
boolean |
isAnnotationType()
|
boolean |
isAnonymousType()
|
boolean |
isArrayType()
|
boolean |
isBaseType()
|
boolean |
isBoundParameterizedType()
Returns true if parameterized type AND not of the form List> |
boolean |
isCapture()
Returns true if the type is the capture of some wildcard |
boolean |
isClass()
|
abstract boolean |
isCompatibleWith(TypeBinding right)
|
boolean |
isEnum()
|
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. |
boolean |
isGenericType()
|
boolean |
isHierarchyInconsistent()
|
boolean |
isInterface()
|
boolean |
isIntersectingWith(TypeBinding otherType)
Returns true if a type is intersecting with another one, |
boolean |
isIntersectionType()
Returns true if the current type denotes an intersection type: Number & Comparable> |
boolean |
isLocalType()
|
boolean |
isMemberType()
|
boolean |
isNestedType()
|
boolean |
isNumericType()
|
boolean |
isParameterizedType()
Returns true if the type is parameterized, e.g. |
boolean |
isParameterizedWithOwnVariables()
Returns true if the type is parameterized using its own type variables as arguments |
boolean |
isProvablyDistinctFrom(TypeBinding otherType,
int depth)
Returns true if the two types are statically known to be different at compile-time, e.g. |
boolean |
isRawType()
|
boolean |
isReifiable()
JLS(3) 4.7. |
boolean |
isTypeArgumentContainedBy(TypeBinding otherType)
|
boolean |
isTypeArgumentIntersecting(TypeBinding otherArgument)
Returns false if two given types could not intersect as argument types: List |
boolean |
isTypeVariable()
Returns true if the type was declared as a type variable |
boolean |
isUnboundWildcard()
Returns true if wildcard type of the form '?' (no bound) |
boolean |
isUncheckedException(boolean includeSupertype)
Returns true if the type is a subclass of java.lang.Error or java.lang.RuntimeException |
boolean |
isWildcard()
Returns true if the type is a wildcard |
int |
kind()
|
TypeBinding |
leafComponentType()
|
boolean |
needsUncheckedConversion(TypeBinding targetType)
Meant to be invoked on compatible types, to figure if unchecked conversion is necessary |
char[] |
qualifiedPackageName()
Answer the qualified name of the receiver's package separated by periods or an empty string if its the default package. |
abstract char[] |
qualifiedSourceName()
Answer the source name for the type. |
char[] |
signature()
Answer the receiver classfile signature. |
abstract char[] |
sourceName()
|
void |
swapUnresolved(UnresolvedReferenceBinding unresolvedType,
ReferenceBinding resolvedType,
LookupEnvironment environment)
|
TypeVariableBinding[] |
typeVariables()
|
static TypeBinding |
wellKnownType(Scope scope,
int id)
Match a well-known type id to its binding |
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.Binding |
---|
computeUniqueKey, computeUniqueKey, getAnnotationTagBits, initializeDeprecatedAnnotationTagBits, isValidBinding, problemId, readableName, shortReadableName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int id
public long tagBits
public static final BaseTypeBinding INT
public static final BaseTypeBinding BYTE
public static final BaseTypeBinding SHORT
public static final BaseTypeBinding CHAR
public static final BaseTypeBinding LONG
public static final BaseTypeBinding FLOAT
public static final BaseTypeBinding DOUBLE
public static final BaseTypeBinding BOOLEAN
public static final BaseTypeBinding NULL
public static final BaseTypeBinding VOID
Constructor Detail |
---|
public TypeBinding()
Method Detail |
---|
public static final TypeBinding wellKnownType(Scope scope, int id)
public boolean canBeInstantiated()
public TypeBinding capture(Scope scope, int position)
public void collectSubstitutes(Scope scope, TypeBinding actualType, java.util.Map substitutes, int constraint)
public abstract char[] constantPoolName()
public java.lang.String debugName()
public int dimensions()
public ReferenceBinding enclosingType()
public TypeBinding erasure()
public TypeBinding findSuperTypeWithSameErasure(TypeBinding otherType)
public TypeBinding genericCast(TypeBinding otherType)
public char[] genericTypeSignature()
public abstract PackageBinding getPackage()
public boolean isAnnotationType()
public final boolean isAnonymousType()
public final boolean isArrayType()
public final boolean isBaseType()
public boolean isBoundParameterizedType()
public boolean isCapture()
public boolean isClass()
public abstract boolean isCompatibleWith(TypeBinding right)
public boolean isEnum()
public boolean isEquivalentTo(TypeBinding otherType)
public boolean isGenericType()
public final boolean isHierarchyInconsistent()
public boolean isInterface()
public boolean isIntersectingWith(TypeBinding otherType)
public boolean isIntersectionType()
public final boolean isLocalType()
public final boolean isMemberType()
public final boolean isNestedType()
public final boolean isNumericType()
public boolean isParameterizedType()
public boolean isParameterizedWithOwnVariables()
public boolean isProvablyDistinctFrom(TypeBinding otherType, int depth)
public boolean isRawType()
public boolean isReifiable()
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()
kind
in class Binding
public TypeBinding leafComponentType()
public boolean needsUncheckedConversion(TypeBinding targetType)
public char[] qualifiedPackageName()
public abstract char[] qualifiedSourceName()
public char[] signature()
public abstract char[] sourceName()
public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment environment)
public TypeVariableBinding[] typeVariables()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |