org.aspectj.org.eclipse.jdt.internal.compiler.lookup
Class BinaryTypeBinding

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
      extended by org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding
          extended by org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
              extended by org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding
                  extended by org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
Direct Known Subclasses:
MissingTypeBinding

public class BinaryTypeBinding
extends SourceTypeBinding


Field Summary
protected  ReferenceBinding enclosingType
           
protected  LookupEnvironment environment
           
protected  SimpleLookupTable storedAnnotations
           
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding
fields, memberFinder, memberTypes, methods, originalSuperclass, originalSuperInterfaces, privilegedHandler, scope, superclass, superInterfaces, typeFinder, typeVariables
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
compoundName, fPackage, LUB_GENERIC, modifiers, samProblemBinding, singleAbstractMethod, sourceName
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, id, INT, LONG, NULL, SHORT, tagBits, TYPE_USE_BINDING, typeAnnotations, VOID
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, DefaultLocationArrayContents, DefaultLocationField, DefaultLocationParameter, DefaultLocationReturnType, DefaultLocationTypeArgument, DefaultLocationTypeBound, DefaultLocationTypeParameter, FIELD, GENERIC_TYPE, IMPORT, INTERSECTION_CAST_TYPE, INTERSECTION_TYPE, LOCAL, METHOD, NO_ANNOTATIONS, NO_ELEMENT_VALUE_PAIRS, NO_EXCEPTIONS, NO_FIELDS, NO_MEMBER_TYPES, NO_METHODS, NO_NULL_DEFAULT, NO_PARAMETER_NAMES, NO_PARAMETERS, NO_REFERENCE_TYPES, NO_SUPERINTERFACES, NO_TYPE_VARIABLES, NO_TYPES, NONNULL_BY_DEFAULT, NULL_UNSPECIFIED_BY_DEFAULT, NullnessDefaultMASK, PACKAGE, PARAMETERIZED_TYPE, POLY_TYPE, RAW_TYPE, TYPE, TYPE_PARAMETER, TYPE_USE, UNINITIALIZED_FIELDS, UNINITIALIZED_METHODS, UNINITIALIZED_REFERENCE_TYPES, VARIABLE, WILDCARD_TYPE
 
Constructor Summary
protected BinaryTypeBinding()
          Default empty constructor for subclasses only.
  BinaryTypeBinding(BinaryTypeBinding prototype)
           
  BinaryTypeBinding(PackageBinding packageBinding, IBinaryType binaryType, LookupEnvironment environment)
          Standard constructor for creating binary type bindings from binary models (classfiles)
  BinaryTypeBinding(PackageBinding packageBinding, IBinaryType binaryType, LookupEnvironment environment, boolean needFieldsAndMethods)
          Standard constructor for creating binary type bindings from binary models (classfiles)
 
Method Summary
 FieldBinding[] availableFields()
          Return the array of resolvable fields (resilience)
 MethodBinding[] availableMethods()
          Return the array of resolvable methods (resilience)
 TypeBinding clone(TypeBinding outerType)
          Virtual copy constructor: a copy is made of the receiver's entire instance state and then suitably parameterized by the arguments to the clone operation as seen fit by each type.
 ReferenceBinding containerAnnotationType()
           
static AnnotationBinding[] createAnnotations(IBinaryAnnotation[] annotationInfos, LookupEnvironment env, char[][][] missingTypeNames)
           
 ReferenceBinding enclosingType()
           
 FieldBinding[] fields()
           
 char[] genericTypeSignature()
          Answer the receiver classfile signature.
 MethodBinding getExactConstructor(TypeBinding[] argumentTypes)
           
 MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope)
           
 FieldBinding getFieldBase(char[] fieldName, boolean needResolve)
           
 ReferenceBinding getMemberType(char[] typeName)
          Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
 MethodBinding[] getMethodsBase(char[] selector)
           
 MethodBinding[] getMethodsBase(char[] selector, int suggestedParameterLength)
           
 TypeVariableBinding getTypeVariable(char[] variableName)
           
 boolean hasMemberTypes()
           
 boolean hasTypeBit(int bit)
          Answer an additional bit characterizing this type, like TypeIds.BitAutoCloseable.
 void initializeDeprecatedAnnotationTagBits()
          Compute the tag bits for @Deprecated annotations, avoiding resolving entire annotation if not necessary.
 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 isHierarchyConnected()
          Returns true if the type hierarchy is connected
 boolean isPrototype()
           
 boolean isRepeatableAnnotationType()
          Answer true if the receiver is an annotation which may be repeatable.
 int kind()
           
 ReferenceBinding[] memberTypes()
           
 MethodBinding[] methods()
           
 MethodBinding[] methodsBase()
           
 TypeBinding prototype()
          Return the primordial type from which the receiver was cloned.
static TypeBinding resolveType(TypeBinding type, LookupEnvironment environment, boolean convertGenericToRawType)
           
 FieldBinding resolveTypeFor(FieldBinding field)
           
 MethodBinding resolveTypesFor(MethodBinding method)
           
 void setContainerAnnotationType(ReferenceBinding value)
           
 ReferenceBinding superclass()
           
 ReferenceBinding[] superInterfaces()
           
 void tagAsHavingDefectiveContainerType()
           
 java.lang.String toString()
           
 TypeVariableBinding[] typeVariables()
           
 TypeBinding unannotated(boolean removeOnlyNullAnnotations)
          Return this type minus its type annotations
 FieldBinding[] unResolvedFields()
           
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding
addField, addMethod, addSyntheticArrayMethod, addSyntheticBridgeMethod, addSyntheticBridgeMethod, addSyntheticEnumMethod, addSyntheticFactoryMethod, addSyntheticField, addSyntheticFieldForAssert, addSyntheticFieldForClassLiteral, addSyntheticFieldForEnumValues, addSyntheticFieldForInnerclass, addSyntheticFieldForInnerclass, addSyntheticFieldForSwitchEnum, addSyntheticMethod, addSyntheticMethod, addSyntheticMethod, addSyntheticMethodForEnumInitialization, addSyntheticMethodForSwitchEnum, checkRedundantNullnessDefaultOne, checkRedundantNullnessDefaultRecurse, computeUniqueKey, genericSignature, getAnnotationTagBits, getDefaultAbstractMethods, getExactMethodBase, getField, getField, getMethods, getMethods, getSyntheticBridgeMethod, getSyntheticField, getSyntheticField, isTaggedRepeatable, rememberTypeHierarchy, removeMethod, retrieveAnnotationHolder, setFields, setMemberTypes, setMethods, setSuperClass, setSuperInterfaces, setTypeVariables, sourceEnd, sourceStart, syntheticFields, syntheticMethods, tagIndirectlyAccessibleMembers
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
acceptsNonNullDefault, appendNullAnnotation, applyCloseableClassWhitelists, applyCloseableInterfaceWhitelists, binarySearch, binarySearch, canBeInstantiated, canBeSeenBy, canBeSeenBy, canBeSeenBy, computeGenericTypeSignature, computeId, constantPoolName, debugName, depth, detectAnnotationCycle, enclosingTypeAt, enumConstantCount, fieldCount, getAccessFlags, getAnnotations, getEnclosingInstancesSlotSize, getFileName, getOuterLocalVariablesSlotSize, getPackage, getSingleAbstractMethod, hashCode, hasIncompatibleSuperType, hasRestrictedAccess, implementsInterface, innerCanBeSeenBy, innerCanBeSeenBy, isAbstract, isAnnotationType, isBinaryBinding, isClass, isCompatibleWith, isConsistentIntersection, isDefault, isDeprecated, isEnum, isFinal, isFunctionalInterface, isHierarchyBeingActivelyConnected, isHierarchyBeingConnected, isInterface, isOrEnclosedByPrivateType, isPrivate, isProperType, isProtected, isPublic, isStatic, isStrictfp, isSubtypeOf, isSubTypeOfRTL, isSuperclassOf, isThrowable, isUncheckedException, isUsed, isViewedAsDeprecated, nullAnnotatedReadableName, outermostEnclosingType, qualifiedSourceName, readableName, setAnnotations, shortReadableName, signature, sortFields, sortMethods, sourceName, syntheticEnclosingInstanceTypes
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding
actualType, annotatedDebugName, capture, closestMatch, collectMissingTypes, collectSubstitutes, dimensions, enterRecursiveFunction, equalsEquals, erasure, exitRecursiveFunction, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, getIntersectingTypes, getTypeAnnotations, hasNullTypeAnnotations, hasTypeAnnotations, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isBoxedPrimitiveType, isCapture, isCompatibleWith, isHierarchyInconsistent, isIntersectionCastType, isIntersectionType, isLocalType, isMemberType, isNestedType, isNumericType, isParameterizedType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isPrimitiveOrBoxedPrimitiveType, isPrimitiveType, isProvablyDistinct, isRawType, isReifiable, isTypeArgumentContainedBy, isTypeVariable, isUnboundWildcard, isUnresolvedType, isWildcard, leafComponentType, mentionsAny, needsUncheckedConversion, notEquals, original, qualifiedPackageName, setTypeAnnotations, sIsMoreSpecific, swapUnresolved, syntheticOuterLocalVariables, uncapture, wellKnownType
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
computeUniqueKey, isParameter, isValidBinding, isVolatile, problemId, setAnnotations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

enclosingType

protected ReferenceBinding enclosingType

environment

protected LookupEnvironment environment

storedAnnotations

protected SimpleLookupTable storedAnnotations
Constructor Detail

BinaryTypeBinding

protected BinaryTypeBinding()
Default empty constructor for subclasses only.


BinaryTypeBinding

public BinaryTypeBinding(BinaryTypeBinding prototype)

BinaryTypeBinding

public BinaryTypeBinding(PackageBinding packageBinding,
                         IBinaryType binaryType,
                         LookupEnvironment environment)
Standard constructor for creating binary type bindings from binary models (classfiles)

Parameters:
packageBinding -
binaryType -
environment -

BinaryTypeBinding

public BinaryTypeBinding(PackageBinding packageBinding,
                         IBinaryType binaryType,
                         LookupEnvironment environment,
                         boolean needFieldsAndMethods)
Standard constructor for creating binary type bindings from binary models (classfiles)

Parameters:
packageBinding -
binaryType -
environment -
needFieldsAndMethods -
Method Detail

clone

public TypeBinding clone(TypeBinding outerType)
Description copied from class: TypeBinding
Virtual copy constructor: a copy is made of the receiver's entire instance state and then suitably parameterized by the arguments to the clone operation as seen fit by each type. Parameters may not make sense for every type in the hierarchy, in which case they are silently ignored. A type may choose to retain a copy of the prototype for reference.

Overrides:
clone in class SourceTypeBinding

createAnnotations

public static AnnotationBinding[] createAnnotations(IBinaryAnnotation[] annotationInfos,
                                                    LookupEnvironment env,
                                                    char[][][] missingTypeNames)

resolveType

public static TypeBinding resolveType(TypeBinding type,
                                      LookupEnvironment environment,
                                      boolean convertGenericToRawType)

availableFields

public FieldBinding[] availableFields()
Description copied from class: ReferenceBinding
Return the array of resolvable fields (resilience)

Overrides:
availableFields in class ReferenceBinding
See Also:
ReferenceBinding.availableFields()

availableMethods

public MethodBinding[] availableMethods()
Description copied from class: ReferenceBinding
Return the array of resolvable methods (resilience)

Overrides:
availableMethods in class ReferenceBinding
See Also:
ReferenceBinding.availableMethods()

enclosingType

public ReferenceBinding enclosingType()
Overrides:
enclosingType in class TypeBinding

fields

public FieldBinding[] fields()
Overrides:
fields in class SourceTypeBinding

genericTypeSignature

public char[] genericTypeSignature()
Description copied from class: TypeBinding
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.

Overrides:
genericTypeSignature in class SourceTypeBinding
See Also:
TypeBinding.genericTypeSignature()

getExactConstructor

public MethodBinding getExactConstructor(TypeBinding[] argumentTypes)
Overrides:
getExactConstructor in class SourceTypeBinding

getExactMethod

public MethodBinding getExactMethod(char[] selector,
                                    TypeBinding[] argumentTypes,
                                    CompilationUnitScope refScope)
Overrides:
getExactMethod in class SourceTypeBinding

getFieldBase

public FieldBinding getFieldBase(char[] fieldName,
                                 boolean needResolve)
Overrides:
getFieldBase in class SourceTypeBinding

getMemberType

public ReferenceBinding getMemberType(char[] typeName)
Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested

Overrides:
getMemberType in class SourceTypeBinding

getMethodsBase

public MethodBinding[] getMethodsBase(char[] selector)
Overrides:
getMethodsBase in class SourceTypeBinding

getMethodsBase

public MethodBinding[] getMethodsBase(char[] selector,
                                      int suggestedParameterLength)

hasMemberTypes

public boolean hasMemberTypes()
Overrides:
hasMemberTypes in class SourceTypeBinding

getTypeVariable

public TypeVariableBinding getTypeVariable(char[] variableName)
Overrides:
getTypeVariable in class ReferenceBinding

hasTypeBit

public boolean hasTypeBit(int bit)
Description copied from class: TypeBinding
Answer an additional bit characterizing this type, like TypeIds.BitAutoCloseable.

Overrides:
hasTypeBit in class SourceTypeBinding

isEquivalentTo

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.

Overrides:
isEquivalentTo in class SourceTypeBinding

isGenericType

public boolean isGenericType()
Overrides:
isGenericType in class SourceTypeBinding

isHierarchyConnected

public boolean isHierarchyConnected()
Description copied from class: ReferenceBinding
Returns true if the type hierarchy is connected

Overrides:
isHierarchyConnected in class SourceTypeBinding

isRepeatableAnnotationType

public boolean isRepeatableAnnotationType()
Description copied from class: TypeBinding
Answer true if the receiver is an annotation which may be repeatable. Overridden as appropriate.

Overrides:
isRepeatableAnnotationType in class SourceTypeBinding

kind

public int kind()
Overrides:
kind in class SourceTypeBinding

memberTypes

public ReferenceBinding[] memberTypes()
Overrides:
memberTypes in class SourceTypeBinding

methodsBase

public MethodBinding[] methodsBase()
Overrides:
methodsBase in class SourceTypeBinding

prototype

public TypeBinding prototype()
Description copied from class: TypeBinding
Return the primordial type from which the receiver was cloned. Not all types track a prototype, only SourceTypeBinding, BinaryTypeBinding and UnresolvedReferenceBinding do so as of now. In fact some types e.g ParameterizedTypeBinding should not do so. Deflecting a query to a prototype would lead to wrong results in the case of ParameterizedTypeBinding

Overrides:
prototype in class SourceTypeBinding

isPrototype

public boolean isPrototype()
Overrides:
isPrototype in class SourceTypeBinding

containerAnnotationType

public ReferenceBinding containerAnnotationType()
Overrides:
containerAnnotationType in class SourceTypeBinding

resolveTypeFor

public FieldBinding resolveTypeFor(FieldBinding field)
Overrides:
resolveTypeFor in class SourceTypeBinding

resolveTypesFor

public MethodBinding resolveTypesFor(MethodBinding method)
Overrides:
resolveTypesFor in class SourceTypeBinding

setContainerAnnotationType

public void setContainerAnnotationType(ReferenceBinding value)
Overrides:
setContainerAnnotationType in class SourceTypeBinding

tagAsHavingDefectiveContainerType

public void tagAsHavingDefectiveContainerType()
Overrides:
tagAsHavingDefectiveContainerType in class SourceTypeBinding

initializeDeprecatedAnnotationTagBits

public void initializeDeprecatedAnnotationTagBits()
Description copied from class: Binding
Compute the tag bits for @Deprecated annotations, avoiding resolving entire annotation if not necessary.

Overrides:
initializeDeprecatedAnnotationTagBits in class SourceTypeBinding
See Also:
Binding.initializeDeprecatedAnnotationTagBits()

superclass

public ReferenceBinding superclass()
Overrides:
superclass in class SourceTypeBinding

superInterfaces

public ReferenceBinding[] superInterfaces()
Overrides:
superInterfaces in class SourceTypeBinding

typeVariables

public TypeVariableBinding[] typeVariables()
Overrides:
typeVariables in class SourceTypeBinding

toString

public java.lang.String toString()
Overrides:
toString in class SourceTypeBinding

unannotated

public TypeBinding unannotated(boolean removeOnlyNullAnnotations)
Description copied from class: TypeBinding
Return this type minus its type annotations

Overrides:
unannotated in class SourceTypeBinding
Parameters:
removeOnlyNullAnnotations - if true only null type annotations are removed, otherwise all type annotations.

unResolvedFields

public FieldBinding[] unResolvedFields()
Overrides:
unResolvedFields in class SourceTypeBinding

methods

public MethodBinding[] methods()
Overrides:
methods in class SourceTypeBinding