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

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

public class BinaryTypeBinding
extends ReferenceBinding


Field Summary
protected  ReferenceBinding enclosingType
           
protected  LookupEnvironment environment
           
protected  FieldBinding[] fields
           
protected  ReferenceBinding[] memberTypes
           
protected  MethodBinding[] methods
           
protected  SimpleLookupTable storedAnnotations
           
protected  ReferenceBinding superclass
           
protected  ReferenceBinding[] superInterfaces
           
protected  TypeVariableBinding[] typeVariables
           
 
Fields inherited from class org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
compoundName, fPackage, LUB_GENERIC, modifiers, sourceName
 
Fields inherited from class org.eclipse.jdt.internal.compiler.lookup.TypeBinding
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, id, INT, LONG, NULL, SHORT, tagBits, VOID
 
Fields inherited from class org.eclipse.jdt.internal.compiler.lookup.Binding
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, FIELD, GENERIC_TYPE, IMPORT, INTERSECTION_TYPE, 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, UNINITIALIZED_FIELDS, UNINITIALIZED_METHODS, UNINITIALIZED_REFERENCE_TYPES, VARIABLE, WILDCARD_TYPE
 
Constructor Summary
protected BinaryTypeBinding()
          Default empty constructor for subclasses only.
  BinaryTypeBinding(PackageBinding packageBinding, IBinaryType binaryType, LookupEnvironment environment)
          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)
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 getField(char[] fieldName, boolean needResolve)
           
 ReferenceBinding getMemberType(char[] typeName)
          Rewrite of default getMemberType to avoid resolving eagerly all member types when one is requested
 MethodBinding[] getMethods(char[] selector)
           
 MethodBinding[] getMethods(char[] selector, int suggestedParameterLength)
           
 TypeVariableBinding getTypeVariable(char[] variableName)
           
 boolean hasMemberTypes()
           
 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
 int kind()
           
 ReferenceBinding[] memberTypes()
           
 MethodBinding[] methods()
           
static TypeBinding resolveType(TypeBinding type, LookupEnvironment environment, boolean convertGenericToRawType)
           
 ReferenceBinding superclass()
           
 ReferenceBinding[] superInterfaces()
           
 String toString()
           
 TypeVariableBinding[] typeVariables()
           
 FieldBinding[] unResolvedFields()
           
 
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
binarySearch, binarySearch, canBeInstantiated, canBeSeenBy, canBeSeenBy, canBeSeenBy, computeGenericTypeSignature, computeId, computeUniqueKey, constantPoolName, debugName, depth, detectAnnotationCycle, enclosingTypeAt, enumConstantCount, fieldCount, getAccessFlags, getAnnotations, getAnnotationTagBits, getEnclosingInstancesSlotSize, getFileName, getOuterLocalVariablesSlotSize, getPackage, hashCode, hasIncompatibleSuperType, hasRestrictedAccess, implementsInterface, isAbstract, isAnnotationType, isBinaryBinding, isClass, isCompatibleWith, isDefault, isDeprecated, isEnum, isFinal, isHierarchyBeingActivelyConnected, isHierarchyBeingConnected, isInterface, isOrEnclosedByPrivateType, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSuperclassOf, isThrowable, isUncheckedException, isUsed, isViewedAsDeprecated, outermostEnclosingType, qualifiedSourceName, readableName, retrieveAnnotationHolder, setAnnotations, shortReadableName, signature, sortFields, sortMethods, sourceName, syntheticEnclosingInstanceTypes, syntheticOuterLocalVariables
 
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.TypeBinding
capture, closestMatch, collectMissingTypes, collectSubstitutes, dimensions, erasure, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isCapture, isHierarchyInconsistent, isIntersectionType, isLocalType, isMemberType, isNestedType, isNumericType, isParameterizedType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isProvablyDistinct, isRawType, isReifiable, isTypeArgumentContainedBy, isTypeVariable, isUnboundWildcard, isWildcard, leafComponentType, needsUncheckedConversion, original, qualifiedPackageName, swapUnresolved, wellKnownType
 
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.Binding
computeUniqueKey, initializeDeprecatedAnnotationTagBits, isParameter, isValidBinding, isVolatile, problemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

superclass

protected ReferenceBinding superclass

enclosingType

protected ReferenceBinding enclosingType

superInterfaces

protected ReferenceBinding[] superInterfaces

fields

protected FieldBinding[] fields

methods

protected MethodBinding[] methods

memberTypes

protected ReferenceBinding[] memberTypes

typeVariables

protected TypeVariableBinding[] typeVariables

environment

protected LookupEnvironment environment

storedAnnotations

protected SimpleLookupTable storedAnnotations
Constructor Detail

BinaryTypeBinding

protected BinaryTypeBinding()
Default empty constructor for subclasses only.


BinaryTypeBinding

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

Parameters:
packageBinding -
binaryType -
environment -
Method Detail

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.availableMethods()

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 ReferenceBinding

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 TypeBinding
See Also:
TypeBinding.genericTypeSignature()

getExactConstructor

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

getExactMethod

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

getField

public FieldBinding getField(char[] fieldName,
                             boolean needResolve)
Overrides:
getField in class ReferenceBinding

getMemberType

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

Overrides:
getMemberType in class ReferenceBinding

getMethods

public MethodBinding[] getMethods(char[] selector)
Overrides:
getMethods in class ReferenceBinding

getMethods

public MethodBinding[] getMethods(char[] selector,
                                  int suggestedParameterLength)
Overrides:
getMethods in class ReferenceBinding

hasMemberTypes

public boolean hasMemberTypes()
Overrides:
hasMemberTypes in class ReferenceBinding

getTypeVariable

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

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 TypeBinding

isGenericType

public boolean isGenericType()
Overrides:
isGenericType in class TypeBinding

isHierarchyConnected

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

Overrides:
isHierarchyConnected in class ReferenceBinding

kind

public int kind()
Overrides:
kind in class TypeBinding

memberTypes

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

methods

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

superclass

public ReferenceBinding superclass()
Overrides:
superclass in class ReferenceBinding

superInterfaces

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

typeVariables

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

toString

public String toString()
Overrides:
toString in class Object

unResolvedFields

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


Copyright © 2012. All Rights Reserved.