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

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.SourceTypeBinding
Direct Known Subclasses:
NestedTypeBinding

public class SourceTypeBinding
extends ReferenceBinding


Field Summary
 ReferenceBinding[] memberTypes
           
 ClassScope scope
           
 ReferenceBinding superclass
           
 ReferenceBinding[] superInterfaces
           
 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
SourceTypeBinding(char[][] compoundName, PackageBinding fPackage, ClassScope scope)
           
 
Method Summary
 SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge)
           
 SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge, MethodBinding targetMethod)
           
 SyntheticMethodBinding addSyntheticEnumMethod(char[] selector)
           
 FieldBinding addSyntheticFieldForAssert(BlockScope blockScope)
           
 FieldBinding addSyntheticFieldForClassLiteral(TypeBinding targetType, BlockScope blockScope)
           
 FieldBinding addSyntheticFieldForEnumValues()
           
 FieldBinding addSyntheticFieldForInnerclass(LocalVariableBinding actualOuterLocalVariable)
           
 FieldBinding addSyntheticFieldForInnerclass(ReferenceBinding enclosingType)
           
 SyntheticFieldBinding addSyntheticFieldForSwitchEnum(char[] fieldName, String key)
           
 SyntheticMethodBinding addSyntheticMethod(FieldBinding targetField, boolean isReadAccess, boolean isSuperAccess)
           
 SyntheticMethodBinding addSyntheticMethod(MethodBinding targetMethod, boolean isSuperAccess)
           
 SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end)
           
 SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding)
           
 char[] computeUniqueKey(boolean isLeaf)
          p.X {} -> Lp/X;
 FieldBinding[] fields()
           
 char[] genericSignature()
          
 char[] genericTypeSignature()
          Answer the receiver classfile signature.
 long getAnnotationTagBits()
          Compute the tagbits for standard annotations.
 MethodBinding[] getDefaultAbstractMethods()
           
 MethodBinding getExactConstructor(TypeBinding[] argumentTypes)
           
 MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope)
           
 FieldBinding getField(char[] fieldName, boolean needResolve)
           
 MethodBinding[] getMethods(char[] selector)
           
 SyntheticMethodBinding getSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge)
           
 FieldBinding getSyntheticField(LocalVariableBinding actualOuterLocalVariable)
           
 FieldBinding getSyntheticField(ReferenceBinding targetEnclosingType, boolean onlyExactMatch)
           
 boolean hasMemberTypes()
           
 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
 int kind()
           
 ReferenceBinding[] memberTypes()
           
 MethodBinding[] methods()
           
 FieldBinding resolveTypeFor(FieldBinding field)
           
 MethodBinding resolveTypesFor(MethodBinding method)
           
 AnnotationHolder retrieveAnnotationHolder(Binding binding, boolean forceInitialization)
           
 void setFields(FieldBinding[] fields)
           
 void setMethods(MethodBinding[] methods)
           
 int sourceEnd()
           
 int sourceStart()
           
 ReferenceBinding superclass()
           
 ReferenceBinding[] superInterfaces()
           
 FieldBinding[] syntheticFields()
          Answer the collection of synthetic fields to append into the classfile
 SyntheticMethodBinding[] syntheticMethods()
           
 void tagIndirectlyAccessibleMembers()
           
 String toString()
           
 TypeVariableBinding[] typeVariables()
           
 FieldBinding[] unResolvedFields()
           
 
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
availableFields, availableMethods, binarySearch, binarySearch, canBeInstantiated, canBeSeenBy, canBeSeenBy, canBeSeenBy, computeGenericTypeSignature, computeId, constantPoolName, debugName, depth, detectAnnotationCycle, enclosingTypeAt, enumConstantCount, fieldCount, getAccessFlags, getAnnotations, getEnclosingInstancesSlotSize, getFileName, getMemberType, getMethods, getOuterLocalVariablesSlotSize, getPackage, getTypeVariable, 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, setAnnotations, shortReadableName, signature, sortFields, sortMethods, sourceName, syntheticEnclosingInstanceTypes, syntheticOuterLocalVariables
 
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.TypeBinding
capture, closestMatch, collectMissingTypes, collectSubstitutes, dimensions, enclosingType, 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, isParameter, isValidBinding, isVolatile, problemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

superclass

public ReferenceBinding superclass

superInterfaces

public ReferenceBinding[] superInterfaces

memberTypes

public ReferenceBinding[] memberTypes

typeVariables

public TypeVariableBinding[] typeVariables

scope

public ClassScope scope
Constructor Detail

SourceTypeBinding

public SourceTypeBinding(char[][] compoundName,
                         PackageBinding fPackage,
                         ClassScope scope)
Method Detail

addSyntheticFieldForInnerclass

public FieldBinding addSyntheticFieldForInnerclass(LocalVariableBinding actualOuterLocalVariable)

addSyntheticFieldForInnerclass

public FieldBinding addSyntheticFieldForInnerclass(ReferenceBinding enclosingType)

addSyntheticFieldForClassLiteral

public FieldBinding addSyntheticFieldForClassLiteral(TypeBinding targetType,
                                                     BlockScope blockScope)

addSyntheticFieldForAssert

public FieldBinding addSyntheticFieldForAssert(BlockScope blockScope)

addSyntheticFieldForEnumValues

public FieldBinding addSyntheticFieldForEnumValues()

addSyntheticMethod

public SyntheticMethodBinding addSyntheticMethod(FieldBinding targetField,
                                                 boolean isReadAccess,
                                                 boolean isSuperAccess)

addSyntheticEnumMethod

public SyntheticMethodBinding addSyntheticEnumMethod(char[] selector)

addSyntheticFieldForSwitchEnum

public SyntheticFieldBinding addSyntheticFieldForSwitchEnum(char[] fieldName,
                                                            String key)

addSyntheticMethodForSwitchEnum

public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding)

addSyntheticMethodForEnumInitialization

public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin,
                                                                      int end)

addSyntheticMethod

public SyntheticMethodBinding addSyntheticMethod(MethodBinding targetMethod,
                                                 boolean isSuperAccess)

addSyntheticBridgeMethod

public SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge,
                                                       MethodBinding targetMethod)

addSyntheticBridgeMethod

public SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge)

kind

public int kind()
Overrides:
kind in class TypeBinding

computeUniqueKey

public char[] computeUniqueKey(boolean isLeaf)
Description copied from class: ReferenceBinding
p.X {} -> Lp/X;

Overrides:
computeUniqueKey in class ReferenceBinding

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

genericSignature

public char[] genericSignature()
superclass superinterface1 ... superinterfaceN ;U:Ljava/lang/Object;V::Ljava/lang/Runnable;:Ljava/lang/Cloneable;:Ljava/util/Map;>Ljava/lang/Exception;Ljava/lang/Runnable;


getAnnotationTagBits

public long getAnnotationTagBits()
Compute the tagbits for standard annotations. For source types, these could require lazily resolving corresponding annotation nodes, in case of forward references.

Overrides:
getAnnotationTagBits in class ReferenceBinding
See Also:
Binding.getAnnotationTagBits()

getDefaultAbstractMethods

public MethodBinding[] getDefaultAbstractMethods()

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

getMethods

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

getSyntheticField

public FieldBinding getSyntheticField(LocalVariableBinding actualOuterLocalVariable)

getSyntheticField

public FieldBinding getSyntheticField(ReferenceBinding targetEnclosingType,
                                      boolean onlyExactMatch)

getSyntheticBridgeMethod

public SyntheticMethodBinding getSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge)

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 Binding
See Also:
Binding.initializeDeprecatedAnnotationTagBits()

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

memberTypes

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

hasMemberTypes

public boolean hasMemberTypes()
Overrides:
hasMemberTypes in class ReferenceBinding

methods

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

resolveTypeFor

public FieldBinding resolveTypeFor(FieldBinding field)

resolveTypesFor

public MethodBinding resolveTypesFor(MethodBinding method)

retrieveAnnotationHolder

public AnnotationHolder retrieveAnnotationHolder(Binding binding,
                                                 boolean forceInitialization)
Overrides:
retrieveAnnotationHolder in class ReferenceBinding

setFields

public void setFields(FieldBinding[] fields)

setMethods

public void setMethods(MethodBinding[] methods)

sourceEnd

public final int sourceEnd()

sourceStart

public final int sourceStart()

superclass

public ReferenceBinding superclass()
Overrides:
superclass in class ReferenceBinding

superInterfaces

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

syntheticMethods

public SyntheticMethodBinding[] syntheticMethods()

syntheticFields

public FieldBinding[] syntheticFields()
Answer the collection of synthetic fields to append into the classfile


toString

public String toString()
Overrides:
toString in class Object

typeVariables

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

unResolvedFields

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

tagIndirectlyAccessibleMembers

public void tagIndirectlyAccessibleMembers()


Copyright © 2012. All Rights Reserved.