org.aspectj.org.eclipse.jdt.internal.compiler.lookup
Class SourceTypeBinding
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.SourceTypeBinding
- All Implemented Interfaces:
- IDependent
- Direct Known Subclasses:
- BinaryTypeBinding, HelperInterfaceBinding, NestedTypeBinding
public class SourceTypeBinding
- extends ReferenceBinding
AspectJ Extension - added hooks
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding |
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, id, INT, LONG, NULL, SHORT, tagBits, VOID |
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding |
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, FIELD, GENERIC_TYPE, IMPORT, LOCAL, METHOD, NO_ANNOTATIONS, NO_ELEMENT_VALUE_PAIRS, NO_EXCEPTIONS, NO_FIELDS, NO_MEMBER_TYPES, NO_METHODS, NO_PARAMETERS, NO_SUPERINTERFACES, NO_TYPE_VARIABLES, NO_TYPES, PACKAGE, PARAMETERIZED_TYPE, RAW_TYPE, TYPE, TYPE_PARAMETER, VARIABLE, WILDCARD_TYPE |
|
Method Summary |
void |
addField(FieldBinding binding)
|
void |
addMethod(MethodBinding binding)
|
SyntheticMethodBinding |
addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge,
MethodBinding targetMethod)
|
SyntheticMethodBinding |
addSyntheticEnumMethod(char[] selector)
|
FieldBinding |
addSyntheticField(SyntheticFieldBinding sfb)
|
FieldBinding |
addSyntheticFieldForAssert(BlockScope blockScope)
|
FieldBinding |
addSyntheticFieldForClassLiteral(TypeBinding targetType,
BlockScope blockScope)
|
FieldBinding |
addSyntheticFieldForEnumValues()
|
FieldBinding |
addSyntheticFieldForInnerclass(LocalVariableBinding actualOuterLocalVariable)
|
FieldBinding |
addSyntheticFieldForInnerclass(ReferenceBinding enclosingType)
|
SyntheticFieldBinding |
addSyntheticFieldForSwitchEnum(char[] fieldName,
java.lang.String key)
|
SyntheticMethodBinding |
addSyntheticMethod(FieldBinding targetField,
boolean isReadAccess)
|
SyntheticMethodBinding |
addSyntheticMethod(MethodBinding targetMethod,
boolean isSuperAccess)
|
SyntheticMethodBinding |
addSyntheticMethodForSwitchEnum(TypeBinding enumBinding)
|
char[] |
computeUniqueKey(boolean isLeaf)
|
FieldBinding[] |
fields()
|
char[] |
genericSignature()
|
char[] |
genericTypeSignature()
Answer the receiver classfile signature. |
long |
getAnnotationTagBits()
Compute the tagbits for standard annotations. |
MethodBinding[] |
getDefaultAbstractMethods()
|
MethodBinding |
getExactConstructor(TypeBinding[] argumentTypes)
|
MethodBinding |
getExactMethod(char[] selector,
TypeBinding[] argumentTypes,
CompilationUnitScope refScope)
|
MethodBinding |
getExactMethodBase(char[] selector,
TypeBinding[] argumentTypes,
CompilationUnitScope refScope)
|
FieldBinding |
getField(char[] fieldName,
boolean needResolve)
|
FieldBinding |
getField(char[] fieldName,
boolean needResolve,
InvocationSite site,
Scope scope)
Where multiple fields with the same name are defined, this will
return the one most visible one... |
FieldBinding |
getFieldBase(char[] fieldName,
boolean needResolve)
|
ReferenceBinding |
getMemberType(char[] typeName)
|
MethodBinding[] |
getMethods(char[] selector)
|
MethodBinding[] |
getMethodsBase(char[] selector)
|
SyntheticMethodBinding |
getSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge)
|
FieldBinding |
getSyntheticField(LocalVariableBinding actualOuterLocalVariable)
|
FieldBinding |
getSyntheticField(ReferenceBinding targetEnclosingType,
boolean onlyExactMatch)
|
FieldBinding |
getUpdatedFieldBinding(FieldBinding targetField,
ReferenceBinding newDeclaringClass)
|
MethodBinding |
getUpdatedMethodBinding(MethodBinding targetMethod,
ReferenceBinding newDeclaringClass)
|
boolean |
hasMemberTypes()
|
void |
initializeDeprecatedAnnotationTagBits()
Compute the tag bits for @Deprecated annotations, avoiding resolving
entire annotation if not necessary. |
boolean |
isEquivalentTo(TypeBinding otherType)
Returns true if a type is identical to another one,
or for generic types, true if compared to its raw type. |
boolean |
isGenericType()
|
int |
kind()
|
ReferenceBinding[] |
memberTypes()
|
MethodBinding[] |
methods()
|
MethodBinding[] |
methodsBase()
|
void |
rememberTypeHierarchy()
|
void |
removeMethod(int index)
|
MethodBinding |
resolveTypesFor(MethodBinding method)
|
AnnotationHolder |
retrieveAnnotationHolder(Binding binding,
boolean forceInitialization)
|
void |
setFields(FieldBinding[] fields)
|
void |
setMethods(MethodBinding[] methods)
|
int |
sourceEnd()
|
int |
sourceStart()
|
ReferenceBinding |
superclass()
|
ReferenceBinding[] |
superInterfaces()
|
FieldBinding[] |
syntheticFields()
Answer the collection of synthetic fields to append into the classfile |
SyntheticMethodBinding[] |
syntheticMethods()
|
java.lang.String |
toString()
|
TypeVariableBinding[] |
typeVariables()
|
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding |
availableFields, availableMethods, binarySearch, binarySearch, canBeInstantiated, canBeSeenBy, canBeSeenBy, canBeSeenBy, closestMatch, computeGenericTypeSignature, computeId, constantPoolName, debugName, depth, detectAnnotationCycle, enclosingTypeAt, enumConstantCount, fieldCount, getAccessFlags, getAnnotations, getFileName, getPackage, getTypeVariable, hashCode, hasIncompatibleSuperType, hasRestrictedAccess, implementsInterface, innerCanBeSeenBy, innerCanBeSeenBy, isAbstract, isAnnotationType, isBinaryBinding, isClass, isCompatibleWith, isDefault, isDeprecated, isEnum, isFinal, isHierarchyBeingConnected, isInterface, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSuperclassOf, isThrowable, isUncheckedException, isUsed, isViewedAsDeprecated, outermostEnclosingType, qualifiedSourceName, readableName, setAnnotations, shortReadableName, signature, sortFields, sortMethods, sourceName, syntheticEnclosingInstanceTypes, syntheticOuterLocalVariables |
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding |
capture, collectSubstitutes, dimensions, enclosingType, erasure, findSuperTypeErasingTo, findSuperTypeWithSameErasure, genericCast, isAnonymousType, isArrayType, isBaseType, isBoundParameterizedType, isCapture, isHierarchyInconsistent, isIntersectingWith, isIntersectionType, isLocalType, isMemberType, isNestedType, isNumericType, isParameterizedType, isParameterizedWithOwnVariables, isProvablyDistinctFrom, isRawType, isReifiable, isTypeArgumentContainedBy, isTypeArgumentIntersecting, isTypeVariable, isUnboundWildcard, isWildcard, leafComponentType, needsUncheckedConversion, qualifiedPackageName, swapUnresolved, wellKnownType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
superclass
public ReferenceBinding superclass
superInterfaces
public ReferenceBinding[] superInterfaces
fields
public FieldBinding[] fields
methods
public MethodBinding[] methods
memberTypes
public ReferenceBinding[] memberTypes
typeVariables
public TypeVariableBinding[] typeVariables
originalSuperclass
public ReferenceBinding originalSuperclass
originalSuperInterfaces
public ReferenceBinding[] originalSuperInterfaces
privilegedHandler
public IPrivilegedHandler privilegedHandler
memberFinder
public IMemberFinder memberFinder
typeFinder
public ITypeFinder typeFinder
scope
public ClassScope scope
METHOD_EMUL
public static final int METHOD_EMUL
- See Also:
- Constant Field Values
FIELD_EMUL
public static final int FIELD_EMUL
- See Also:
- Constant Field Values
CLASS_LITERAL_EMUL
public static final int CLASS_LITERAL_EMUL
- See Also:
- Constant Field Values
RECEIVER_TYPE_EMUL
public static final int RECEIVER_TYPE_EMUL
- See Also:
- Constant Field Values
SourceTypeBinding
public SourceTypeBinding()
SourceTypeBinding
public SourceTypeBinding(char[][] compoundName,
PackageBinding fPackage,
ClassScope scope)
addSyntheticFieldForInnerclass
public FieldBinding addSyntheticFieldForInnerclass(LocalVariableBinding actualOuterLocalVariable)
addSyntheticFieldForInnerclass
public FieldBinding addSyntheticFieldForInnerclass(ReferenceBinding enclosingType)
addSyntheticFieldForClassLiteral
public FieldBinding addSyntheticFieldForClassLiteral(TypeBinding targetType,
BlockScope blockScope)
addSyntheticFieldForAssert
public FieldBinding addSyntheticFieldForAssert(BlockScope blockScope)
addSyntheticFieldForEnumValues
public FieldBinding addSyntheticFieldForEnumValues()
addSyntheticField
public FieldBinding addSyntheticField(SyntheticFieldBinding sfb)
addSyntheticMethod
public SyntheticMethodBinding addSyntheticMethod(FieldBinding targetField,
boolean isReadAccess)
addSyntheticEnumMethod
public SyntheticMethodBinding addSyntheticEnumMethod(char[] selector)
addSyntheticFieldForSwitchEnum
public SyntheticFieldBinding addSyntheticFieldForSwitchEnum(char[] fieldName,
java.lang.String key)
addSyntheticMethodForSwitchEnum
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding)
addSyntheticMethod
public SyntheticMethodBinding addSyntheticMethod(MethodBinding targetMethod,
boolean isSuperAccess)
addSyntheticBridgeMethod
public SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge,
MethodBinding targetMethod)
kind
public int kind()
- Overrides:
kind in class TypeBinding
computeUniqueKey
public char[] computeUniqueKey(boolean isLeaf)
- Overrides:
computeUniqueKey in class ReferenceBinding
fields
public FieldBinding[] fields()
- Overrides:
fields in class ReferenceBinding
genericTypeSignature
public char[] genericTypeSignature()
- Description copied from class:
TypeBinding
- Answer the receiver classfile signature.
Arrays & base types do not distinguish between signature() & constantPoolName().
NOTE: This method should only be used during/after code gen.
- Overrides:
genericTypeSignature in class TypeBinding
- See Also:
TypeBinding.genericTypeSignature()
genericSignature
public char[] genericSignature()
- superclass superinterface1 ... superinterfaceN
;U:Ljava/lang/Object;V::Ljava/lang/Runnable;:Ljava/lang/Cloneable;:Ljava/util/Map;>Ljava/lang/Exception;Ljava/lang/Runnable;
getAnnotationTagBits
public long getAnnotationTagBits()
- Compute the tagbits for standard annotations. For source types, these could require
lazily resolving corresponding annotation nodes, in case of forward references.
- Overrides:
getAnnotationTagBits in class ReferenceBinding
- See Also:
Binding.getAnnotationTagBits()
getDefaultAbstractMethods
public MethodBinding[] getDefaultAbstractMethods()
getExactConstructor
public MethodBinding getExactConstructor(TypeBinding[] argumentTypes)
- Overrides:
getExactConstructor in class ReferenceBinding
getExactMethod
public MethodBinding getExactMethod(char[] selector,
TypeBinding[] argumentTypes,
CompilationUnitScope refScope)
- Overrides:
getExactMethod in class ReferenceBinding
getExactMethodBase
public MethodBinding getExactMethodBase(char[] selector,
TypeBinding[] argumentTypes,
CompilationUnitScope refScope)
getField
public FieldBinding getField(char[] fieldName,
boolean needResolve)
- Overrides:
getField in class ReferenceBinding
getField
public FieldBinding getField(char[] fieldName,
boolean needResolve,
InvocationSite site,
Scope scope)
- Description copied from class:
ReferenceBinding
- Where multiple fields with the same name are defined, this will
return the one most visible one...
Added for AspectJ to allow proper lookup with inter-type fields
- Overrides:
getField in class ReferenceBinding
getFieldBase
public FieldBinding getFieldBase(char[] fieldName,
boolean needResolve)
getMethods
public MethodBinding[] getMethods(char[] selector)
- Overrides:
getMethods in class ReferenceBinding
getMethodsBase
public MethodBinding[] getMethodsBase(char[] selector)
getSyntheticField
public FieldBinding getSyntheticField(LocalVariableBinding actualOuterLocalVariable)
getSyntheticField
public FieldBinding getSyntheticField(ReferenceBinding targetEnclosingType,
boolean onlyExactMatch)
getSyntheticBridgeMethod
public SyntheticMethodBinding getSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge)
initializeDeprecatedAnnotationTagBits
public void initializeDeprecatedAnnotationTagBits()
- Description copied from class:
Binding
- Compute the tag bits for @Deprecated annotations, avoiding resolving
entire annotation if not necessary.
- Overrides:
initializeDeprecatedAnnotationTagBits in class Binding
- See Also:
Binding.initializeDeprecatedAnnotationTagBits()
isEquivalentTo
public boolean isEquivalentTo(TypeBinding otherType)
- 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 TypeBinding
isGenericType
public boolean isGenericType()
- Overrides:
isGenericType in class TypeBinding
memberTypes
public ReferenceBinding[] memberTypes()
- Overrides:
memberTypes in class ReferenceBinding
getUpdatedFieldBinding
public FieldBinding getUpdatedFieldBinding(FieldBinding targetField,
ReferenceBinding newDeclaringClass)
getUpdatedMethodBinding
public MethodBinding getUpdatedMethodBinding(MethodBinding targetMethod,
ReferenceBinding newDeclaringClass)
hasMemberTypes
public boolean hasMemberTypes()
- Overrides:
hasMemberTypes in class ReferenceBinding
methodsBase
public MethodBinding[] methodsBase()
resolveTypesFor
public MethodBinding resolveTypesFor(MethodBinding method)
retrieveAnnotationHolder
public AnnotationHolder retrieveAnnotationHolder(Binding binding,
boolean forceInitialization)
- Overrides:
retrieveAnnotationHolder in class ReferenceBinding
setFields
public void setFields(FieldBinding[] fields)
setMethods
public void setMethods(MethodBinding[] methods)
sourceEnd
public final int sourceEnd()
sourceStart
public final int sourceStart()
superclass
public ReferenceBinding superclass()
- Overrides:
superclass in class ReferenceBinding
superInterfaces
public ReferenceBinding[] superInterfaces()
- Overrides:
superInterfaces in class ReferenceBinding
syntheticMethods
public SyntheticMethodBinding[] syntheticMethods()
syntheticFields
public FieldBinding[] syntheticFields()
- Answer the collection of synthetic fields to append into the classfile
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
typeVariables
public TypeVariableBinding[] typeVariables()
- Overrides:
typeVariables in class TypeBinding
addField
public void addField(FieldBinding binding)
addMethod
public void addMethod(MethodBinding binding)
removeMethod
public void removeMethod(int index)
rememberTypeHierarchy
public void rememberTypeHierarchy()
methods
public MethodBinding[] methods()
- Overrides:
methods in class ReferenceBinding
getMemberType
public ReferenceBinding getMemberType(char[] typeName)
- Overrides:
getMemberType in class ReferenceBinding