|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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.TypeVariableBinding
public class TypeVariableBinding
Binding for a type parameter, held by source/binary type or method.
| Field Summary | |
|---|---|
Binding |
declaringElement
|
TypeBinding |
firstBound
Denote the first explicit (binding) bound amongst the supertypes (from declaration in source) If no superclass was specified, then it denotes the first superinterface, or null if none was specified. |
char[] |
genericTypeSignature
|
int |
rank
|
ReferenceBinding |
superclass
|
ReferenceBinding[] |
superInterfaces
|
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding |
|---|
compoundName, fPackage, LUB_GENERIC, modifiers, samProblemBinding, singleAbstractMethod, sourceName |
| 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 |
| Constructor Summary | |
|---|---|
TypeVariableBinding(char[] sourceName,
Binding declaringElement,
int rank,
LookupEnvironment environment)
|
|
TypeVariableBinding(TypeVariableBinding prototype)
|
|
| Method Summary | |
|---|---|
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." |
java.lang.String |
annotatedDebugName()
|
int |
boundCheck(Substitution substitution,
TypeBinding argumentType,
Scope scope)
Returns true if the argument type satisfies all bounds of the type parameter |
int |
boundsCount()
|
boolean |
canBeInstantiated()
Answer true if the receiver can be instantiated |
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. |
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. |
TypeBinding |
combineTypeAnnotations(TypeBinding substitute)
|
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 |
evaluateNullAnnotations(Scope scope,
TypeParameter parameter)
|
void |
exitRecursiveFunction()
Exit the context of a potentially recursive function. |
char[] |
genericSignature()
T::Ljava/util/Map;:Ljava/io/Serializable; T:LY |
char[] |
genericTypeSignature()
T::Ljava/util/Map;:Ljava/io/Serializable; T:LY |
boolean |
hasTypeBit(int bit)
Answer an additional bit characterizing this type, like TypeIds.BitAutoCloseable. |
boolean |
isErasureBoundTo(TypeBinding type)
Returns true if the type variable is directly bound to a given type |
boolean |
isHierarchyConnected()
Returns true if the type hierarchy is connected |
boolean |
isInterchangeableWith(TypeVariableBinding otherVariable,
Substitution substitute)
Returns true if the 2 variables are playing exact same role: they have the same bounds, providing one is substituted with the other: |
boolean |
isProperType(boolean admitCapture18)
JLS8 Sect 18.1.1 |
boolean |
isSubtypeOf(TypeBinding other)
|
boolean |
isTypeVariable()
Returns true if the type was declared as a type variable |
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. |
TypeBinding[] |
otherUpperBounds()
|
char[] |
readableName()
Answer the receiver's signature. |
TypeBinding |
setFirstBound(TypeBinding firstBound)
|
ReferenceBinding |
setSuperClass(ReferenceBinding superclass)
|
ReferenceBinding[] |
setSuperInterfaces(ReferenceBinding[] superInterfaces)
|
void |
setTypeAnnotations(AnnotationBinding[] annotations,
boolean evalNullAnnotations)
|
char[] |
shortReadableName()
|
ReferenceBinding |
superclass()
|
ReferenceBinding[] |
superInterfaces()
|
java.lang.String |
toString()
|
TypeBinding |
unannotated(boolean removeOnlyNullAnnotations)
Return this type minus its type annotations |
TypeBinding |
upperBound()
Upper bound doesn't perform erasure |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding |
|---|
computeUniqueKey, initializeDeprecatedAnnotationTagBits, isParameter, isTaggedRepeatable, isValidBinding, isVolatile, problemId, setAnnotations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public Binding declaringElement
public int rank
public TypeBinding firstBound
public ReferenceBinding superclass
public ReferenceBinding[] superInterfaces
public char[] genericTypeSignature
| Constructor Detail |
|---|
public TypeVariableBinding(char[] sourceName,
Binding declaringElement,
int rank,
LookupEnvironment environment)
public TypeVariableBinding(TypeVariableBinding prototype)
| Method Detail |
|---|
public int boundCheck(Substitution substitution,
TypeBinding argumentType,
Scope scope)
public int boundsCount()
public boolean canBeInstantiated()
ReferenceBinding
canBeInstantiated in class ReferenceBindingReferenceBinding.canBeInstantiated()
public void collectSubstitutes(Scope scope,
TypeBinding actualType,
InferenceContext inferenceContext,
int constraint)
collectSubstitutes in class TypeBindingpublic char[] computeUniqueKey(boolean isLeaf)
ReferenceBinding
computeUniqueKey in class ReferenceBindingpublic char[] constantPoolName()
ReferenceBinding
constantPoolName in class ReferenceBindingpublic TypeBinding clone(TypeBinding enclosingType)
TypeBinding
clone 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[] genericSignature()
public char[] genericTypeSignature()
genericTypeSignature in class TypeBindingpublic boolean hasTypeBit(int bit)
TypeBindingTypeIds.BitAutoCloseable.
hasTypeBit in class TypeBindingpublic boolean isErasureBoundTo(TypeBinding type)
public boolean isHierarchyConnected()
ReferenceBinding
isHierarchyConnected in class ReferenceBinding
public boolean isInterchangeableWith(TypeVariableBinding otherVariable,
Substitution substitute)
public boolean isSubtypeOf(TypeBinding other)
isSubtypeOf in class ReferenceBindingpublic boolean enterRecursiveFunction()
TypeBinding
enterRecursiveFunction in class TypeBindingpublic void exitRecursiveFunction()
TypeBinding
exitRecursiveFunction in class TypeBindingpublic boolean isProperType(boolean admitCapture18)
TypeBinding
isProperType 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 isTypeVariable()
isTypeVariable in class TypeBindingpublic int kind()
kind in class TypeBinding
public boolean mentionsAny(TypeBinding[] parameters,
int idx)
TypeBinding
mentionsAny in class TypeBindingpublic TypeBinding[] otherUpperBounds()
public char[] readableName()
ReferenceBinding
readableName in class ReferenceBindingReferenceBinding.readableName()
public void setTypeAnnotations(AnnotationBinding[] annotations,
boolean evalNullAnnotations)
setTypeAnnotations in class TypeBindingpublic char[] shortReadableName()
shortReadableName in class ReferenceBindingReferenceBinding.shortReadableName()public ReferenceBinding superclass()
superclass in class ReferenceBindingpublic ReferenceBinding[] superInterfaces()
superInterfaces in class ReferenceBindingpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
public char[] nullAnnotatedReadableName(CompilerOptions options,
boolean shortNames)
TypeBinding
nullAnnotatedReadableName in class ReferenceBindingTypeBinding.nullAnnotatedReadableName(CompilerOptions,boolean)public TypeBinding unannotated(boolean removeOnlyNullAnnotations)
TypeBinding
unannotated in class TypeBindingremoveOnlyNullAnnotations - if true only null type annotations are removed, otherwise all type annotations.public TypeBinding upperBound()
public void evaluateNullAnnotations(Scope scope,
TypeParameter parameter)
public TypeBinding setFirstBound(TypeBinding firstBound)
public ReferenceBinding setSuperClass(ReferenceBinding superclass)
public ReferenceBinding[] setSuperInterfaces(ReferenceBinding[] superInterfaces)
public TypeBinding combineTypeAnnotations(TypeBinding substitute)
public boolean acceptsNonNullDefault()
TypeBinding
acceptsNonNullDefault in class ReferenceBinding
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||