Class ParameterizedTypeBinding
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.ParameterizedTypeBinding
- All Implemented Interfaces:
Substitution
- Direct Known Subclasses:
RawTypeBinding
A parameterized type encapsulates a type with type arguments,
-
Nested Class Summary
Nested classes/interfaces inherited from interface Substitution
Substitution.NullSubstitutionModifier and TypeInterfaceDescriptionstatic classDon't substitute any type variables. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RecordComponentBinding[]protected ReferenceBindingchar[]Fields inherited from class ReferenceBinding
compatibleCache, compoundName, DYSFUNCTIONAL_INTERFACE_EXCEPTION, fPackage, LUB_GENERIC, modifiers, samProblemBinding, singleAbstractMethod, sourceNameModifier 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
ConstructorsConstructorDescriptionParameterizedTypeBinding(ReferenceBinding type, TypeBinding[] arguments, ReferenceBinding enclosingType, LookupEnvironment environment) -
Method Summary
Modifier and TypeMethodDescriptionMay return an UnresolvedReferenceBinding.voidboundCheck(Scope scope, TypeReference[] argumentReferences) Iterate type arguments, and validate them according to corresponding variable bounds.booleanAnswer true if the receiver can be instantiatedPerform capture conversion for a parameterized type with wildcard argumentsclone(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.protected Stream<MethodBinding> collateFunctionalInterfaceContracts(Scope scope, boolean replaceWildcards, Set<ReferenceBinding> visitedInterfaces) collectMissingTypes(List<TypeBinding> missingTypes) Iterate through the type components to collect instances of leaf missing typesvoidchar[]computeUniqueKey(boolean isLeaf) p.X<T extends Y & I, U extends Y> -> Lp/X<TT;TU;>;char[]Answer the receiver's constant pool name.createParameterizedMethod(MethodBinding originalMethod) downwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) Perform a downwards type projection as per JLS 4.10.5Returns the lookup environmenterasure()intfields()findSuperTypeOriginatingFrom(TypeBinding otherType) Find supertype which originates from a given type, or null if not foundReturn the original generic type from which the parameterized type got instantiated from.char[]Ltype<param1 ... paramN>; LY<TT;>;getAnnotations(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) getExactMethodBase(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...getMethods(char[] selector) getMethodsBase(char[] selector) getNonWildcardParameterization(BlockScope blockScope) getNonWildcardParameters(Scope scope) intgetSingleAbstractMethod(Scope scope, boolean replaceWildcards) Return the single abstract method of a functional interface, or one ofnullorReferenceBinding.samProblemBinding, if the receiver is not a functional interface as defined in JLS 9.8.getSingleAbstractMethod(Scope scope, boolean replaceWildcards, int start, int end) booleanprotected booleanhasMethodWithNumArgs(char[] selector, int numArgs) booleanhasTypeBit(int bit) Answer an additional bit characterizing this type, likeTypeIds.BitAutoCloseable.booleanbooleanimplementsMethod(MethodBinding method) protected voidbooleanReturns true if parameterized type AND not of the formList<?>booleanisEquivalentTo(TypeBinding otherType) Returns true if a type is identical to another one, or for generic types, true if compared to its raw type.booleanReturns true if the type hierarchy is connectedbooleanReturns true if the type is parameterized, e.g.booleanisProperType(boolean admitCapture18) JLS8 Sect 18.1.1booleanReturns true for raw substitutionbooleanisRecord()intkind()Returns the member types of this type sorted by simple name.booleanmentionsAny(TypeBinding[] parameters, int idx) Does this type mention any of the given type parameters, except the one at position 'idx'?methods()char[]nullAnnotatedReadableName(CompilerOptions options, boolean shortNames) Answer a readable name (for error reporting) that includes nullness type annotations.intDefine to be able to get the computeId() for the inner type binding.char[]Answer the qualified name of the receiver's package separated by periods or an empty string if its the default package.char[]Answer the source name for the type.char[]Answer the receiver's signature.char[]readableName(boolean showGenerics) char[]char[]shortReadableName(boolean showGenerics) char[]Answer the receiver classfile signature.char[]substitute(TypeVariableBinding originalVariable) Returns the type substitute for a given type variable, or itself if no substitution got performed.voidswapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) toString()intReturn this type minus its type annotationsPerform capture deconversion for a parameterized type with captured wildcard argumentslongRefresh some tagBits from details into the main type.upwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) Perform an upwards type projection as per JLS 4.10.5Return this type minus its toplevel null annotations.Methods inherited from class ReferenceBinding
acceptsNonNullDefault, appendNullAnnotation, applyCloseableClassWhitelists, applyCloseableInterfaceWhitelists, applyCloseableWhitelists, availableFields, availableMethods, binarySearch, binarySearch, canBeSeenBy, canBeSeenBy, canBeSeenBy, computeGenericTypeSignature, computeId, depth, detectAnnotationCycle, detectWrapperResource, enclosingTypeAt, enumConstantCount, getAccessFlags, getAllEnumerableAvatars, getFileName, getFunctionalInterfaceAbstractContracts, getMemberType, getMethods, getPackage, getRecordComponent, getRecordComponentAccessor, getRecordComponents, 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, isImplicitType, isInterface, isNestmateOf, isNonSealed, isOrEnclosedByPrivateType, isPrivate, isProtected, isPublic, isSealed, isStatic, isStrictfp, isSubtypeOf, isSubTypeOfRTL, isSuperclassOf, isThrowable, isUncheckedException, isUsed, module, outermostEnclosingType, retrieveAnnotationHolder, setAnnotations, setContainerAnnotationType, setHierarchyCheckDone, sortFields, sortMethods, tagAsHavingDefectiveContainerType, typeArgumentsIncludingEnclosing, typeVariablesIncludingEnclosingModifier 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.booleancanBeSeenBy(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.char[]computeGenericTypeSignature(TypeVariableBinding[] typeVariables) voidcomputeId(LookupEnvironment environment) intdepth()booleanvoidfinal ReferenceBindingenclosingTypeAt(int relativeDepth) intfinal intchar[]getFunctionalInterfaceAbstractContracts(Scope scope, boolean replaceWildcards) getMemberType(char[] typeName) Find the member type with the given simple typeName.getMethods(char[] selector, int suggestedParameterLength) getRecordComponent(char[] name) getRecordComponentAccessor(char[] name) Get the accessor method given the record component namegetTypeVariable(char[] variableName) booleaninthashCode()booleanbooleanhasIncompatibleSuperType(ReferenceBinding otherType) Returns true if the two types have an incompatible common supertype, e.g.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 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 visibilityfinal booleanAnswer true if the receiver has protected visibilityfinal booleanisPublic()Answer true if the receiver has public visibilitybooleanisSealed()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 locallymodule()final ReferenceBindingretrieveAnnotationHolder(Binding binding, boolean forceInitialization) voidsetAnnotations(AnnotationBinding[] annotations, boolean forceStore) voidvoidstatic 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 quicksortvoidreturn all type variables involved left to rightMethods inherited from class TypeBinding
closestMatch, containerAnnotationType, dimensions, enclosingMethod, enterRecursiveFunction, equalsEquals, exitRecursiveFunction, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, getIntersectingTypes, getTypeAnnotations, hasNullTypeAnnotations, hasTypeAnnotations, isAnonymousType, isArrayType, isBaseType, isBoxedPrimitiveType, isBoxingCompatibleWith, isCapture, isCompatibleWith, isFreeTypeVariable, isFunctionalType, isGenericType, isHierarchyInconsistent, isIntersectionType, isIntersectionType18, isLocalType, isMemberType, isNestedType, isNonDenotable, isNumericType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isPolyType, isPotentiallyCompatibleWith, isPrimitiveOrBoxedPrimitiveType, isPrimitiveType, isProvablyDistinct, isRawType, isReadyForAnnotations, isRecordWithComponents, isReifiable, isRepeatableAnnotationType, isTypeArgumentContainedBy, isTypeVariable, isUnboundWildcard, isUnresolvedType, isWildcard, leafComponentType, needsUncheckedConversion, notEquals, original, prototype, setTypeAnnotations, signableName, sIsMoreSpecific, syntheticTypeVariablesMentioned, unboxedType, upwardsProjection, wellKnownBaseType, wellKnownTypeModifier and TypeMethodDescriptionIn case of problems, returns the closest match found.intbooleanCall this before descending into type details to prevent infinite recursion.static booleanequalsEquals(TypeBinding that, TypeBinding other) voidExit the context of a potentially recursive function.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.genericCast(TypeBinding targetType) Returns the type to use for generic cast, or null if none requiredgetErasureCompatibleType(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 booleanfinal booleanfinal booleanfinal booleanbooleanbooleanisBoxingCompatibleWith(TypeBinding right, Scope scope) booleanReturns true if the type is the capture of some wildcardbooleanisCompatibleWith(TypeBinding right) 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 booleanfinal 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 wildcardbooleanneedsUncheckedConversion(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.voidsetTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) char[]booleansIsMoreSpecific(TypeBinding s, TypeBinding t, Scope scope) upwardsProjection(Scope scope) 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 bindingMethods inherited from class Binding
computeUniqueKey, initializeDeprecatedAnnotationTagBits, isParameter, isPatternVariable, isTaggedRepeatable, isValid, isValidBinding, isVolatile, setAnnotationsModifier and TypeMethodDescriptionchar[]voidCompute the tag bits for @Deprecated annotations, avoiding resolving entire annotation if not necessary.booleanbooleanbooleanstatic booleanfinal booleanbooleanvoidsetAnnotations(AnnotationBinding[] annotations, Scope scope, boolean forceStore)
-
Field Details
-
type
-
arguments
-
environment
-
genericTypeSignature
public char[] genericTypeSignature -
superclass
-
superInterfaces
-
fields
-
components
-
memberTypes
-
methods
-
enclosingType
-
-
Constructor Details
-
ParameterizedTypeBinding
public ParameterizedTypeBinding(ReferenceBinding type, TypeBinding[] arguments, ReferenceBinding enclosingType, LookupEnvironment environment)
-
-
Method Details
-
actualType
May return an UnresolvedReferenceBinding.- Overrides:
actualTypein classReferenceBinding- See Also:
-
isParameterizedType
public boolean isParameterizedType()Description copied from class:TypeBindingReturns true if the type is parameterized, e.g.List<String>. Note that some instances of ParameterizedTypeBinding have no arguments, like for non-generic members of a parameterized type. UseTypeBinding.isParameterizedTypeWithActualArguments()instead to find out.- Overrides:
isParameterizedTypein classTypeBinding
-
isRecord
public boolean isRecord()- Overrides:
isRecordin classReferenceBinding
-
components
- Overrides:
componentsin classTypeBinding
-
boundCheck
Iterate type arguments, and validate them according to corresponding variable bounds. -
canBeInstantiated
public boolean canBeInstantiated()Description copied from class:ReferenceBindingAnswer true if the receiver can be instantiated- Overrides:
canBeInstantiatedin classReferenceBinding- See Also:
-
findSuperTypeOriginatingFrom
Description copied from class:TypeBindingFind supertype which originates from a given type, or null if not found- Overrides:
findSuperTypeOriginatingFromin classTypeBinding
-
capture
Perform capture conversion for a parameterized type with wildcard arguments- Overrides:
capturein classTypeBinding- See Also:
-
uncapture
Perform capture deconversion for a parameterized type with captured wildcard arguments- Overrides:
uncapturein classTypeBinding- See Also:
-
collectMissingTypes
Description copied from class:TypeBindingIterate through the type components to collect instances of leaf missing types- Overrides:
collectMissingTypesin classTypeBinding- Returns:
- missing types
- See Also:
-
computeId
public void computeId()- Overrides:
computeIdin classReferenceBinding- See Also:
-
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
-
constantPoolName
public char[] constantPoolName()Description copied from class:ReferenceBindingAnswer the receiver's constant pool name. NOTE: This method should only be used during/after code gen.- Overrides:
constantPoolNamein classReferenceBinding- See Also:
-
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
-
createParameterizedMethod
-
debugName
- Overrides:
debugNamein classReferenceBinding- See Also:
-
annotatedDebugName
- Overrides:
annotatedDebugNamein classTypeBinding
-
enclosingType
- Overrides:
enclosingTypein classTypeBinding- See Also:
-
environment
Description copied from interface:SubstitutionReturns the lookup environment- Specified by:
environmentin interfaceSubstitution- See Also:
-
erasure
- Overrides:
erasurein classTypeBinding- See Also:
-
upwardsProjection
Description copied from class:TypeBindingPerform an upwards type projection as per JLS 4.10.5- Overrides:
upwardsProjectionin classTypeBinding- Parameters:
scope- Relevant scope for evaluating type projectionmentionedTypeVariables- Filter for mentioned type variables- Returns:
- Upwards type projection of 'this', or null if upwards projection is undefined
-
downwardsProjection
Description copied from class:TypeBindingPerform a downwards type projection as per JLS 4.10.5- Overrides:
downwardsProjectionin classTypeBinding- Parameters:
scope- Relevant scope for evaluating type projectionmentionedTypeVariables- Filter for mentioned type variables- Returns:
- Downwards type projection of 'this', or null if downwards projection is undefined
-
fieldCount
public int fieldCount()- Overrides:
fieldCountin classReferenceBinding- See Also:
-
fields
- Overrides:
fieldsin classTypeBinding- See Also:
-
genericType
Return the original generic type from which the parameterized type got instantiated from. This will perform lazy resolution automatically if needed.- See Also:
-
genericTypeSignature
public char[] genericTypeSignature()Ltype<param1 ... paramN>; LY<TT;>;- Overrides:
genericTypeSignaturein classTypeBinding
-
getAnnotations
- Overrides:
getAnnotationsin classReferenceBinding- Returns:
- the JSR 175 annotations for this type.
-
getAnnotations
Description copied from class:ReferenceBindingGet annotations, but request initialization only for specific ones- Overrides:
getAnnotationsin classReferenceBinding- 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 classReferenceBinding- See Also:
-
getEnclosingInstancesSlotSize
public int getEnclosingInstancesSlotSize()- Overrides:
getEnclosingInstancesSlotSizein classReferenceBinding- Returns:
- the enclosingInstancesSlotSize
-
getExactConstructor
- Overrides:
getExactConstructorin classReferenceBinding- See Also:
-
getExactMethodBase
public MethodBinding getExactMethodBase(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) - See Also:
-
getField
- Overrides:
getFieldin classReferenceBinding- See Also:
-
getMethodsBase
- See Also:
-
getOuterLocalVariablesSlotSize
public int getOuterLocalVariablesSlotSize()- Overrides:
getOuterLocalVariablesSlotSizein classReferenceBinding- Returns:
- the outerLocalVariablesSlotSize
-
hasMemberTypes
public boolean hasMemberTypes()- Overrides:
hasMemberTypesin classReferenceBinding
-
hasTypeBit
public boolean hasTypeBit(int bit) Description copied from class:TypeBindingAnswer an additional bit characterizing this type, likeTypeIds.BitAutoCloseable.- Overrides:
hasTypeBitin classTypeBinding
-
hasMethodWithNumArgs
protected boolean hasMethodWithNumArgs(char[] selector, int numArgs) - Overrides:
hasMethodWithNumArgsin classReferenceBinding
-
hasValueBasedTypeAnnotation
public boolean hasValueBasedTypeAnnotation()- Overrides:
hasValueBasedTypeAnnotationin classTypeBinding
-
implementsMethod
- See Also:
-
initializeArguments
protected void initializeArguments() -
isBoundParameterizedType
public boolean isBoundParameterizedType()Description copied from class:TypeBindingReturns true if parameterized type AND not of the formList<?>- Overrides:
isBoundParameterizedTypein classTypeBinding
-
isEquivalentTo
Description copied from class:TypeBindingReturns true if a type is identical to another one, or for generic types, true if compared to its raw type.- Overrides:
isEquivalentToin classTypeBinding
-
isHierarchyConnected
public boolean isHierarchyConnected()Description copied from class:ReferenceBindingReturns true if the type hierarchy is connected- Overrides:
isHierarchyConnectedin classReferenceBinding
-
isProperType
public boolean isProperType(boolean admitCapture18) Description copied from class:TypeBindingJLS8 Sect 18.1.1- Overrides:
isProperTypein classReferenceBinding- 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.
-
isRawSubstitution
public boolean isRawSubstitution()Description copied from interface:SubstitutionReturns true for raw substitution- Specified by:
isRawSubstitutionin interfaceSubstitution- See Also:
-
permittedTypes
- Overrides:
permittedTypesin 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
-
kind
public int kind()- Overrides:
kindin classTypeBinding
-
memberTypes
Description copied from class:ReferenceBindingReturns the member types of this type sorted by simple name.- Overrides:
memberTypesin classReferenceBinding- See Also:
-
mentionsAny
Description copied from class:TypeBindingDoes this type mention any of the given type parameters, except the one at position 'idx'?- Overrides:
mentionsAnyin classTypeBinding
-
methods
- Overrides:
methodsin classReferenceBinding- See Also:
-
problemId
-
qualifiedPackageName
public char[] qualifiedPackageName()Description copied from class:TypeBindingAnswer the qualified name of the receiver's package separated by periods or an empty string if its the default package. For example, {java.util}.- Overrides:
qualifiedPackageNamein classTypeBinding- See Also:
-
qualifiedSourceName
public char[] qualifiedSourceName()Description copied from class:ReferenceBindingAnswer 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".- Overrides:
qualifiedSourceNamein classReferenceBinding- See Also:
-
readableName
public char[] readableName()Description copied from class:ReferenceBindingAnswer the receiver's signature. NOTE: This method should only be used during/after code gen.- Overrides:
readableNamein classReferenceBinding- See Also:
-
readableName
public char[] readableName(boolean showGenerics) - Overrides:
readableNamein classReferenceBinding
-
shortReadableName
public char[] shortReadableName()- Overrides:
shortReadableNamein classReferenceBinding- See Also:
-
shortReadableName
public char[] shortReadableName(boolean showGenerics) - Overrides:
shortReadableNamein classReferenceBinding
-
nullAnnotatedReadableName
Description copied from class:TypeBindingAnswer a readable name (for error reporting) that includes nullness type annotations.- Overrides:
nullAnnotatedReadableNamein classReferenceBinding- See Also:
-
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 classReferenceBinding- See Also:
-
sourceName
public char[] sourceName()- Overrides:
sourceNamein classReferenceBinding- See Also:
-
substitute
Description copied from interface:SubstitutionReturns the type substitute for a given type variable, or itself if no substitution got performed.- Specified by:
substitutein interfaceSubstitution- See Also:
-
superclass
- Overrides:
superclassin classReferenceBinding- See Also:
-
superInterfaces
- Overrides:
superInterfacesin classReferenceBinding- See Also:
-
swapUnresolved
public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) -
syntheticEnclosingInstanceTypes
- Overrides:
syntheticEnclosingInstanceTypesin classReferenceBinding- See Also:
-
syntheticOuterLocalVariables
- Overrides:
syntheticOuterLocalVariablesin classTypeBinding- See Also:
-
toString
-
typeVariables
- Overrides:
typeVariablesin classTypeBinding
-
typeArguments
-
typeArgumentDepth
public int typeArgumentDepth()- Overrides:
typeArgumentDepthin classTypeBinding
-
unResolvedFields
- Overrides:
unResolvedFieldsin classReferenceBinding
-
collateFunctionalInterfaceContracts
protected Stream<MethodBinding> collateFunctionalInterfaceContracts(Scope scope, boolean replaceWildcards, Set<ReferenceBinding> visitedInterfaces) throws org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.DysfunctionalInterfaceException - Overrides:
collateFunctionalInterfaceContractsin classReferenceBinding- 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 ofnullorReferenceBinding.samProblemBinding, 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 classReferenceBinding- 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
nullorReferenceBinding.samProblemBinding, if the receiver is not a functional interface.
-
getSingleAbstractMethod
public MethodBinding getSingleAbstractMethod(Scope scope, boolean replaceWildcards, int start, int end) -
getNonWildcardParameters
-
getNonWildcardParameterization
-
updateTagBits
public long updateTagBits()Description copied from class:TypeBindingRefresh some tagBits from details into the main type. Currently handled: TagBits.HasNullTypeAnnotation- Overrides:
updateTagBitsin classTypeBinding
-
getField
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
-
getExactMethod
public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) - Overrides:
getExactMethodin classReferenceBinding
-
getMethods
- Overrides:
getMethodsin classReferenceBinding
-