|
|||||||||
| 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
public abstract class ReferenceBinding
| Field Summary | |
|---|---|
char[][] |
compoundName
|
PackageBinding |
fPackage
|
static ReferenceBinding |
LUB_GENERIC
|
int |
modifiers
|
protected static ProblemMethodBinding |
samProblemBinding
|
protected MethodBinding[] |
singleAbstractMethod
|
char[] |
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 | |
|---|---|
ReferenceBinding()
|
|
ReferenceBinding(ReferenceBinding 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." |
protected void |
appendNullAnnotation(java.lang.StringBuffer nameBuffer,
CompilerOptions options)
|
protected int |
applyCloseableClassWhitelists()
|
protected int |
applyCloseableInterfaceWhitelists()
|
FieldBinding[] |
availableFields()
Return the array of resolvable fields (resilience) |
MethodBinding[] |
availableMethods()
Return the array of resolvable methods (resilience) |
static FieldBinding |
binarySearch(char[] name,
FieldBinding[] sortedFields)
|
static long |
binarySearch(char[] selector,
MethodBinding[] sortedMethods)
Returns a combined range value representing: (start + (end<<32)), where start is the index of the first matching method (remember methods are sorted alphabetically on selectors), and end is the index of last contiguous methods with same selector. |
boolean |
canBeInstantiated()
Answer true if the receiver can be instantiated |
boolean |
canBeSeenBy(PackageBinding invocationPackage)
Answer true if the receiver is visible to the invocationPackage. |
boolean |
canBeSeenBy(ReferenceBinding receiverType,
ReferenceBinding invocationType)
Answer true if the receiver is visible to the receiverType and the invocationType. |
boolean |
canBeSeenBy(Scope scope)
Answer true if the receiver is visible to the type provided by the scope. |
char[] |
computeGenericTypeSignature(TypeVariableBinding[] typeVariables)
|
void |
computeId()
|
char[] |
computeUniqueKey(boolean isLeaf)
p.X |
char[] |
constantPoolName()
Answer the receiver's constant pool name. |
java.lang.String |
debugName()
|
int |
depth()
|
boolean |
detectAnnotationCycle()
|
ReferenceBinding |
enclosingTypeAt(int relativeDepth)
|
int |
enumConstantCount()
|
int |
fieldCount()
|
FieldBinding[] |
fields()
|
int |
getAccessFlags()
|
AnnotationBinding[] |
getAnnotations()
|
long |
getAnnotationTagBits()
Compute the tagbits for standard annotations. |
int |
getEnclosingInstancesSlotSize()
|
MethodBinding |
getExactConstructor(TypeBinding[] argumentTypes)
|
MethodBinding |
getExactMethod(char[] selector,
TypeBinding[] argumentTypes,
CompilationUnitScope refScope)
|
FieldBinding |
getField(char[] fieldName,
boolean needResolve)
|
FieldBinding |
getField(char[] fieldName,
boolean resolve,
InvocationSite site,
Scope scope)
Where multiple fields with the same name are defined, this will return the one most visible one... |
char[] |
getFileName()
|
ReferenceBinding |
getMemberType(char[] typeName)
|
MethodBinding[] |
getMethods(char[] selector)
|
MethodBinding[] |
getMethods(char[] selector,
int suggestedParameterLength)
|
int |
getOuterLocalVariablesSlotSize()
|
PackageBinding |
getPackage()
|
MethodBinding |
getSingleAbstractMethod(Scope scope,
boolean replaceWildcards)
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. |
TypeVariableBinding |
getTypeVariable(char[] variableName)
|
int |
hashCode()
|
boolean |
hasIncompatibleSuperType(ReferenceBinding otherType)
Returns true if the two types have an incompatible common supertype, e.g. |
boolean |
hasMemberTypes()
|
boolean |
hasRestrictedAccess()
|
boolean |
implementsInterface(ReferenceBinding anInterface,
boolean searchHierarchy)
Answer true if the receiver implements anInterface or is identical to anInterface. |
boolean |
innerCanBeSeenBy(ReferenceBinding receiverType,
ReferenceBinding invocationType)
|
boolean |
innerCanBeSeenBy(Scope scope)
|
boolean |
isAbstract()
Answer true if the receiver is an abstract type |
boolean |
isAnnotationType()
|
boolean |
isBinaryBinding()
|
boolean |
isClass()
|
boolean |
isCompatibleWith(TypeBinding otherType,
Scope captureScope)
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) |
static boolean |
isConsistentIntersection(TypeBinding[] intersectingTypes)
|
boolean |
isDefault()
Answer true if the receiver has default visibility |
boolean |
isDeprecated()
Answer true if the receiver is a deprecated type |
boolean |
isEnum()
|
boolean |
isFinal()
Answer true if the receiver is final and cannot be subclassed |
boolean |
isFunctionalInterface(Scope scope)
|
boolean |
isHierarchyBeingActivelyConnected()
Returns true if the type hierarchy is being connected "actively" i.e not paused momentatrily, while resolving type arguments. |
boolean |
isHierarchyBeingConnected()
Returns true if the type hierarchy is being connected |
boolean |
isHierarchyConnected()
Returns true if the type hierarchy is connected |
boolean |
isInterface()
|
boolean |
isOrEnclosedByPrivateType()
Answer true if the receiver or any of its enclosing types have private visibility |
boolean |
isPrivate()
Answer true if the receiver has private visibility |
boolean |
isProperType(boolean admitCapture18)
JLS8 Sect 18.1.1 |
boolean |
isProtected()
Answer true if the receiver has protected visibility |
boolean |
isPublic()
Answer true if the receiver has public visibility |
boolean |
isStatic()
Answer true if the receiver is a static member type (or toplevel) |
boolean |
isStrictfp()
Answer true if all float operations must adher to IEEE 754 float/double rules |
boolean |
isSubtypeOf(TypeBinding other)
|
protected boolean |
isSubTypeOfRTL(TypeBinding other)
|
boolean |
isSuperclassOf(ReferenceBinding otherType)
Answer true if the receiver is in the superclass hierarchy of aType NOTE: Object.isSuperclassOf(Object) -> false |
boolean |
isThrowable()
Returns true if a given type may be thrown |
boolean |
isUncheckedException(boolean includeSupertype)
JLS 11.5 ensures that Throwable, Exception, RuntimeException and Error are directly connected. |
boolean |
isUsed()
Answer true if the receiver has private visibility and is used locally |
boolean |
isViewedAsDeprecated()
Answer true if the receiver is deprecated (or any of its enclosing types) |
ReferenceBinding[] |
memberTypes()
|
MethodBinding[] |
methods()
|
char[] |
nullAnnotatedReadableName(CompilerOptions options,
boolean shortNames)
Answer a readable name (for error reporting) that includes nullness type annotations. |
ReferenceBinding |
outermostEnclosingType()
|
char[] |
qualifiedSourceName()
Answer the source name for the type. |
char[] |
readableName()
Answer the receiver's signature. |
AnnotationHolder |
retrieveAnnotationHolder(Binding binding,
boolean forceInitialization)
|
void |
setAnnotations(AnnotationBinding[] annotations)
|
void |
setContainerAnnotationType(ReferenceBinding value)
|
char[] |
shortReadableName()
|
char[] |
signature()
Answer the receiver classfile signature. |
static void |
sortFields(FieldBinding[] sortedFields,
int left,
int right)
Sort the field array using a quicksort |
static void |
sortMethods(MethodBinding[] sortedMethods,
int left,
int right)
Sort the field array using a quicksort |
char[] |
sourceName()
|
ReferenceBinding |
superclass()
|
ReferenceBinding[] |
superInterfaces()
|
ReferenceBinding[] |
syntheticEnclosingInstanceTypes()
|
void |
tagAsHavingDefectiveContainerType()
|
FieldBinding[] |
unResolvedFields()
|
| 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, toString, wait, wait, wait |
| Field Detail |
|---|
public char[][] compoundName
public char[] sourceName
public int modifiers
public PackageBinding fPackage
protected MethodBinding[] singleAbstractMethod
public static final ReferenceBinding LUB_GENERIC
protected static ProblemMethodBinding samProblemBinding
| Constructor Detail |
|---|
public ReferenceBinding(ReferenceBinding prototype)
public ReferenceBinding()
| Method Detail |
|---|
public static FieldBinding binarySearch(char[] name,
FieldBinding[] sortedFields)
public static long binarySearch(char[] selector,
MethodBinding[] sortedMethods)
selector - sortedMethods -
public static void sortFields(FieldBinding[] sortedFields,
int left,
int right)
public static void sortMethods(MethodBinding[] sortedMethods,
int left,
int right)
public FieldBinding[] availableFields()
public MethodBinding[] availableMethods()
public boolean canBeInstantiated()
canBeInstantiated in class TypeBindingpublic boolean canBeSeenBy(PackageBinding invocationPackage)
public boolean canBeSeenBy(ReferenceBinding receiverType,
ReferenceBinding invocationType)
public final boolean innerCanBeSeenBy(ReferenceBinding receiverType,
ReferenceBinding invocationType)
public boolean canBeSeenBy(Scope scope)
canBeSeenBy in class TypeBindingpublic final boolean innerCanBeSeenBy(Scope scope)
public char[] computeGenericTypeSignature(TypeVariableBinding[] typeVariables)
public void computeId()
public char[] computeUniqueKey(boolean isLeaf)
computeUniqueKey in class Bindingpublic char[] constantPoolName()
constantPoolName in class TypeBindingpublic java.lang.String debugName()
debugName in class TypeBindingpublic int depth()
depth in class TypeBindingpublic boolean detectAnnotationCycle()
public final ReferenceBinding enclosingTypeAt(int relativeDepth)
public int enumConstantCount()
public int fieldCount()
public FieldBinding[] fields()
public final int getAccessFlags()
public AnnotationBinding[] getAnnotations()
getAnnotations in class Bindingpublic long getAnnotationTagBits()
Binding
getAnnotationTagBits in class BindingBinding.getAnnotationTagBits()public int getEnclosingInstancesSlotSize()
public MethodBinding getExactConstructor(TypeBinding[] argumentTypes)
public MethodBinding getExactMethod(char[] selector,
TypeBinding[] argumentTypes,
CompilationUnitScope refScope)
public FieldBinding getField(char[] fieldName,
boolean needResolve)
public FieldBinding getField(char[] fieldName,
boolean resolve,
InvocationSite site,
Scope scope)
public char[] getFileName()
IDependent.getFileName()public ReferenceBinding getMemberType(char[] typeName)
public MethodBinding[] getMethods(char[] selector)
getMethods in class TypeBinding
public MethodBinding[] getMethods(char[] selector,
int suggestedParameterLength)
public int getOuterLocalVariablesSlotSize()
public PackageBinding getPackage()
getPackage in class TypeBindingpublic TypeVariableBinding getTypeVariable(char[] variableName)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean hasIncompatibleSuperType(ReferenceBinding otherType)
public boolean hasMemberTypes()
public boolean acceptsNonNullDefault()
TypeBinding
acceptsNonNullDefault in class TypeBindingpublic final boolean hasRestrictedAccess()
public boolean implementsInterface(ReferenceBinding anInterface,
boolean searchHierarchy)
public final boolean isAbstract()
public boolean isAnnotationType()
isAnnotationType in class Bindingpublic final boolean isBinaryBinding()
public boolean isClass()
isClass in class TypeBindingpublic boolean isProperType(boolean admitCapture18)
TypeBinding
isProperType in class TypeBindingadmitCapture18 - 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 isCompatibleWith(TypeBinding otherType,
Scope captureScope)
isCompatibleWith in class TypeBindingpublic boolean isSubtypeOf(TypeBinding other)
isSubtypeOf in class TypeBindingprotected boolean isSubTypeOfRTL(TypeBinding other)
public final boolean isDefault()
public final boolean isDeprecated()
public boolean isEnum()
isEnum in class TypeBindingpublic final boolean isFinal()
public boolean isHierarchyBeingConnected()
public boolean isHierarchyBeingActivelyConnected()
public boolean isHierarchyConnected()
public boolean isInterface()
isInterface in class TypeBindingpublic boolean isFunctionalInterface(Scope scope)
isFunctionalInterface in class TypeBindingpublic final boolean isPrivate()
public final boolean isOrEnclosedByPrivateType()
public final boolean isProtected()
public final boolean isPublic()
public final boolean isStatic()
isStatic in class TypeBindingpublic final boolean isStrictfp()
public boolean isSuperclassOf(ReferenceBinding otherType)
public boolean isThrowable()
TypeBinding
isThrowable in class TypeBindingTypeBinding.isThrowable()public boolean isUncheckedException(boolean includeSupertype)
isUncheckedException in class TypeBindingTypeBinding.isUncheckedException(boolean)public final boolean isUsed()
public final boolean isViewedAsDeprecated()
public ReferenceBinding[] memberTypes()
public MethodBinding[] methods()
public final ReferenceBinding outermostEnclosingType()
public char[] qualifiedSourceName()
qualifiedSourceName in class TypeBindingpublic char[] readableName()
readableName in class Binding
protected void appendNullAnnotation(java.lang.StringBuffer nameBuffer,
CompilerOptions options)
public AnnotationHolder retrieveAnnotationHolder(Binding binding,
boolean forceInitialization)
public void setAnnotations(AnnotationBinding[] annotations)
setAnnotations in class Bindingpublic void setContainerAnnotationType(ReferenceBinding value)
public void tagAsHavingDefectiveContainerType()
public char[] nullAnnotatedReadableName(CompilerOptions options,
boolean shortNames)
TypeBinding
nullAnnotatedReadableName in class TypeBindingTypeBinding.nullAnnotatedReadableName(CompilerOptions,boolean)public char[] shortReadableName()
shortReadableName in class Bindingpublic char[] signature()
TypeBinding
signature in class TypeBindingpublic char[] sourceName()
sourceName in class TypeBindingpublic ReferenceBinding superclass()
superclass in class TypeBindingpublic ReferenceBinding[] superInterfaces()
superInterfaces in class TypeBindingpublic ReferenceBinding[] syntheticEnclosingInstanceTypes()
public FieldBinding[] unResolvedFields()
protected int applyCloseableClassWhitelists()
protected int applyCloseableInterfaceWhitelists()
public MethodBinding getSingleAbstractMethod(Scope scope,
boolean replaceWildcards)
TypeBinding
getSingleAbstractMethod in class TypeBindingscope - scopereplaceWildcards - Should wildcards be replaced following JLS 9.8? Say false for lambdas with explicit argument types which should apply 18.5.3
public static boolean isConsistentIntersection(TypeBinding[] intersectingTypes)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||