Class SourceTypeBinding
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding
- Direct Known Subclasses:
BinaryTypeBinding,HelperInterfaceBinding,NestedTypeBinding
-
Field Summary
FieldsModifier and TypeFieldDescriptionintbooleanbooleanprotected SourceTypeBindingprotected SourceTypeBindingbooleanFields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
compoundName, fPackage, LUB_GENERIC, modifiers, samProblemBinding, singleAbstractMethod, sourceNameFields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding
BOOLEAN, BYTE, CHAR, DOUBLE, extendedTagBits, FLOAT, id, INT, LONG, NULL, NUMERIC_TYPES, SHORT, tagBits, TYPE_USE_BINDING, typeAnnotations, VOIDFields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, DefaultLocationArrayContents, DefaultLocationField, DefaultLocationParameter, DefaultLocationReturnType, DefaultLocationsForTrueValue, DefaultLocationTypeArgument, DefaultLocationTypeBound, DefaultLocationTypeParameter, FIELD, GENERIC_TYPE, IMPORT, INTERSECTION_TYPE, INTERSECTION_TYPE18, LOCAL, METHOD, MODULE, NO_ANNOTATIONS, NO_COMPONENTS, NO_ELEMENT_VALUE_PAIRS, NO_EXCEPTIONS, NO_FIELDS, NO_MEMBER_TYPES, NO_METHODS, NO_MODULES, NO_NULL_DEFAULT, NO_PACKAGES, NO_PARAMETER_NAMES, NO_PARAMETERS, NO_PERMITTED_TYPES, NO_PLAIN_PACKAGES, NO_REFERENCE_TYPES, NO_SUPERINTERFACES, NO_TYPE_VARIABLES, NO_TYPES, NULL_UNSPECIFIED_BY_DEFAULT, NullnessDefaultMASK, PACKAGE, PARAMETERIZED_TYPE, PATTERN, POLY_TYPE, RAW_TYPE, RECORD_COMPONENT, TYPE, TYPE_PARAMETER, TYPE_USE, UNINITIALIZED_COMPONENTS, UNINITIALIZED_FIELDS, UNINITIALIZED_METHODS, UNINITIALIZED_REFERENCE_TYPES, VARIABLE, WILDCARD_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionSourceTypeBinding(char[][] compoundName, PackageBinding fPackage, ClassScope scope) SourceTypeBinding(SourceTypeBinding prototype) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddField(FieldBinding binding) voidaddMethod(MethodBinding binding) addSyntheticArrayMethod(ArrayBinding arrayType, int purpose, char[] selector) addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge) addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge, MethodBinding targetMethod) addSyntheticEnumMethod(char[] selector) addSyntheticFactoryMethod(MethodBinding privateConstructor, MethodBinding publicConstructor, TypeBinding[] enclosingInstances, char[] selector) addSyntheticFieldForAssert(BlockScope blockScope) addSyntheticFieldForInnerclass(LocalVariableBinding actualOuterLocalVariable) addSyntheticFieldForInnerclass(ReferenceBinding enclosingType) addSyntheticFieldForSwitchEnum(char[] fieldName, String key) addSyntheticMethod(LambdaExpression lambda) addSyntheticMethod(FieldBinding targetField, boolean isReadAccess, boolean isSuperAccess) addSyntheticMethod(MethodBinding targetMethod, boolean isSuperAccess) addSyntheticMethodForEnumInitialization(int begin, int end) addSyntheticMethodForSwitchEnum(TypeBinding enumBinding, SwitchStatement switchStatement) addSyntheticRecordComponentAccessor(RecordComponentBinding rcb, int index) addSyntheticRecordOverrideMethod(char[] selector, int index) booleancanBeSeenBy(Scope sco) Answer true if the receiver is visible to the type provided by the scope.checkAndAddSyntheticRecordComponentAccessors(MethodBinding[] methodBindings) checkAndAddSyntheticRecordMethods(MethodBinding[] methodBindings, int count) checkAndAddSyntheticRecordOverrideMethods(MethodBinding[] methodBindings, List<MethodBinding> implicitMethods) voidcleanUp()clone(TypeBinding immaterial) 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.voidchar[]computeUniqueKey(boolean isLeaf) p.X<T extends Y & I, U extends Y> -> Lp/X<TT;TU;>;voidfields()voidgenerateSyntheticFinalFieldInitialization(CodeStream codeStream) char[]<param1 ... paramN>superclass superinterface1 ... superinterfaceN <T:LY<TT;>;U:Ljava/lang/Object;V::Ljava/lang/Runnable;:Ljava/lang/Cloneable;:Ljava/util/Map;>Ljava/lang/Exception;Ljava/lang/Runnable;char[]Answer the receiver classfile signature.longCompute the tagbits for standard annotations.getComponent(char[] componentName, boolean needResolve) getExactConstructor(TypeBinding[] argumentTypes) getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) getExactMethodBase(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) getField(char[] fieldName, boolean needResolve) getField(char[] fieldName, boolean needResolve, InvocationSite site, Scope scope) Where multiple fields with the same name are defined, this will return the one most visible one...getFieldBase(char[] fieldName, boolean needResolve) getMemberType(char[] typeName) Find the member type with the given simple typeName.getMethods(char[] selector) getMethods(char[] selector, int suggestedParameterLength) getMethodsBase(char[] selector) getRecordComponent(char[] name) getRecordComponentAccessor(char[] name) Get the accessor method given the record component namegetSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge) getSyntheticField(LocalVariableBinding actualOuterLocalVariable) getSyntheticField(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) booleanprotected booleanhasMethodWithNumArgs(char[] selector, int numArgs) booleanhasTypeBit(int bit) Answer an additional bit characterizing this type, likeTypeIds.BitAutoCloseable.voidCompute the tag bits for @Deprecated annotations, avoiding resolving entire annotation if not necessary.booleanisEquivalentTo(TypeBinding otherType) Returns true if a type is identical to another one, or for generic types, true if compared to its raw type.booleanbooleanReturns true if the type hierarchy is connectedbooleanbooleanisNestmateOf(SourceTypeBinding other) booleanbooleanbooleanisRecord()booleanAnswer true if the receiver is an annotation which may be repeatable.booleanintkind()Returns the member types of this type sorted by simple name.methods()module()Return the primordial type from which the receiver was cloned.voidvoidremoveMethod(int index) voidremoveSyntheticRecordCanonicalConstructor(SyntheticMethodBinding implicitCanonicalConstructor) resolveTypeFor(FieldBinding field) resolveTypeFor(RecordComponentBinding component) resolveTypesFor(MethodBinding method) retrieveAnnotationHolder(Binding binding, boolean forceInitialization) setComponents(RecordComponentBinding[] comps) voidsetFields(FieldBinding[] fields) setMemberTypes(ReferenceBinding[] memberTypes) setMethods(MethodBinding[] methods) voidsetNestHost(SourceTypeBinding nestHost) setPermittedTypes(ReferenceBinding[] permittedTypes) setSuperClass(ReferenceBinding superClass) setSuperInterfaces(ReferenceBinding[] superInterfaces) setTypeVariables(TypeVariableBinding[] typeVariables) intintAnswer the collection of synthetic fields to append into the classfilevoidvoidtoString()Return this type minus its type annotationsReturn this type minus its toplevel null annotations.Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
acceptsNonNullDefault, actualType, appendNullAnnotation, applyCloseableClassWhitelists, applyCloseableInterfaceWhitelists, applyCloseableWhitelists, availableFields, availableMethods, binarySearch, binarySearch, canBeInstantiated, canBeSeenBy, canBeSeenBy, computeGenericTypeSignature, computeId, computeId, constantPoolName, debugName, depth, detectAnnotationCycle, detectWrapperResource, downwardsProjection, enclosingTypeAt, enumConstantCount, fieldCount, getAccessFlags, getAllEnumerableAvatars, getAnnotations, getEnclosingInstancesSlotSize, getFileName, getInterfaceAbstractContracts, getOuterLocalVariablesSlotSize, getPackage, getSingleAbstractMethod, getTypeVariable, hasEnclosingInstanceContext, hashCode, hasHierarchyCheckStarted, hasIncompatibleSuperType, hasNullBit, hasRestrictedAccess, implementsInterface, innerCanBeSeenBy, innerCanBeSeenBy, isAbstract, isAnnotationType, isBinaryBinding, isClass, isCompatibleWith, isConsistentIntersection, isDefault, isDeprecated, isDisjointFrom, isEnum, isFieldInitializationFinished, isFinal, isFunctionalInterface, isHierarchyBeingActivelyConnected, isHierarchyBeingConnected, isInterface, isNestmateOf, isNonSealed, isOrEnclosedByPrivateType, isPrivate, isProperType, isProtected, isPublic, isSealed, isStatic, isStrictfp, isSubtypeOf, isSubTypeOfRTL, isSuperclassOf, isThrowable, isUncheckedException, isUsed, isViewedAsDeprecated, nullAnnotatedReadableName, outermostEnclosingType, qualifiedSourceName, readableName, readableName, setAnnotations, setHierarchyCheckDone, shortReadableName, shortReadableName, signature, sortFields, sortMethods, sourceName, syntheticEnclosingInstanceTypes, upwardsProjectionMethods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding
annotatedDebugName, capture, closestMatch, collectMissingTypes, collectSubstitutes, dimensions, enclosingMethod, enclosingType, enterRecursiveFunction, equalsEquals, erasure, exitRecursiveFunction, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, getIntersectingTypes, getTypeAnnotations, hasNullTypeAnnotations, hasTypeAnnotations, hasValueBasedTypeAnnotation, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isBoxedPrimitiveType, isBoxingCompatibleWith, isCapture, isCompatibleWith, isFreeTypeVariable, isFunctionalType, isHierarchyInconsistent, isIntersectionType, isIntersectionType18, isLocalType, isMemberType, isNestedType, isNonDenotable, isNumericType, isParameterizedType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isPolyType, isPotentiallyCompatibleWith, isPrimitiveOrBoxedPrimitiveType, isPrimitiveType, isProvablyDistinct, isRawType, isRecordWithComponents, isReifiable, isTypeArgumentContainedBy, isTypeVariable, isUnboundWildcard, isUnresolvedType, isWildcard, leafComponentType, mentionsAny, needsUncheckedConversion, notEquals, original, qualifiedPackageName, setTypeAnnotations, signableName, sIsMoreSpecific, syntheticOuterLocalVariables, syntheticTypeVariablesMentioned, unboxedType, uncapture, updateTagBits, upwardsProjection, wellKnownBaseType, wellKnownTypeMethods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
computeUniqueKey, isParameter, isPatternVariable, isValid, isValidBinding, isVolatile, problemId, setAnnotations
-
Field Details
-
superclass
-
superInterfaces
-
fields
-
components
-
methods
-
memberTypes
-
typeVariables
-
permittedTypes
-
originalSuperclass
-
originalSuperInterfaces
-
privilegedHandler
-
memberFinder
-
typeFinder
-
scope
-
prototype
-
module
-
defaultNullness
public int defaultNullness -
externalAnnotationProvider
-
nestHost
-
isImplicit
public boolean isImplicit -
isVarArgs
public boolean isVarArgs -
supertypeAnnotationsUpdated
public boolean supertypeAnnotationsUpdated
-
-
Constructor Details
-
SourceTypeBinding
public SourceTypeBinding() -
SourceTypeBinding
-
SourceTypeBinding
-
-
Method Details
-
addSyntheticFieldForInnerclass
-
addSyntheticFieldForInnerclass
-
addSyntheticFieldForAssert
-
addSyntheticFieldForEnumValues
-
addSyntheticField
-
addSyntheticMethod
public SyntheticMethodBinding addSyntheticMethod(FieldBinding targetField, boolean isReadAccess, boolean isSuperAccess) -
addSyntheticEnumMethod
-
addSyntheticFieldForSwitchEnum
-
addSyntheticMethodForSwitchEnum
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding, SwitchStatement switchStatement) -
addSyntheticMethodForEnumInitialization
-
addSyntheticMethod
-
addSyntheticMethod
-
addSyntheticMethod
-
addSyntheticArrayMethod
public SyntheticMethodBinding addSyntheticArrayMethod(ArrayBinding arrayType, int purpose, char[] selector) -
addSyntheticFactoryMethod
public SyntheticMethodBinding addSyntheticFactoryMethod(MethodBinding privateConstructor, MethodBinding publicConstructor, TypeBinding[] enclosingInstances, char[] selector) -
addSyntheticBridgeMethod
public SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge, MethodBinding targetMethod) -
addSyntheticBridgeMethod
-
checkAndAddSyntheticRecordMethods
-
checkAndAddSyntheticRecordOverrideMethods
public List<MethodBinding> checkAndAddSyntheticRecordOverrideMethods(MethodBinding[] methodBindings, List<MethodBinding> implicitMethods) -
checkAndAddSyntheticRecordComponentAccessors
public List<MethodBinding> checkAndAddSyntheticRecordComponentAccessors(MethodBinding[] methodBindings) -
addSyntheticRecordCanonicalConstructor
-
removeSyntheticRecordCanonicalConstructor
public void removeSyntheticRecordCanonicalConstructor(SyntheticMethodBinding implicitCanonicalConstructor) -
addSyntheticRecordComponentAccessor
public SyntheticMethodBinding addSyntheticRecordComponentAccessor(RecordComponentBinding rcb, int index) -
addSyntheticRecordOverrideMethod
-
kind
public int kind()- Overrides:
kindin classTypeBinding
-
clone
Description copied from class:TypeBindingVirtual 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:
clonein classTypeBinding
-
computeUniqueKey
public char[] computeUniqueKey(boolean isLeaf) Description copied from class:ReferenceBindingp.X<T extends Y & I, U extends Y> -> Lp/X<TT;TU;>;- Overrides:
computeUniqueKeyin classReferenceBinding
-
components
- Overrides:
componentsin classTypeBinding
-
resolveTypeFor
-
fields
- Overrides:
fieldsin classTypeBinding
-
genericTypeSignature
public char[] genericTypeSignature()Description copied from class:TypeBindingAnswer the receiver classfile signature. Arrays and base types do not distinguish between signature() and constantPoolName(). NOTE: This method should only be used during/after code gen.- Overrides:
genericTypeSignaturein classTypeBinding- See Also:
-
genericSignature
public char[] genericSignature()<param1 ... paramN>superclass superinterface1 ... superinterfaceN <T:LY<TT;>;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. For type use bindings, this method still returns the tagbits corresponding to the type declaration binding.- Overrides:
getAnnotationTagBitsin classReferenceBinding- See Also:
-
isReadyForAnnotations
public boolean isReadyForAnnotations()- Overrides:
isReadyForAnnotationsin classTypeBinding
-
getDefaultAbstractMethods
-
getExactConstructor
- Overrides:
getExactConstructorin classReferenceBinding
-
getExactMethod
public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) - Overrides:
getExactMethodin classReferenceBinding
-
getExactMethodBase
public MethodBinding getExactMethodBase(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) -
getField
- Overrides:
getFieldin classReferenceBinding
-
getField
public FieldBinding getField(char[] fieldName, boolean needResolve, InvocationSite site, Scope scope) Description copied from class:ReferenceBindingWhere multiple fields with the same name are defined, this will return the one most visible one... Added for AspectJ to allow proper lookup with inter-type fields- Overrides:
getFieldin classReferenceBinding
-
getFieldBase
-
getComponent
- Overrides:
getComponentin classReferenceBinding
-
getMethods
- Overrides:
getMethodsin classReferenceBinding
-
getMethods
- Overrides:
getMethodsin classReferenceBinding
-
getMethodsBase
-
generateSyntheticFinalFieldInitialization
-
getSyntheticField
-
getSyntheticField
-
getSyntheticBridgeMethod
-
hasTypeBit
public boolean hasTypeBit(int bit) Description copied from class:TypeBindingAnswer an additional bit characterizing this type, likeTypeIds.BitAutoCloseable.- Overrides:
hasTypeBitin classTypeBinding
-
initializeDeprecatedAnnotationTagBits
public void initializeDeprecatedAnnotationTagBits()Description copied from class:BindingCompute the tag bits for @Deprecated annotations, avoiding resolving entire annotation if not necessary.- Overrides:
initializeDeprecatedAnnotationTagBitsin classBinding- See Also:
-
isEquivalentTo
Returns true if a type is identical to another one, or for generic types, true if compared to its raw type.- Overrides:
isEquivalentToin classTypeBinding
-
isGenericType
public boolean isGenericType()- Overrides:
isGenericTypein classTypeBinding
-
isHierarchyConnected
public boolean isHierarchyConnected()Description copied from class:ReferenceBindingReturns true if the type hierarchy is connected- Overrides:
isHierarchyConnectedin classReferenceBinding
-
isRepeatableAnnotationType
public boolean isRepeatableAnnotationType()Description copied from class:TypeBindingAnswer true if the receiver is an annotation which may be repeatable. Overridden as appropriate.- Overrides:
isRepeatableAnnotationTypein classTypeBinding
-
isTaggedRepeatable
public boolean isTaggedRepeatable()- Overrides:
isTaggedRepeatablein classBinding
-
canBeSeenBy
Description copied from class:ReferenceBindingAnswer true if the receiver is visible to the type provided by the scope.- Overrides:
canBeSeenByin classReferenceBinding
-
memberTypes
Description copied from class:ReferenceBindingReturns the member types of this type sorted by simple name.- Overrides:
memberTypesin classReferenceBinding
-
hasMemberTypes
public boolean hasMemberTypes()- Overrides:
hasMemberTypesin classReferenceBinding
-
methodsBase
-
permittedTypes
- Overrides:
permittedTypesin classTypeBinding
-
prototype
Description copied from class:TypeBindingReturn the primordial type from which the receiver was cloned. Not all types track a prototype, onlySourceTypeBinding,BinaryTypeBindingandUnresolvedReferenceBindingdo so as of now. In fact some types e.gParameterizedTypeBindingshould not do so. Deflecting a query to a prototype would lead to wrong results in the case ofParameterizedTypeBinding- Overrides:
prototypein classTypeBinding
-
isPrototype
public boolean isPrototype() -
isRecord
public boolean isRecord()- Overrides:
isRecordin classTypeBinding
-
isImplicitType
public boolean isImplicitType()- Overrides:
isImplicitTypein classReferenceBinding
-
containerAnnotationType
- Overrides:
containerAnnotationTypein classTypeBinding
-
resolveTypeFor
-
resolveTypesFor
-
evaluateNullAnnotations
public void evaluateNullAnnotations() -
hasMethodWithNumArgs
protected boolean hasMethodWithNumArgs(char[] selector, int numArgs) - Overrides:
hasMethodWithNumArgsin classReferenceBinding
-
retrieveAnnotationHolder
- Overrides:
retrieveAnnotationHolderin classReferenceBinding
-
setContainerAnnotationType
- Overrides:
setContainerAnnotationTypein classReferenceBinding
-
tagAsHavingDefectiveContainerType
public void tagAsHavingDefectiveContainerType()- Overrides:
tagAsHavingDefectiveContainerTypein classReferenceBinding
-
setComponents
-
setFields
-
setMemberTypes
-
setMethods
-
setPermittedTypes
-
setSuperClass
-
setSuperInterfaces
-
setTypeVariables
-
sourceEnd
public int sourceEnd() -
sourceStart
public int sourceStart() -
superclass
- Overrides:
superclassin classReferenceBinding
-
superInterfaces
- Overrides:
superInterfacesin classReferenceBinding
-
syntheticMethods
-
syntheticFields
Answer the collection of synthetic fields to append into the classfile -
toString
-
typeVariables
- Overrides:
typeVariablesin classTypeBinding
-
unannotated
Description copied from class:TypeBindingReturn this type minus its type annotations- Overrides:
unannotatedin classTypeBinding
-
withoutToplevelNullAnnotation
Description copied from class:TypeBindingReturn this type minus its toplevel null annotations. Any annotations on type arguments or bounds are retained.- Overrides:
withoutToplevelNullAnnotationin classTypeBinding
-
unResolvedFields
- Overrides:
unResolvedFieldsin classReferenceBinding
-
unResolvedComponents
- Overrides:
unResolvedComponentsin classReferenceBinding
-
tagIndirectlyAccessibleMembers
public void tagIndirectlyAccessibleMembers() -
module
- Overrides:
modulein classReferenceBinding
-
getNestHost
-
setNestHost
-
isNestmateOf
-
getImplicitComponentFields
-
getRecordComponent
- Overrides:
getRecordComponentin classReferenceBinding
-
getRecordComponentAccessor
Description copied from class:ReferenceBindingGet the accessor method given the record component name- Overrides:
getRecordComponentAccessorin classReferenceBinding- Parameters:
name- name of the record component- Returns:
- the method binding of the accessor if found, else null
-
computeRecordComponents
public void computeRecordComponents() -
cleanUp
public void cleanUp() -
addField
-
addMethod
-
removeMethod
public void removeMethod(int index) -
rememberTypeHierarchy
public void rememberTypeHierarchy() -
methods
- Overrides:
methodsin classReferenceBinding
-
getMemberType
Description copied from class:ReferenceBindingFind the member type with the given simple typeName. Benefits from the fact that the array ofReferenceBinding.memberTypes()is sorted.- Overrides:
getMemberTypein classReferenceBinding
-