public class WildcardBinding extends ReferenceBinding
| Modifier and Type | Field and Description |
|---|---|
TypeBinding |
bound |
int |
boundKind |
ReferenceBinding |
genericType |
TypeBinding[] |
otherBounds |
int |
rank |
compoundName, fPackage, LUB_GENERIC, modifiers, samProblemBinding, singleAbstractMethod, sourceNameBOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, id, INT, LONG, NULL, SHORT, tagBits, TYPE_USE_BINDING, typeAnnotations, VOIDANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, DefaultLocationArrayContents, DefaultLocationField, DefaultLocationParameter, DefaultLocationReturnType, DefaultLocationTypeArgument, DefaultLocationTypeBound, DefaultLocationTypeParameter, FIELD, GENERIC_TYPE, IMPORT, INTERSECTION_TYPE, INTERSECTION_TYPE18, LOCAL, METHOD, NO_ANNOTATIONS, NO_ELEMENT_VALUE_PAIRS, NO_EXCEPTIONS, NO_FIELDS, NO_MEMBER_TYPES, NO_METHODS, NO_NULL_DEFAULT, NO_PARAMETER_NAMES, NO_PARAMETERS, NO_REFERENCE_TYPES, NO_SUPERINTERFACES, NO_TYPE_VARIABLES, NO_TYPES, NONNULL_BY_DEFAULT, NULL_UNSPECIFIED_BY_DEFAULT, NullnessDefaultMASK, PACKAGE, PARAMETERIZED_TYPE, POLY_TYPE, RAW_TYPE, TYPE, TYPE_PARAMETER, TYPE_USE, UNINITIALIZED_FIELDS, UNINITIALIZED_METHODS, UNINITIALIZED_REFERENCE_TYPES, VARIABLE, WILDCARD_TYPE| Constructor and Description |
|---|
WildcardBinding(ReferenceBinding genericType,
int rank,
TypeBinding bound,
TypeBinding[] otherBounds,
int boundKind,
LookupEnvironment environment)
When unbound, the bound denotes the corresponding type variable (so as to retrieve its bound lazily)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsNonNullDefault()
Used to implement this sentence from o.e.j.annotation.DefaultLocation:
"Wildcards and the use of type variables are always excluded from NonNullByDefault."
|
ReferenceBinding |
actualType() |
TypeBinding |
allBounds() |
java.lang.String |
annotatedDebugName() |
boolean |
boundCheck(TypeBinding argumentType)
Returns true if the argument type satisfies the wildcard bound(s)
|
boolean |
canBeInstantiated()
Answer true if the receiver can be instantiated
|
TypeBinding |
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.
|
java.util.List |
collectMissingTypes(java.util.List missingTypes)
Iterate through the type components to collect instances of leaf missing types
|
void |
collectSubstitutes(Scope scope,
TypeBinding actualType,
InferenceContext inferenceContext,
int constraint)
Collect the substitutes into a map for certain type variables inside the receiver type
e.g.
|
char[] |
computeUniqueKey(boolean isLeaf)
p.X
|
char[] |
constantPoolName()
Answer the receiver's constant pool name.
|
java.lang.String |
debugName() |
boolean |
enterRecursiveFunction()
Call this before descending into type details to prevent infinite recursion.
|
TypeBinding |
erasure() |
void |
exitRecursiveFunction()
Exit the context of a potentially recursive function.
|
char[] |
genericTypeSignature()
Answer the receiver classfile signature.
|
ReferenceBinding[] |
getIntersectingTypes() |
int |
hashCode() |
boolean |
hasTypeBit(int bit)
Answer an additional bit characterizing this type, like
TypeIds.BitAutoCloseable. |
boolean |
isHierarchyConnected()
Returns true if the type hierarchy is connected
|
boolean |
isIntersectionType()
Returns true if the current type denotes an intersection type: Number & Comparable>
|
boolean |
isProperType(boolean admitCapture18)
JLS8 Sect 18.1.1
|
boolean |
isSuperclassOf(ReferenceBinding otherType)
Answer true if the receiver is in the superclass hierarchy of aType
NOTE: Object.isSuperclassOf(Object) -> false
|
boolean |
isUnboundWildcard()
Returns true if the type is a wildcard
|
boolean |
isWildcard()
Returns true if the type is a wildcard
|
int |
kind() |
boolean |
mentionsAny(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.
|
char[] |
readableName()
Answer the receiver's signature.
|
char[] |
shortReadableName() |
char[] |
signature()
Answer the receiver classfile signature.
|
char[] |
sourceName() |
ReferenceBinding |
superclass() |
ReferenceBinding[] |
superInterfaces() |
void |
swapUnresolved(UnresolvedReferenceBinding unresolvedType,
ReferenceBinding resolvedType,
LookupEnvironment env) |
java.lang.String |
toString() |
TypeVariableBinding |
typeVariable()
Returns associated type variable, or null in case of inconsistency
|
TypeBinding |
unannotated()
Return this type minus its type annotations
|
TypeBinding |
uncapture(Scope scope)
Perform capture "deconversion" on a given type
|
TypeBinding |
withoutToplevelNullAnnotation()
Return this type minus its toplevel null annotations.
|
appendNullAnnotation, applyCloseableClassWhitelists, applyCloseableInterfaceWhitelists, availableFields, availableMethods, binarySearch, binarySearch, canBeSeenBy, canBeSeenBy, canBeSeenBy, computeGenericTypeSignature, computeId, computeId, depth, detectAnnotationCycle, enclosingTypeAt, enumConstantCount, fieldCount, fields, getAccessFlags, getAnnotations, getAnnotationTagBits, getEnclosingInstancesSlotSize, getExactConstructor, getExactMethod, getField, getField, getFileName, getMemberType, getMethods, getMethods, getOuterLocalVariablesSlotSize, getPackage, getSingleAbstractMethod, getTypeVariable, hasIncompatibleSuperType, hasMemberTypes, hasRestrictedAccess, implementsInterface, innerCanBeSeenBy, innerCanBeSeenBy, isAbstract, isAnnotationType, isBinaryBinding, isClass, isCompatibleWith, isConsistentIntersection, isDefault, isDeprecated, isEnum, isFinal, isFunctionalInterface, isHierarchyBeingActivelyConnected, isHierarchyBeingConnected, isInterface, isOrEnclosedByPrivateType, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSubtypeOf, isSubTypeOfRTL, isThrowable, isUncheckedException, isUsed, isViewedAsDeprecated, memberTypes, methods, outermostEnclosingType, qualifiedSourceName, retrieveAnnotationHolder, setAnnotations, setContainerAnnotationType, sortFields, sortMethods, syntheticEnclosingInstanceTypes, tagAsHavingDefectiveContainerType, unResolvedFieldscapture, closestMatch, containerAnnotationType, dimensions, enclosingMethod, enclosingType, equalsEquals, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, getTypeAnnotations, hasNullTypeAnnotations, hasTypeAnnotations, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isBoxedPrimitiveType, isBoxingCompatibleWith, isCapture, isCompatibleWith, isEquivalentTo, isFunctionalType, isGenericType, isHierarchyInconsistent, isIntersectionType18, isLocalType, isMemberType, isNestedType, isNumericType, isParameterizedType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isPolyType, isPotentiallyCompatibleWith, isPrimitiveOrBoxedPrimitiveType, isPrimitiveType, isProvablyDistinct, isRawType, isReifiable, isRepeatableAnnotationType, isTypeArgumentContainedBy, isTypeVariable, isUnresolvedType, leafComponentType, needsUncheckedConversion, notEquals, original, prototype, qualifiedPackageName, setTypeAnnotations, signableName, sIsMoreSpecific, syntheticOuterLocalVariables, typeVariables, wellKnownTypecomputeUniqueKey, initializeDeprecatedAnnotationTagBits, isParameter, isTaggedRepeatable, isValidBinding, isVolatile, problemId, setAnnotationspublic ReferenceBinding genericType
public int rank
public TypeBinding bound
public TypeBinding[] otherBounds
public int boundKind
public WildcardBinding(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind, LookupEnvironment environment)
public TypeBinding allBounds()
public ReferenceBinding actualType()
actualType in class TypeBindingpublic int kind()
kind in class TypeBindingpublic boolean boundCheck(TypeBinding argumentType)
public boolean canBeInstantiated()
ReferenceBindingcanBeInstantiated in class ReferenceBindingReferenceBinding.canBeInstantiated()public java.util.List collectMissingTypes(java.util.List missingTypes)
TypeBindingcollectMissingTypes in class TypeBindingTypeBinding.collectMissingTypes(java.util.List)public void collectSubstitutes(Scope scope, TypeBinding actualType, InferenceContext inferenceContext, int constraint)
collectSubstitutes in class TypeBindingpublic char[] computeUniqueKey(boolean isLeaf)
ReferenceBindingcomputeUniqueKey in class ReferenceBindingpublic char[] constantPoolName()
ReferenceBindingconstantPoolName in class ReferenceBindingTypeBinding.constantPoolName()public TypeBinding clone(TypeBinding immaterial)
TypeBindingclone in class TypeBindingpublic java.lang.String annotatedDebugName()
annotatedDebugName in class TypeBindingpublic java.lang.String debugName()
debugName in class ReferenceBindingTypeBinding.debugName()public TypeBinding erasure()
erasure in class TypeBindingpublic char[] genericTypeSignature()
TypeBindinggenericTypeSignature in class TypeBindingpublic int hashCode()
hashCode in class ReferenceBindingpublic boolean hasTypeBit(int bit)
TypeBindingTypeIds.BitAutoCloseable.hasTypeBit in class TypeBindingpublic boolean isSuperclassOf(ReferenceBinding otherType)
ReferenceBindingpublic boolean isIntersectionType()
isIntersectionType in class TypeBindingpublic ReferenceBinding[] getIntersectingTypes()
getIntersectingTypes in class TypeBindingpublic boolean isHierarchyConnected()
ReferenceBindingisHierarchyConnected in class ReferenceBindingpublic boolean enterRecursiveFunction()
TypeBindingenterRecursiveFunction in class TypeBindingpublic void exitRecursiveFunction()
TypeBindingexitRecursiveFunction in class TypeBindingpublic boolean isProperType(boolean admitCapture18)
TypeBindingisProperType in class ReferenceBindingadmitCapture18 - request if CaptureBinding18 shuld be considered as a proper type.
If unsure say 'true', only in Scope.greaterLowerBound(TypeBinding[], Scope, LookupEnvironment)
CaptureBinding18 has to be excluded to prevent an NPE on a branch that heuristically tries to avoid
inconsistent intersections.public boolean isUnboundWildcard()
isUnboundWildcard in class TypeBindingpublic boolean isWildcard()
isWildcard in class TypeBindingpublic char[] readableName()
ReferenceBindingreadableName in class ReferenceBindingpublic char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames)
TypeBindingnullAnnotatedReadableName in class ReferenceBindingTypeBinding.nullAnnotatedReadableName(CompilerOptions,boolean)public char[] shortReadableName()
shortReadableName in class ReferenceBindingpublic char[] signature()
TypeBindingsignature in class ReferenceBindingTypeBinding.signature()public char[] sourceName()
sourceName in class ReferenceBindingpublic ReferenceBinding superclass()
superclass in class ReferenceBindingpublic ReferenceBinding[] superInterfaces()
superInterfaces in class ReferenceBindingpublic void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env)
swapUnresolved in class TypeBindingpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public TypeVariableBinding typeVariable()
public TypeBinding unannotated()
TypeBindingunannotated in class TypeBindingpublic TypeBinding withoutToplevelNullAnnotation()
TypeBindingwithoutToplevelNullAnnotation in class TypeBindingpublic TypeBinding uncapture(Scope scope)
TypeBindinguncapture in class TypeBindingpublic boolean mentionsAny(TypeBinding[] parameters, int idx)
TypeBindingmentionsAny in class TypeBindingpublic boolean acceptsNonNullDefault()
TypeBindingacceptsNonNullDefault in class ReferenceBinding