org.aspectj.org.eclipse.jdt.internal.compiler.lookup
Class RawTypeBinding
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
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.RawTypeBinding
- All Implemented Interfaces:
- Substitution
public class RawTypeBinding
- extends ParameterizedTypeBinding
Denote a raw type, i.e. a generic type referenced without any type arguments.
e.g. X can be used a raw type 'X', in which case it
will behave as X
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding |
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, id, INT, LONG, NULL, SHORT, tagBits, TYPE_USE_BINDING, typeAnnotations, VOID |
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding |
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, DefaultLocationArrayContents, DefaultLocationField, DefaultLocationParameter, DefaultLocationReturnType, DefaultLocationTypeArgument, DefaultLocationTypeBound, DefaultLocationTypeParameter, FIELD, GENERIC_TYPE, IMPORT, INTERSECTION_CAST_TYPE, INTERSECTION_TYPE, 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 |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding |
actualType, boundCheck, canBeInstantiated, capture, collectMissingTypes, collectSubstitutes, computeId, constantPoolName, enclosingType, environment, erasure, fieldCount, fields, genericType, getAnnotationTagBits, getEnclosingInstancesSlotSize, getExactConstructor, getExactMethod, getExactMethodBase, getField, getField, getMemberType, getMethods, getMethodsBase, getNonWildcardParameterization, getOuterLocalVariablesSlotSize, hasMemberTypes, hasTypeBit, implementsMethod, isBoundParameterizedType, isHierarchyConnected, isRawSubstitution, memberTypes, methods, nullAnnotatedReadableName, problemId, qualifiedPackageName, qualifiedSourceName, signature, sourceName, substitute, superclass, superInterfaces, swapUnresolved, syntheticEnclosingInstanceTypes, syntheticOuterLocalVariables, toString, typeArguments, typeVariables, uncapture, unResolvedFields |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding |
acceptsNonNullDefault, appendNullAnnotation, applyCloseableClassWhitelists, applyCloseableInterfaceWhitelists, availableFields, availableMethods, binarySearch, binarySearch, canBeSeenBy, canBeSeenBy, canBeSeenBy, computeGenericTypeSignature, depth, detectAnnotationCycle, enclosingTypeAt, enumConstantCount, getAccessFlags, getAnnotations, getFileName, getMethods, getPackage, getTypeVariable, hashCode, hasIncompatibleSuperType, 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, isSuperclassOf, isThrowable, isUncheckedException, isUsed, isViewedAsDeprecated, outermostEnclosingType, retrieveAnnotationHolder, setAnnotations, setContainerAnnotationType, sortFields, sortMethods, tagAsHavingDefectiveContainerType |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding |
closestMatch, containerAnnotationType, dimensions, enterRecursiveFunction, equalsEquals, exitRecursiveFunction, findSuperTypeOriginatingFrom, findSuperTypeOriginatingFrom, genericCast, getErasureCompatibleType, getIntersectingTypes, getTypeAnnotations, hasNullTypeAnnotations, hasTypeAnnotations, isAnonymousType, isArrayType, isBaseType, isBoxedPrimitiveType, isCapture, isCompatibleWith, isGenericType, isHierarchyInconsistent, isIntersectionCastType, isIntersectionType, isLocalType, isMemberType, isNestedType, isNumericType, isParameterizedTypeWithActualArguments, isParameterizedWithOwnVariables, isPrimitiveOrBoxedPrimitiveType, isPrimitiveType, isRawType, isReifiable, isRepeatableAnnotationType, isTypeArgumentContainedBy, isTypeVariable, isUnboundWildcard, isUnresolvedType, isWildcard, leafComponentType, needsUncheckedConversion, notEquals, original, prototype, setTypeAnnotations, sIsMoreSpecific, wellKnownType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
RawTypeBinding
public RawTypeBinding(ReferenceBinding type,
ReferenceBinding enclosingType,
LookupEnvironment environment)
- Raw type arguments are erasure of respective parameter bounds. But we may not have resolved
these bounds yet if creating raw types while supertype hierarchies are being connected.
Therefore, use 'null' instead, and access these in a lazy way later on (when substituting).
computeUniqueKey
public char[] computeUniqueKey(boolean isLeaf)
- Description copied from class:
ReferenceBinding
- p.X {} -> Lp/X;
- Overrides:
computeUniqueKey in class ParameterizedTypeBinding
clone
public TypeBinding clone(TypeBinding outerType)
- Description copied from class:
TypeBinding
- 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. 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:
clone in class ParameterizedTypeBinding
unannotated
public TypeBinding unannotated(boolean removeOnlyNullAnnotations)
- Description copied from class:
TypeBinding
- Return this type minus its type annotations
- Overrides:
unannotated in class ParameterizedTypeBinding
- Parameters:
removeOnlyNullAnnotations - if true only null type annotations are removed, otherwise all type annotations.
createParameterizedMethod
public ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod)
- Overrides:
createParameterizedMethod in class ParameterizedTypeBinding
- See Also:
ParameterizedTypeBinding.createParameterizedMethod(org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding)
isParameterizedType
public boolean isParameterizedType()
- Description copied from class:
TypeBinding
- Returns true if the type is parameterized, e.g. List.
Note that some instances of ParameterizedTypeBinding have no arguments, like for non-generic members
of a parameterized type. Use
TypeBinding.isParameterizedTypeWithActualArguments() instead to find out.
- Overrides:
isParameterizedType in class ParameterizedTypeBinding
kind
public int kind()
- Overrides:
kind in class ParameterizedTypeBinding
debugName
public java.lang.String debugName()
- Overrides:
debugName in class ParameterizedTypeBinding
- See Also:
TypeBinding.debugName()
annotatedDebugName
public java.lang.String annotatedDebugName()
- Overrides:
annotatedDebugName in class ParameterizedTypeBinding
genericTypeSignature
public char[] genericTypeSignature()
- Ltype;
LY;
- Overrides:
genericTypeSignature in class ParameterizedTypeBinding
isEquivalentTo
public boolean isEquivalentTo(TypeBinding otherType)
- Description copied from class:
TypeBinding
- Returns true if a type is identical to another one,
or for generic types, true if compared to its raw type.
- Overrides:
isEquivalentTo in class ParameterizedTypeBinding
isProvablyDistinct
public boolean isProvablyDistinct(TypeBinding otherType)
- Description copied from class:
TypeBinding
- Returns true if a type is provably distinct from another one,
- Overrides:
isProvablyDistinct in class TypeBinding
isProperType
public boolean isProperType(boolean admitCapture18)
- Description copied from class:
TypeBinding
- JLS8 Sect 18.1.1
- Overrides:
isProperType in class ParameterizedTypeBinding
- Parameters:
admitCapture18 - 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.
initializeArguments
protected void initializeArguments()
- Overrides:
initializeArguments in class ParameterizedTypeBinding
getSingleAbstractMethod
public MethodBinding getSingleAbstractMethod(Scope scope,
boolean replaceWildcards)
- Description copied from class:
TypeBinding
- Return the single abstract method of a functional interface, or null, if the receiver is not a functional interface as defined in JLS 9.8.
- Overrides:
getSingleAbstractMethod in class ParameterizedTypeBinding
- 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 null, if the receiver is not a functional interface.
mentionsAny
public boolean mentionsAny(TypeBinding[] parameters,
int idx)
- Description copied from class:
TypeBinding
- Does this type mention any of the given type parameters, except the one at position 'idx'?
- Overrides:
mentionsAny in class ParameterizedTypeBinding
readableName
public char[] readableName()
- Description copied from class:
ReferenceBinding
- Answer the receiver's signature.
NOTE: This method should only be used during/after code gen.
- Overrides:
readableName in class ParameterizedTypeBinding
- See Also:
Binding.readableName()
shortReadableName
public char[] shortReadableName()
- Overrides:
shortReadableName in class ParameterizedTypeBinding
- See Also:
Binding.shortReadableName()