Class ReferenceBinding
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
- Direct Known Subclasses:
IntersectionTypeBinding18, ParameterizedTypeBinding, ProblemReferenceBinding, SourceTypeBinding, TypeVariableBinding, UnresolvedReferenceBinding, WildcardBinding
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<TypeBinding, Boolean> char[][]protected static final org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.DysfunctionalInterfaceExceptionstatic final ReferenceBindingintprotected static ProblemMethodBindingprotected MethodBinding[]char[]Fields inherited from class TypeBinding
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, id, INT, LONG, NULL, NUMERIC_TYPES, SHORT, TYPE_USE_BINDING, typeAnnotations, VOIDModifier and TypeFieldDescriptionstatic final BaseTypeBindingstatic final BaseTypeBindingstatic final BaseTypeBindingstatic final BaseTypeBindingstatic final BaseTypeBindingintstatic final BaseTypeBindingBase type definitionsstatic final BaseTypeBindingstatic final NullTypeBindingstatic final TypeBinding[]static final BaseTypeBindingstatic final ReferenceBindingprotected AnnotationBinding[]static final VoidTypeBindingFields inherited from class Binding
ANY_EXCEPTION, ARRAY_TYPE, AWAITED_ANNOTATIONS, BASE_TYPE, DefaultLocationArrayContents, DefaultLocationField, DefaultLocationParameter, DefaultLocationRecordComponent, DefaultLocationReturnType, DefaultLocationsForTrueValue, DefaultLocationTypeArgument, DefaultLocationTypeBound, DefaultLocationTypeParameter, extendedTagBits, 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, tagBits, TYPE, TYPE_PARAMETER, TYPE_USE, UNINITIALIZED_COMPONENTS, UNINITIALIZED_FIELDS, UNINITIALIZED_METHODS, UNINITIALIZED_REFERENCE_TYPES, VARIABLE, WILDCARD_TYPEModifier and TypeFieldDescriptionstatic final ReferenceBinding[]static final intstatic final AnnotationBinding[]static final intstatic final intBit in defaultNullness bit vectors, representing the enum constant DefaultLocation#ARRAY_CONTENTSstatic final intBit in defaultNullness bit vectors, representing the enum constant DefaultLocation#FIELDstatic final intBit in defaultNullness bit vectors, representing the enum constant DefaultLocation#PARAMETERstatic final intBit in defaultNullness bit vectors, representing the enum constant DefaultLocation#RECORD_COMPONENTstatic final intBit in defaultNullness bit vectors, representing the enum constant DefaultLocation#RETURN_TYPEstatic final intstatic final intBit in defaultNullness bit vectors, representing the enum constant DefaultLocation#TYPE_ARGUMENTstatic final intBit in defaultNullness bit vectors, representing the enum constant DefaultLocation#TYPE_BOUNDstatic final intBit in defaultNullness bit vectors, representing the enum constant DefaultLocation#TYPE_PARAMETERintstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final AnnotationBinding[]static final RecordComponentBinding[]static final ElementValuePair[]static final ReferenceBinding[]static final FieldBinding[]static final ReferenceBinding[]static final MethodBinding[]static final ModuleBinding[]static final intstatic final PackageBinding[]static final char[][]static final TypeBinding[]static final ReferenceBinding[]static final PlainPackageBinding[]static final ReferenceBinding[]static final ReferenceBinding[]static final TypeVariableBinding[]static final TypeBinding[]static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intlongstatic final intstatic final intstatic final intstatic final RecordComponentBinding[]static final FieldBinding[]static final MethodBinding[]static final ReferenceBinding[]static final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanUsed to implement this sentence from o.e.j.annotation.DefaultLocation: "Wildcards and the use of type variables are always excluded from NonNullByDefault."protected voidappendNullAnnotation(StringBuilder nameBuffer, CompilerOptions options) protected intprotected intprotected intapplyCloseableWhitelists(CompilerOptions options) Return the array of resolvable fields (resilience)Return the array of resolvable methods (resilience)static FieldBindingbinarySearch(char[] name, FieldBinding[] sortedFields) static longbinarySearch(char[] selector, MethodBinding[] sortedMethods) Returns a combined range value representing:(start + (end<<32)), where start is the index of the first matching method (remember methods are sorted alphabetically on selectors), and end is the index of last contiguous methods with same selector.booleanAnswer true if the receiver can be instantiatedbooleancanBeSeenBy(PackageBinding invocationPackage) Answer true if the receiver is visible to the invocationPackage.booleancanBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invocationType) Answer true if the receiver is visible to the receiverType and the invocationType.booleancanBeSeenBy(Scope scope) Answer true if the receiver is visible to the type provided by the scope.protected Stream<MethodBinding> collateFunctionalInterfaceContracts(Scope scope, boolean replaceWildcards, Set<ReferenceBinding> visitedInterfaces) char[]computeGenericTypeSignature(TypeVariableBinding[] typeVariables) voidvoidcomputeId(LookupEnvironment environment) char[]computeUniqueKey(boolean isLeaf) p.X<T extends Y & I, U extends Y> -> Lp/X<TT;TU;>;char[]Answer the receiver's constant pool name.intdepth()booleanvoidfinal ReferenceBindingenclosingTypeAt(int relativeDepth) intintfinal intgetAnnotations(long requestedInitialization) Get annotations, but request initialization only for specific oneslongCompute the tagbits for standard annotations.intgetExactConstructor(TypeBinding[] argumentTypes) getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) getField(char[] fieldName, boolean needResolve) getField(char[] fieldName, boolean resolve, InvocationSite site, Scope scope) Where multiple fields with the same name are defined, this will return the one most visible one...char[]getFunctionalInterfaceAbstractContracts(Scope scope, boolean replaceWildcards) getMemberType(char[] typeName) Find the member type with the given simple typeName.getMethods(char[] selector) getMethods(char[] selector, int suggestedParameterLength) intgetRecordComponent(char[] name) getRecordComponentAccessor(char[] name) Get the accessor method given the record component namegetSingleAbstractMethod(Scope scope, boolean replaceWildcards) Return the single abstract method of a functional interface, or one ofnullorsamProblemBinding, if the receiver is not a functional interface as defined in JLS 9.8.getTypeVariable(char[] variableName) booleaninthashCode()booleanbooleanhasIncompatibleSuperType(ReferenceBinding otherType) Returns true if the two types have an incompatible common supertype, e.g.booleanprotected booleanhasMethodWithNumArgs(char[] selector, int numArgs) booleanhasNullBit(int mask) Query typeBits without triggering supertype lookup.final booleanbooleanimplementsInterface(ReferenceBinding anInterface, boolean searchHierarchy) Answer true if the receiver implements anInterface or is identical to anInterface.final booleaninnerCanBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invocationType) final booleaninnerCanBeSeenBy(Scope scope) final booleanAnswer true if the receiver is an abstract typebooleanfinal booleanbooleanisClass()booleanisCompatibleWith(TypeBinding otherType, Scope captureScope) Answer true if the receiver type can be assigned to the argument type (right) In addition to improving performance, caching also ensures there is no infinite regression since per nature, the compatibility check is recursive through parameterized type arguments (122775)static booleanisConsistentIntersection(TypeBinding[] intersectingTypes, boolean simulatingBugJDK8026527) final booleanAnswer true if the receiver has default visibilityfinal booleanAnswer true if the receiver is a deprecated typebooleanbooleanisEnum()protected booleanfinal booleanisFinal()Answer true if the receiver is final and cannot be subclassedbooleanisFunctionalInterface(Scope scope) booleanReturns true if the type hierarchy is being connected "actively" i.e not paused momentatrily, while resolving type arguments.booleanReturns true if the type hierarchy is being connectedbooleanReturns true if the type hierarchy is connectedboolean**booleanbooleanisNestmateOf(ReferenceBinding other) final booleanAnswer true if the receiver has non-sealed modifierfinal booleanAnswer true if the receiver or any of its enclosing types have private visibilityfinal booleanAnswer true if the receiver has private visibilitybooleanisProperType(boolean admitCapture18) JLS8 Sect 18.1.1final booleanAnswer true if the receiver has protected visibilityfinal booleanisPublic()Answer true if the receiver has public visibilitybooleanisRecord()booleanisSealed()Answer true if the receiver has sealed modifierfinal booleanisStatic()Answer true if the receiver is a static member type (or toplevel)final booleanAnswer true if all float operations must adher to IEEE 754 float/double rulesbooleanisSubtypeOf(TypeBinding other, boolean simulatingBugJDK8026527) protected booleanisSubTypeOfRTL(TypeBinding other) booleanisSuperclassOf(ReferenceBinding otherType) Answer true if the receiver is in the superclass hierarchy of aType NOTE: Object.isSuperclassOf(Object) -> falsebooleanReturns true if a given type may be thrownbooleanisUncheckedException(boolean includeSupertype) JLS 11.5 ensures that Throwable, Exception, RuntimeException and Error are directly connected.final booleanisUsed()Answer true if the receiver has private visibility and is used locallyReturns the member types of this type sorted by simple name.methods()module()char[]nullAnnotatedReadableName(CompilerOptions options, boolean shortNames) Answer a readable name (for error reporting) that includes nullness type annotations.final ReferenceBindingchar[]Answer the source name for the type.char[]Answer the receiver's signature.char[]readableName(boolean showGenerics) retrieveAnnotationHolder(Binding binding, boolean forceInitialization) voidsetAnnotations(AnnotationBinding[] annotations, boolean forceStore) voidvoidchar[]char[]shortReadableName(boolean showGenerics) char[]Answer the receiver classfile signature.static voidsortFields(FieldBinding[] sortedFields, int left, int right) Sort the field array using a quicksortstatic voidsortMethods(MethodBinding[] sortedMethods, int left, int right) Sort the field array using a quicksortchar[]voidreturn all type variables involved left to rightMethods inherited from class TypeBinding
annotatedDebugName, capture, clone, closestMatch, collectMissingTypes, components, containerAnnotationType, dimensions, downwardsProjection, enclosingMethod, enclosingType, enterRecursiveFunction, equalsEquals, erasure, exitRecursiveFunction, fields, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, genericTypeSignature, getErasureCompatibleType, getIntersectingTypes, getTypeAnnotations, hasNullTypeAnnotations, hasTypeAnnotations, hasTypeBit, hasValueBasedTypeAnnotation, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isBoxedPrimitiveType, isBoxingCompatibleWith, isCapture, isCompatibleWith, isEquivalentTo, isFreeTypeVariable, isFunctionalType, isGenericType, isHierarchyInconsistent, isIntersectionType, isIntersectionType18, isLocalType, isMemberType, isNestedType, isNonDenotable, isNumericType, isParameterizedType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isPolyType, isPotentiallyCompatibleWith, isPrimitiveOrBoxedPrimitiveType, isPrimitiveType, isProvablyDistinct, isRawType, isReadyForAnnotations, isRecordWithComponents, isReifiable, isRepeatableAnnotationType, isTypeArgumentContainedBy, isTypeVariable, isUnboundWildcard, isUnresolvedType, isWildcard, kind, leafComponentType, mentionsAny, needsUncheckedConversion, notEquals, original, permittedTypes, prototype, qualifiedPackageName, setTypeAnnotations, signableName, sIsMoreSpecific, syntheticOuterLocalVariables, syntheticTypeVariablesMentioned, typeArgumentDepth, typeVariables, unannotated, unboxedType, uncapture, updateTagBits, upwardsProjection, upwardsProjection, wellKnownBaseType, wellKnownType, withoutToplevelNullAnnotationModifier and TypeMethodDescriptionPerform capture conversion on a given type (only effective on parameterized type with wildcards)clone(TypeBinding enclosingType) 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.In case of problems, returns the closest match found.collectMissingTypes(List<TypeBinding> missingTypes) Iterate through the type components to collect instances of leaf missing typesintdownwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) Perform a downwards type projection as per JLS 4.10.5booleanCall this before descending into type details to prevent infinite recursion.static booleanequalsEquals(TypeBinding that, TypeBinding other) erasure()voidExit the context of a potentially recursive function.fields()findSuperTypeOriginatingFrom(int wellKnownOriginalID, boolean originalIsClass) Find supertype which originates from a given well-known type, or null if not found (using id avoids triggering the load of well-known type: 73740) NOTE: only works for erasures of well-known types, as random other types may share same id though being distincts.findSuperTypeOriginatingFrom(TypeBinding otherType) Find supertype which originates from a given type, or null if not foundgenericCast(TypeBinding targetType) Returns the type to use for generic cast, or null if none requiredchar[]Answer the receiver classfile signature.getErasureCompatibleType(TypeBinding declaringClass) Return the supertype which would erase as a subtype of a given declaring class.final AnnotationBinding[]booleanDoes this type or any of its details (array dimensions, type arguments) have a null type annotation?final booleanbooleanhasTypeBit(int bit) Answer an additional bit characterizing this type, likeTypeIds.BitAutoCloseable.booleanfinal booleanfinal booleanfinal booleanbooleanReturns true if parameterized type AND not of the formList<?>booleanbooleanisBoxingCompatibleWith(TypeBinding right, Scope scope) booleanReturns true if the type is the capture of some wildcardbooleanisCompatibleWith(TypeBinding right) booleanisEquivalentTo(TypeBinding otherType) Returns true if a type is identical to another one, or for generic types, true if compared to its raw type.booleanbooleanbooleanfinal booleanbooleanReturns true if the current type denotes an intersection type: Number andComparable<?>booleanfinal booleanfinal booleanfinal booleanbooleanDoes this type lack a class file representation on its own ?final booleanbooleanReturns true if the type is parameterized, e.g.final booleanReturns true if the type is parameterized, e.g.booleanReturns true if the type is parameterized using its own type variables as argumentsbooleanbooleanisPotentiallyCompatibleWith(TypeBinding right, Scope scope) final booleanfinal booleanbooleanisProvablyDistinct(TypeBinding otherType) Returns true if a type is provably distinct from another one,final booleanbooleanbooleanbooleanJLS(3) 4.7.booleanAnswer true if the receiver is an annotation which may be repeatable.booleanisTypeArgumentContainedBy(TypeBinding otherType) booleanReturns true if the type was declared as a type variablebooleanReturns true if wildcard type of the form '?' (no bound)booleanbooleanReturns true if the type is a wildcardintkind()booleanmentionsAny(TypeBinding[] parameters, int idx) Does this type mention any of the given type parameters, except the one at position 'idx'?booleanneedsUncheckedConversion(TypeBinding targetType) Meant to be invoked on compatible types, to figure if unchecked conversion is necessarystatic booleannotEquals(TypeBinding that, TypeBinding other) original()Returns the orignal generic type instantiated by the receiver type, or itself if not.Return the primordial type from which the receiver was cloned.char[]Answer the qualified name of the receiver's package separated by periods or an empty string if its the default package.voidsetTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) char[]booleansIsMoreSpecific(TypeBinding s, TypeBinding t, Scope scope) intReturn this type minus its type annotationsPerform capture "deconversion" on a given typelongRefresh some tagBits from details into the main type.upwardsProjection(Scope scope) Perform an upwards type projection as per JLS 4.10.5upwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) Perform an upwards type projection as per JLS 4.10.5static final TypeBindingwellKnownBaseType(int id) static final TypeBindingwellKnownType(Scope scope, int id) Match a well-known type id to its bindingReturn this type minus its toplevel null annotations.Methods inherited from class Binding
computeUniqueKey, initializeDeprecatedAnnotationTagBits, isParameter, isPatternVariable, isTaggedRepeatable, isValid, isValidBinding, isVolatile, problemId, setAnnotationsModifier and TypeMethodDescriptionchar[]voidCompute the tag bits for @Deprecated annotations, avoiding resolving entire annotation if not necessary.booleanbooleanbooleanstatic booleanfinal booleanbooleanintvoidsetAnnotations(AnnotationBinding[] annotations, Scope scope, boolean forceStore)
-
Field Details
-
compoundName
public char[][] compoundName -
sourceName
public char[] sourceName -
modifiers
public int modifiers -
fPackage
-
compatibleCache
-
singleAbstractMethod
-
DYSFUNCTIONAL_INTERFACE_EXCEPTION
protected static final org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.DysfunctionalInterfaceException DYSFUNCTIONAL_INTERFACE_EXCEPTION -
LUB_GENERIC
-
samProblemBinding
-
-
Constructor Details
-
ReferenceBinding
-
ReferenceBinding
public ReferenceBinding()
-
-
Method Details
-
getRecordComponentAccessor
Get the accessor method given the record component name- Parameters:
name- name of the record component- Returns:
- the method binding of the accessor if found, else null
-
binarySearch
-
binarySearch
Returns a combined range value representing:(start + (end<<32)), where start is the index of the first matching method (remember methods are sorted alphabetically on selectors), and end is the index of last contiguous methods with same selector. -1 means no method got found- Returns:
(start + (end<<32))or -1 if no method found
-
sortFields
Sort the field array using a quicksort -
sortMethods
Sort the field array using a quicksort -
availableFields
Return the array of resolvable fields (resilience) -
availableMethods
Return the array of resolvable methods (resilience) -
hasHierarchyCheckStarted
public boolean hasHierarchyCheckStarted() -
setHierarchyCheckDone
public void setHierarchyCheckDone() -
isFieldInitializationFinished
protected boolean isFieldInitializationFinished()- Returns:
- true, if the fields of the binding are fully initialized.
-
canBeInstantiated
public boolean canBeInstantiated()Answer true if the receiver can be instantiated- Overrides:
canBeInstantiatedin classTypeBinding
-
canBeSeenBy
Answer true if the receiver is visible to the invocationPackage. -
canBeSeenBy
Answer true if the receiver is visible to the receiverType and the invocationType. -
innerCanBeSeenBy
public final boolean innerCanBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invocationType) -
canBeSeenBy
Answer true if the receiver is visible to the type provided by the scope.- Overrides:
canBeSeenByin classTypeBinding
-
innerCanBeSeenBy
-
computeGenericTypeSignature
-
computeId
public void computeId() -
computeId
-
computeUniqueKey
public char[] computeUniqueKey(boolean isLeaf) p.X<T extends Y & I, U extends Y> -> Lp/X<TT;TU;>;- Overrides:
computeUniqueKeyin classBinding
-
constantPoolName
public char[] constantPoolName()Answer the receiver's constant pool name. NOTE: This method should only be used during/after code gen.- Specified by:
constantPoolNamein classTypeBinding
-
debugName
- Overrides:
debugNamein classTypeBinding
-
depth
public int depth()- Overrides:
depthin classTypeBinding
-
detectAnnotationCycle
public boolean detectAnnotationCycle() -
enclosingTypeAt
-
actualType
- Overrides:
actualTypein classTypeBinding
-
enumConstantCount
public int enumConstantCount()- Overrides:
enumConstantCountin classTypeBinding
-
fieldCount
public int fieldCount() -
getAccessFlags
public final int getAccessFlags() -
getAnnotations
- Overrides:
getAnnotationsin classBinding- Returns:
- the JSR 175 annotations for this type.
-
getAnnotations
Get annotations, but request initialization only for specific ones- Parameters:
requestedInitialization- uses the bits fromExtendedTagBits.DeprecatedAnnotationResolvedorExtendedTagBits.AllAnnotationsResolvedto request initialization of specific annotations (with option to select others in the future).
-
getAnnotationTagBits
public long getAnnotationTagBits()Description copied from class:BindingCompute 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 classBinding- See Also:
-
getRecordComponent
-
getRecordComponents
-
getEnclosingInstancesSlotSize
public int getEnclosingInstancesSlotSize()- Returns:
- the enclosingInstancesSlotSize
-
getExactConstructor
-
getExactMethod
public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) -
getField
-
getField
Where 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 -
getFileName
public char[] getFileName()- See Also:
-
getMemberType
Find the member type with the given simple typeName. Benefits from the fact that the array ofmemberTypes()is sorted. -
getMethods
- Overrides:
getMethodsin classTypeBinding
-
getMethods
-
getOuterLocalVariablesSlotSize
public int getOuterLocalVariablesSlotSize()- Returns:
- the outerLocalVariablesSlotSize
-
getPackage
- Specified by:
getPackagein classTypeBinding
-
getTypeVariable
-
hashCode
-
hasIncompatibleSuperType
Returns true if the two types have an incompatible common supertype, e.g.List<String>andList<Integer> -
hasMemberTypes
public boolean hasMemberTypes() -
acceptsNonNullDefault
public boolean acceptsNonNullDefault()Description copied from class:TypeBindingUsed to implement this sentence from o.e.j.annotation.DefaultLocation: "Wildcards and the use of type variables are always excluded from NonNullByDefault."- Overrides:
acceptsNonNullDefaultin classTypeBinding
-
hasRestrictedAccess
public final boolean hasRestrictedAccess() -
hasNullBit
public boolean hasNullBit(int mask) Query typeBits without triggering supertype lookup. -
implementsInterface
Answer true if the receiver implements anInterface or is identical to anInterface. If searchHierarchy is true, then also search the receiver's superclasses. NOTE: Assume that anInterface is an interface. -
isAbstract
public final boolean isAbstract()Answer true if the receiver is an abstract type -
isAnnotationType
public boolean isAnnotationType()- Overrides:
isAnnotationTypein classBinding
-
isBinaryBinding
public final boolean isBinaryBinding() -
isClass
public boolean isClass()- Overrides:
isClassin classTypeBinding
-
isRecord
public boolean isRecord()- Overrides:
isRecordin classTypeBinding
-
isNestmateOf
-
isProperType
public boolean isProperType(boolean admitCapture18) Description copied from class:TypeBindingJLS8 Sect 18.1.1- Overrides:
isProperTypein classTypeBinding- Parameters:
admitCapture18- request ifCaptureBinding18shuld be considered as a proper type. If unsure say 'true', only inScope.greaterLowerBound(TypeBinding[], Scope, LookupEnvironment)CaptureBinding18 has to be excluded to prevent an NPE on a branch that heuristically tries to avoid inconsistent intersections.
-
isCompatibleWith
Answer true if the receiver type can be assigned to the argument type (right) In addition to improving performance, caching also ensures there is no infinite regression since per nature, the compatibility check is recursive through parameterized type arguments (122775)- Specified by:
isCompatibleWithin classTypeBinding
-
isNonSealed
public final boolean isNonSealed()Answer true if the receiver has non-sealed modifier -
isSealed
public boolean isSealed()Answer true if the receiver has sealed modifier- Overrides:
isSealedin classTypeBinding
-
isSubtypeOf
- Overrides:
isSubtypeOfin classTypeBinding
-
isSubTypeOfRTL
-
isDefault
public final boolean isDefault()Answer true if the receiver has default visibility -
isDeprecated
public final boolean isDeprecated()Answer true if the receiver is a deprecated type -
isEnum
public boolean isEnum()- Overrides:
isEnumin classTypeBinding
-
isFinal
public final boolean isFinal()Answer true if the receiver is final and cannot be subclassed -
isHierarchyBeingConnected
public boolean isHierarchyBeingConnected()Returns true if the type hierarchy is being connected -
isHierarchyBeingActivelyConnected
public boolean isHierarchyBeingActivelyConnected()Returns true if the type hierarchy is being connected "actively" i.e not paused momentatrily, while resolving type arguments. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=294057 -
isHierarchyConnected
public boolean isHierarchyConnected()Returns true if the type hierarchy is connected -
isInterface
public boolean isInterface()- Overrides:
isInterfacein classTypeBinding
-
isFunctionalInterface
- Overrides:
isFunctionalInterfacein classTypeBinding
-
isPrivate
public final boolean isPrivate()Answer true if the receiver has private visibility -
isOrEnclosedByPrivateType
public final boolean isOrEnclosedByPrivateType()Answer true if the receiver or any of its enclosing types have private visibility -
isProtected
public final boolean isProtected()Answer true if the receiver has protected visibility -
isPublic
public final boolean isPublic()Answer true if the receiver has public visibility -
isStatic
public final boolean isStatic()Answer true if the receiver is a static member type (or toplevel)- Overrides:
isStaticin classTypeBinding
-
isStrictfp
public final boolean isStrictfp()Answer true if all float operations must adher to IEEE 754 float/double rules -
isSuperclassOf
Answer true if the receiver is in the superclass hierarchy of aType NOTE: Object.isSuperclassOf(Object) -> false -
isThrowable
public boolean isThrowable()Description copied from class:TypeBindingReturns true if a given type may be thrown- Overrides:
isThrowablein classTypeBinding- See Also:
-
isUncheckedException
public boolean isUncheckedException(boolean includeSupertype) JLS 11.5 ensures that Throwable, Exception, RuntimeException and Error are directly connected.(Throwable<- Exception <- RumtimeException, Throwable <- Error). Thus no need to check #isCompatibleWith but rather check in type IDs so as to avoid some eager class loading for JCL writers. When 'includeSupertype' is true, answers true if the given type can be a supertype of some unchecked exception type (i.e. Throwable or Exception).- Overrides:
isUncheckedExceptionin classTypeBinding- See Also:
-
isUsed
public final boolean isUsed()Answer true if the receiver has private visibility and is used locally -
isImplicitType
public boolean isImplicitType()** -
memberTypes
Returns the member types of this type sorted by simple name. -
methods
-
outermostEnclosingType
-
typeVariablesIncludingEnclosing
return all type variables involved left to right -
typeArgumentsIncludingEnclosing
-
qualifiedSourceName
public char[] qualifiedSourceName()Answer the source name for the type. In the case of member types, as the qualified name from its top level type. For example, for a member type N defined insideM & A: "A.M.N".- Specified by:
qualifiedSourceNamein classTypeBinding
-
readableName
public char[] readableName()Answer the receiver's signature. NOTE: This method should only be used during/after code gen.- Specified by:
readableNamein classBinding
-
readableName
public char[] readableName(boolean showGenerics) -
appendNullAnnotation
-
retrieveAnnotationHolder
-
setAnnotations
- Overrides:
setAnnotationsin classBinding
-
setContainerAnnotationType
-
tagAsHavingDefectiveContainerType
public void tagAsHavingDefectiveContainerType() -
nullAnnotatedReadableName
Description copied from class:TypeBindingAnswer a readable name (for error reporting) that includes nullness type annotations.- Overrides:
nullAnnotatedReadableNamein classTypeBinding- See Also:
-
shortReadableName
public char[] shortReadableName()- Overrides:
shortReadableNamein classBinding
-
shortReadableName
public char[] shortReadableName(boolean showGenerics) -
signature
public char[] signature()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:
signaturein classTypeBinding
-
sourceName
public char[] sourceName()- Specified by:
sourceNamein classTypeBinding
-
superclass
- Overrides:
superclassin classTypeBinding
-
superInterfaces
- Overrides:
superInterfacesin classTypeBinding
-
syntheticEnclosingInstanceTypes
-
unResolvedFields
-
applyCloseableClassWhitelists
-
hasMethodWithNumArgs
protected boolean hasMethodWithNumArgs(char[] selector, int numArgs) -
applyCloseableWhitelists
-
applyCloseableInterfaceWhitelists
-
detectWrapperResource
public void detectWrapperResource() -
getFunctionalInterfaceAbstractContracts
public MethodBinding[] getFunctionalInterfaceAbstractContracts(Scope scope, boolean replaceWildcards) throws org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.DysfunctionalInterfaceException - Throws:
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.DysfunctionalInterfaceException
-
collateFunctionalInterfaceContracts
protected Stream<MethodBinding> collateFunctionalInterfaceContracts(Scope scope, boolean replaceWildcards, Set<ReferenceBinding> visitedInterfaces) throws org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.DysfunctionalInterfaceException - Throws:
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.DysfunctionalInterfaceException
-
getSingleAbstractMethod
Description copied from class:TypeBindingReturn the single abstract method of a functional interface, or one ofnullorsamProblemBinding, if the receiver is not a functional interface as defined in JLS 9.8. In particularnullis answered if the receiver is not a reference type, or is a problem type.- Overrides:
getSingleAbstractMethodin classTypeBinding- Parameters:
scope- scopereplaceWildcards- Should wildcards be replaced following JLS 9.8? Say false for lambdas with explicit argument types which should apply 18.5.3- Returns:
- The single abstract method of a functional interface, or one of
nullorsamProblemBinding, if the receiver is not a functional interface.
-
isConsistentIntersection
public static boolean isConsistentIntersection(TypeBinding[] intersectingTypes, boolean simulatingBugJDK8026527) -
module
-
hasEnclosingInstanceContext
public boolean hasEnclosingInstanceContext()- Overrides:
hasEnclosingInstanceContextin classTypeBinding
-
getAllEnumerableAvatars
-
isDisjointFrom
-