Class ArrayBinding
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.ArrayBinding
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionArrayBinding(TypeBinding type, int dimensions, LookupEnvironment environment) -
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."In case of problems, returns the closest match found.collectMissingTypes(List<TypeBinding> missingTypes) Iterate through the type components to collect instances of leaf missing typeschar[]computeUniqueKey(boolean isLeaf) char[]Answer the receiver's constant pool name.intdownwardsProjection(Scope scope, TypeBinding[] mentionedTypeVariables) Perform a downwards type projection as per JLS 4.10.5erasure()char[]Answer the receiver classfile signature.getCloneMethod(MethodBinding originalMethod) The type of x.clone() is substituted from 'Object' into the type of the receiver array (non-null)inthashCode()static booleanisArrayClone(TypeBinding receiverType, MethodBinding binding) booleanisCompatibleWith(TypeBinding otherType, Scope captureScope) booleanisProperType(boolean admitCapture18) JLS8 Sect 18.1.1booleanisSubtypeOf(TypeBinding otherType, boolean simulatingBugJDK8026527) intkind()booleanmentionsAny(TypeBinding[] parameters, int idx) Does this type mention any of the given type parameters, except the one at position 'idx'?char[]nullAnnotatedReadableName(CompilerOptions options, boolean shortNames) Answer a readable name (for error reporting) that includes nullness type annotations.intchar[]Answer the source name for the type.char[]voidsetTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) char[]char[]voidswapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) toString()Return this type minus its type annotationsPerform capture "deconversion" on a given typelongRefresh 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 TypeBinding
actualType, canBeInstantiated, canBeSeenBy, capture, clone, components, containerAnnotationType, depth, enclosingMethod, enclosingType, enterRecursiveFunction, enumConstantCount, equalsEquals, exitRecursiveFunction, fields, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, getIntersectingTypes, getMethods, getSingleAbstractMethod, getTypeAnnotations, hasEnclosingInstanceContext, hasNullTypeAnnotations, hasTypeAnnotations, hasTypeBit, hasValueBasedTypeAnnotation, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isBoxedPrimitiveType, isBoxingCompatibleWith, isCapture, isClass, isCompatibleWith, isEnum, isEquivalentTo, isFreeTypeVariable, isFunctionalInterface, isFunctionalType, isGenericType, isHierarchyInconsistent, isInterface, isIntersectionType, isIntersectionType18, isLocalType, isMemberType, isNestedType, isNonDenotable, isNumericType, isParameterizedType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isPolyType, isPotentiallyCompatibleWith, isPrimitiveOrBoxedPrimitiveType, isPrimitiveType, isProvablyDistinct, isRawType, isReadyForAnnotations, isRecord, isRecordWithComponents, isReifiable, isRepeatableAnnotationType, isSealed, isStatic, isThrowable, isTypeArgumentContainedBy, isTypeVariable, isUnboundWildcard, isUncheckedException, isUnresolvedType, isWildcard, needsUncheckedConversion, notEquals, original, permittedTypes, prototype, qualifiedPackageName, signableName, signature, sIsMoreSpecific, superclass, superInterfaces, syntheticOuterLocalVariables, syntheticTypeVariablesMentioned, typeArgumentDepth, typeVariables, unboxedType, upwardsProjection, wellKnownBaseType, wellKnownTypeModifier and TypeMethodDescriptionbooleanbooleancanBeSeenBy(Scope scope) Perform 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.intdepth()booleanCall this before descending into type details to prevent infinite recursion.intstatic booleanequalsEquals(TypeBinding that, TypeBinding other) 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 requiredgetErasureCompatibleType(TypeBinding declaringClass) Return the supertype which would erase as a subtype of a given declaring class.getMethods(char[] selector) getSingleAbstractMethod(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.final AnnotationBinding[]booleanbooleanDoes 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 wildcardbooleanisClass()booleanisCompatibleWith(TypeBinding right) booleanisEnum()booleanisEquivalentTo(TypeBinding otherType) Returns true if a type is identical to another one, or for generic types, true if compared to its raw type.booleanbooleanisFunctionalInterface(Scope scope) booleanbooleanfinal booleanbooleanbooleanReturns 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 booleanbooleanbooleanisRecord()booleanbooleanJLS(3) 4.7.booleanAnswer true if the receiver is an annotation which may be repeatable.booleanisSealed()booleanisStatic()Answer true if the receiver is a static member type (or toplevel)booleanReturns true if a given type may be thrownbooleanisTypeArgumentContainedBy(TypeBinding otherType) booleanReturns true if the type was declared as a type variablebooleanReturns true if wildcard type of the form '?' (no bound)booleanisUncheckedException(boolean includeSupertype) Returns true if the type is a subclass of java.lang.Error or java.lang.RuntimeExceptionbooleanbooleanReturns 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.char[]Answer the qualified name of the receiver's package separated by periods or an empty string if its the default package.char[]char[]Answer the receiver classfile signature.booleansIsMoreSpecific(TypeBinding s, TypeBinding t, Scope scope) intupwardsProjection(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, getAnnotations, getAnnotationTagBits, initializeDeprecatedAnnotationTagBits, isAnnotationType, isParameter, isPatternVariable, isTaggedRepeatable, isValid, isValidBinding, isVolatile, setAnnotations, setAnnotationsModifier and TypeMethodDescriptionchar[]longCompute the tagbits for standard annotations.voidCompute the tag bits for @Deprecated annotations, avoiding resolving entire annotation if not necessary.booleanbooleanbooleanbooleanstatic booleanfinal booleanbooleanvoidsetAnnotations(AnnotationBinding[] annotations, boolean forceStore) voidsetAnnotations(AnnotationBinding[] annotations, Scope scope, boolean forceStore)
-
Field Details
-
ArrayLength
-
leafComponentType
-
dimensions
public int dimensions -
nullTagBitsPerDimension
public long[] nullTagBitsPerDimension
-
-
Constructor Details
-
ArrayBinding
-
-
Method Details
-
closestMatch
Description copied from class:TypeBindingIn case of problems, returns the closest match found. It may not be perfect match, but the result of a best effort to improve fault-tolerance.- Overrides:
closestMatchin classTypeBinding
-
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:
-
mentionsAny
Description copied from class:TypeBindingDoes this type mention any of the given type parameters, except the one at position 'idx'?- Overrides:
mentionsAnyin classTypeBinding
-
computeUniqueKey
public char[] computeUniqueKey(boolean isLeaf) - Overrides:
computeUniqueKeyin classBinding
-
constantPoolName
public char[] constantPoolName()Description copied from class:TypeBindingAnswer the receiver's constant pool name. NOTE: This method should only be used during/after code gen. e.g. 'java/lang/Object'- Specified by:
constantPoolNamein classTypeBinding
-
debugName
- Overrides:
debugNamein classTypeBinding
-
annotatedDebugName
- Overrides:
annotatedDebugNamein classTypeBinding
-
dimensions
public int dimensions()- Overrides:
dimensionsin classTypeBinding
-
elementsType
-
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
-
environment
-
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
-
getPackage
- Specified by:
getPackagein classTypeBinding
-
hashCode
-
isCompatibleWith
- Specified by:
isCompatibleWithin classTypeBinding
-
isSubtypeOf
- Overrides:
isSubtypeOfin classTypeBinding
-
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.
-
kind
public int kind()- Overrides:
kindin classTypeBinding
-
leafComponentType
- Overrides:
leafComponentTypein classTypeBinding
-
nullAnnotatedReadableName
Description copied from class:TypeBindingAnswer a readable name (for error reporting) that includes nullness type annotations.- Overrides:
nullAnnotatedReadableNamein classTypeBinding
-
problemId
-
qualifiedSourceName
public char[] qualifiedSourceName()Description copied from class:TypeBindingAnswer 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()- Specified by:
readableNamein classBinding
-
setTypeAnnotations
- Overrides:
setTypeAnnotationsin classTypeBinding
-
shortReadableName
public char[] shortReadableName()- Overrides:
shortReadableNamein classBinding
-
sourceName
public char[] sourceName()- Specified by:
sourceNamein classTypeBinding
-
swapUnresolved
public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) -
toString
-
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
-
uncapture
Description copied from class:TypeBindingPerform capture "deconversion" on a given type- Overrides:
uncapturein classTypeBinding
-
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
-
updateTagBits
public long updateTagBits()Description copied from class:TypeBindingRefresh some tagBits from details into the main type. Currently handled: TagBits.HasNullTypeAnnotation- Overrides:
updateTagBitsin classTypeBinding
-
getCloneMethod
The type of x.clone() is substituted from 'Object' into the type of the receiver array (non-null) -
isArrayClone
-