public class InferenceVariable extends TypeVariableBinding
declaringElement, firstBound, genericTypeSignature, rank, superclass, superInterfacescompoundName, 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 |
|---|
InferenceVariable(TypeBinding typeParameter,
int parameterRank,
int iVarId,
InvocationSite site,
LookupEnvironment environment,
ReferenceBinding object) |
| Modifier and Type | Method and Description |
|---|---|
TypeBinding |
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.
|
char[] |
constantPoolName()
Answer the receiver's constant pool name.
|
java.lang.String |
debugName() |
boolean |
equals(java.lang.Object obj) |
TypeBinding |
erasure() |
PackageBinding |
getPackage() |
int |
hashCode() |
boolean |
hasTypeBit(int bit)
Answer an additional bit characterizing this type, like
TypeIds.BitAutoCloseable. |
boolean |
isCompatibleWith(TypeBinding right,
Scope scope)
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)
|
boolean |
isProperType(boolean admitCapture18)
JLS8 Sect 18.1.1
|
InferenceVariable |
prototype()
Return the primordial type from which the receiver was cloned.
|
char[] |
qualifiedSourceName()
Answer the source name for the type.
|
char[] |
readableName()
Answer the receiver's signature.
|
char[] |
sourceName() |
ReferenceBinding[] |
superInterfaces() |
java.lang.String |
toString() |
acceptsNonNullDefault, annotatedDebugName, appendNullAnnotation, boundCheck, boundsCount, canBeInstantiated, collectSubstitutes, combineTypeAnnotations, computeUniqueKey, enterRecursiveFunction, evaluateNullAnnotations, exitRecursiveFunction, genericSignature, genericTypeSignature, getDerivedTypesForDeferredInitialization, isErasureBoundTo, isHierarchyConnected, isInterchangeableWith, isSubtypeOf, isTypeVariable, kind, mentionsAny, nullAnnotatedReadableName, otherUpperBounds, setFirstBound, setSuperClass, setSuperInterfaces, setTypeAnnotations, shortReadableName, superclass, unannotated, upperBound, withoutToplevelNullAnnotationapplyCloseableClassWhitelists, 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, getSingleAbstractMethod, getTypeVariable, hasIncompatibleSuperType, hasMemberTypes, hasRestrictedAccess, implementsInterface, innerCanBeSeenBy, innerCanBeSeenBy, isAbstract, isAnnotationType, isBinaryBinding, isClass, isConsistentIntersection, isDefault, isDeprecated, isEnum, isFinal, isFunctionalInterface, isHierarchyBeingActivelyConnected, isHierarchyBeingConnected, isInterface, isOrEnclosedByPrivateType, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSubTypeOfRTL, isSuperclassOf, isThrowable, isUncheckedException, isUsed, isViewedAsDeprecated, memberTypes, methods, outermostEnclosingType, retrieveAnnotationHolder, setAnnotations, setContainerAnnotationType, signature, sortFields, sortMethods, syntheticEnclosingInstanceTypes, tagAsHavingDefectiveContainerType, unResolvedFieldsactualType, capture, closestMatch, collectMissingTypes, containerAnnotationType, dimensions, enclosingMethod, enclosingType, equalsEquals, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, getIntersectingTypes, getTypeAnnotations, hasNullTypeAnnotations, hasTypeAnnotations, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isBoxedPrimitiveType, isBoxingCompatibleWith, isCapture, isCompatibleWith, isEquivalentTo, isFunctionalType, isGenericType, isHierarchyInconsistent, isIntersectionType, isIntersectionType18, isLocalType, isMemberType, isNestedType, isNumericType, isParameterizedType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isPolyType, isPotentiallyCompatibleWith, isPrimitiveOrBoxedPrimitiveType, isPrimitiveType, isProvablyDistinct, isRawType, isReifiable, isRepeatableAnnotationType, isTypeArgumentContainedBy, isUnboundWildcard, isUnresolvedType, isWildcard, leafComponentType, needsUncheckedConversion, notEquals, original, qualifiedPackageName, signableName, sIsMoreSpecific, swapUnresolved, syntheticOuterLocalVariables, typeVariables, uncapture, wellKnownTypecomputeUniqueKey, initializeDeprecatedAnnotationTagBits, isParameter, isTaggedRepeatable, isValidBinding, isVolatile, problemId, setAnnotationspublic InferenceVariable(TypeBinding typeParameter, int parameterRank, int iVarId, InvocationSite site, LookupEnvironment environment, ReferenceBinding object)
public TypeBinding clone(TypeBinding enclosingType)
TypeBindingclone in class TypeVariableBindingpublic InferenceVariable prototype()
TypeBindingSourceTypeBinding,
BinaryTypeBinding and UnresolvedReferenceBinding do so as of now. In fact some types e.g ParameterizedTypeBinding
should not do so. Deflecting a query to a prototype would lead to wrong results in the case of ParameterizedTypeBindingprototype in class TypeBindingpublic char[] constantPoolName()
ReferenceBindingconstantPoolName in class TypeVariableBindingpublic PackageBinding getPackage()
getPackage in class ReferenceBindingpublic boolean isCompatibleWith(TypeBinding right, Scope scope)
ReferenceBindingisCompatibleWith in class ReferenceBindingpublic boolean isProperType(boolean admitCapture18)
TypeBindingisProperType in class TypeVariableBindingadmitCapture18 - 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 ReferenceBinding[] superInterfaces()
superInterfaces in class TypeVariableBindingpublic char[] qualifiedSourceName()
ReferenceBindingqualifiedSourceName in class ReferenceBindingpublic char[] sourceName()
sourceName in class ReferenceBindingpublic char[] readableName()
ReferenceBindingreadableName in class TypeVariableBindingReferenceBinding.readableName()public boolean hasTypeBit(int bit)
TypeBindingTypeIds.BitAutoCloseable.hasTypeBit in class TypeVariableBindingpublic java.lang.String debugName()
debugName in class TypeVariableBindingTypeBinding.debugName()public java.lang.String toString()
toString in class TypeVariableBindingObject.toString()public int hashCode()
hashCode in class ReferenceBindingpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic TypeBinding erasure()
erasure in class TypeVariableBinding