|
|||||||||
| 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.Scope
public abstract class Scope
| Field Summary | |
|---|---|
static int |
AUTOBOX_COMPATIBLE
|
static int |
BLOCK_SCOPE
|
static int |
CLASS_SCOPE
|
static int |
COMPATIBLE
|
static int |
COMPILATION_UNIT_SCOPE
|
static int |
EQUAL_OR_MORE_SPECIFIC
|
int |
kind
|
static int |
METHOD_SCOPE
|
static int |
MORE_GENERIC
|
static int |
NOT_COMPATIBLE
|
static int |
NOT_RELATED
|
Scope |
parent
|
static int |
VARARGS_COMPATIBLE
|
| Constructor Summary | |
|---|---|
protected |
Scope(int kind,
Scope parent)
|
| Method Summary | |
|---|---|
TypeBinding |
boxing(TypeBinding type)
|
ClassScope |
classScope()
|
static int |
compareTypes(TypeBinding left,
TypeBinding right)
|
CompilationUnitScope |
compilationUnitScope()
|
CompilerOptions |
compilerOptions()
Finds the most specific compiler options |
protected MethodBinding |
computeCompatibleMethod(MethodBinding method,
TypeBinding[] arguments,
InvocationSite invocationSite)
Internal use only Given a method, returns null if arguments cannot be converted to parameters. |
protected boolean |
connectTypeVariables(TypeParameter[] typeParameters,
boolean checkForErasedCandidateCollisions)
|
ArrayBinding |
createArrayType(TypeBinding type,
int dimension)
|
TypeVariableBinding[] |
createTypeVariables(TypeParameter[] typeParameters,
Binding declaringElement)
|
ClassScope |
enclosingClassScope()
|
MethodScope |
enclosingMethodScope()
|
ReferenceBinding |
enclosingReceiverType()
|
ReferenceContext |
enclosingReferenceContext()
Returns the immediately enclosing reference context, starting from current scope parent. |
SourceTypeBinding |
enclosingSourceType()
|
LookupEnvironment |
environment()
|
protected MethodBinding |
findDefaultAbstractMethod(ReferenceBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite,
ReferenceBinding classHierarchyStart,
ObjectVector found,
MethodBinding concreteMatch)
|
ReferenceBinding |
findDirectMemberType(char[] typeName,
ReferenceBinding enclosingType)
|
MethodBinding |
findExactMethod(ReferenceBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
|
FieldBinding |
findField(TypeBinding receiverType,
char[] fieldName,
InvocationSite invocationSite,
boolean needResolve)
|
ReferenceBinding |
findMemberType(char[] typeName,
ReferenceBinding enclosingType)
|
MethodBinding |
findMethod(ReferenceBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
|
MethodBinding |
findMethodForArray(ArrayBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
|
protected void |
findMethodInSuperInterfaces(ReferenceBinding currentType,
char[] selector,
ObjectVector found)
|
static IPrivilegedHandler |
findPrivilegedHandler(ReferenceBinding type)
|
ReferenceBinding |
findType(char[] typeName,
PackageBinding declarationPackage,
PackageBinding invocationPackage)
|
TypeVariableBinding |
findTypeVariable(char[] name,
SourceTypeBinding sourceType)
Other scopes can override this method |
LocalVariableBinding |
findVariable(char[] variable)
|
static TypeBinding |
getBaseType(char[] name)
|
Binding |
getBinding(char[] name,
int mask,
InvocationSite invocationSite,
boolean needResolve)
|
MethodBinding |
getConstructor(ReferenceBinding receiverType,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
|
PackageBinding |
getCurrentPackage()
|
int |
getDeclarationModifiers()
Returns the modifiers of the innermost enclosing declaration. |
FieldBinding |
getField(TypeBinding receiverType,
char[] fieldName,
InvocationSite invocationSite)
|
MethodBinding |
getImplicitMethod(char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
|
ReferenceBinding |
getJavaIoSerializable()
|
ReferenceBinding |
getJavaLangAnnotationAnnotation()
|
ReferenceBinding |
getJavaLangAssertionError()
|
ReferenceBinding |
getJavaLangClass()
|
ReferenceBinding |
getJavaLangCloneable()
|
ReferenceBinding |
getJavaLangEnum()
|
ReferenceBinding |
getJavaLangIterable()
|
ReferenceBinding |
getJavaLangObject()
|
ReferenceBinding |
getJavaLangString()
|
ReferenceBinding |
getJavaLangThrowable()
|
ReferenceBinding |
getJavaUtilIterator()
|
ReferenceBinding |
getMemberType(char[] typeName,
ReferenceBinding enclosingType)
|
MethodBinding |
getMethod(TypeBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
|
Binding |
getPackage(char[][] compoundName)
|
TypeBinding |
getType(char[] name)
|
TypeBinding |
getType(char[][] compoundName,
int typeNameLength)
|
TypeBinding |
getType(char[] name,
PackageBinding packageBinding)
|
Binding |
getTypeOrPackage(char[][] compoundName)
|
static ReferenceBinding[] |
greaterLowerBound(ReferenceBinding[] types)
|
static TypeBinding[] |
greaterLowerBound(TypeBinding[] types)
|
protected boolean |
hasErasedCandidatesCollisions(TypeBinding one,
TypeBinding two,
java.util.Map invocations,
ReferenceBinding type,
ASTNode typeRef)
|
CaseStatement |
innermostSwitchCase()
Returns the immediately enclosing switchCase statement (carried by closest blockScope), |
SourceTypeBinding |
invocationType()
For Java scopes, the invocationType is always the same as the enclosingSourceType This distinction is important for AspectJ's inter-type declarations For inter-type declarations, the invocationType is the lexically enclosing type. |
protected boolean |
isAcceptableMethod(MethodBinding one,
MethodBinding two)
|
boolean |
isBoxingCompatibleWith(TypeBinding expressionType,
TypeBinding targetType)
|
boolean |
isDefinedInField(FieldBinding field)
|
boolean |
isDefinedInMethod(MethodBinding method)
|
boolean |
isDefinedInSameUnit(ReferenceBinding type)
|
boolean |
isDefinedInType(ReferenceBinding type)
|
boolean |
isInsideCase(CaseStatement caseStatement)
Returns true if the scope or one of its parent is associated to a given caseStatement, denoting being part of a given switch case statement. |
boolean |
isInsideDeprecatedCode()
|
TypeBinding |
lowerUpperBound(TypeBinding[] types)
Returns VoidBinding if types have no intersection (e.g. |
MethodScope |
methodScope()
|
protected TypeBinding[] |
minimalErasedCandidates(TypeBinding[] types,
java.util.Map allInvocations)
Returns the most specific set of types compatible with all given types. |
protected MethodBinding |
mostSpecificClassMethodBinding(MethodBinding[] visible,
int visibleSize,
InvocationSite invocationSite)
|
protected MethodBinding |
mostSpecificInterfaceMethodBinding(MethodBinding[] visible,
int visibleSize,
InvocationSite invocationSite)
|
protected MethodBinding |
mostSpecificMethodBinding(MethodBinding[] visible,
int visibleSize,
TypeBinding[] argumentTypes,
InvocationSite invocationSite,
ReferenceBinding receiverType)
|
ClassScope |
outerMostClassScope()
|
MethodScope |
outerMostMethodScope()
|
int |
parameterCompatibilityLevel(MethodBinding method,
TypeBinding[] arguments)
|
abstract ProblemReporter |
problemReporter()
|
CompilationUnitDeclaration |
referenceCompilationUnit()
|
ReferenceContext |
referenceContext()
Returns the nearest reference context, starting from current scope. |
static ReferenceBinding[] |
substitute(Substitution substitution,
ReferenceBinding[] originalTypes)
Returns an array of types, where original types got substituted given a substitution. |
static TypeBinding |
substitute(Substitution substitution,
TypeBinding originalType)
Returns a type, where original type was substituted using the receiver parameterized type. |
static TypeBinding[] |
substitute(Substitution substitution,
TypeBinding[] originalTypes)
Returns an array of types, where original types got substituted given a substitution. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BLOCK_SCOPE
public static final int CLASS_SCOPE
public static final int COMPILATION_UNIT_SCOPE
public static final int METHOD_SCOPE
public static final int NOT_COMPATIBLE
public static final int COMPATIBLE
public static final int AUTOBOX_COMPATIBLE
public static final int VARARGS_COMPATIBLE
public static final int EQUAL_OR_MORE_SPECIFIC
public static final int NOT_RELATED
public static final int MORE_GENERIC
public int kind
public Scope parent
| Constructor Detail |
|---|
protected Scope(int kind,
Scope parent)
| Method Detail |
|---|
public static int compareTypes(TypeBinding left,
TypeBinding right)
public static TypeBinding getBaseType(char[] name)
public static ReferenceBinding[] greaterLowerBound(ReferenceBinding[] types)
public static TypeBinding[] greaterLowerBound(TypeBinding[] types)
public static ReferenceBinding[] substitute(Substitution substitution,
ReferenceBinding[] originalTypes)
public static TypeBinding substitute(Substitution substitution,
TypeBinding originalType)
public static TypeBinding[] substitute(Substitution substitution,
TypeBinding[] originalTypes)
public TypeBinding boxing(TypeBinding type)
public final ClassScope classScope()
public final CompilationUnitScope compilationUnitScope()
public final CompilerOptions compilerOptions()
protected final MethodBinding computeCompatibleMethod(MethodBinding method,
TypeBinding[] arguments,
InvocationSite invocationSite)
protected boolean connectTypeVariables(TypeParameter[] typeParameters,
boolean checkForErasedCandidateCollisions)
public ArrayBinding createArrayType(TypeBinding type,
int dimension)
public TypeVariableBinding[] createTypeVariables(TypeParameter[] typeParameters,
Binding declaringElement)
public final ClassScope enclosingClassScope()
public final MethodScope enclosingMethodScope()
public final ReferenceBinding enclosingReceiverType()
public ReferenceContext enclosingReferenceContext()
public final SourceTypeBinding enclosingSourceType()
public SourceTypeBinding invocationType()
public final LookupEnvironment environment()
protected MethodBinding findDefaultAbstractMethod(ReferenceBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite,
ReferenceBinding classHierarchyStart,
ObjectVector found,
MethodBinding concreteMatch)
public ReferenceBinding findDirectMemberType(char[] typeName,
ReferenceBinding enclosingType)
public MethodBinding findExactMethod(ReferenceBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
public static final IPrivilegedHandler findPrivilegedHandler(ReferenceBinding type)
public FieldBinding findField(TypeBinding receiverType,
char[] fieldName,
InvocationSite invocationSite,
boolean needResolve)
public ReferenceBinding findMemberType(char[] typeName,
ReferenceBinding enclosingType)
public MethodBinding findMethod(ReferenceBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
public MethodBinding findMethodForArray(ArrayBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
protected void findMethodInSuperInterfaces(ReferenceBinding currentType,
char[] selector,
ObjectVector found)
public ReferenceBinding findType(char[] typeName,
PackageBinding declarationPackage,
PackageBinding invocationPackage)
public LocalVariableBinding findVariable(char[] variable)
public Binding getBinding(char[] name,
int mask,
InvocationSite invocationSite,
boolean needResolve)
public MethodBinding getConstructor(ReferenceBinding receiverType,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
public final PackageBinding getCurrentPackage()
public int getDeclarationModifiers()
public FieldBinding getField(TypeBinding receiverType,
char[] fieldName,
InvocationSite invocationSite)
public MethodBinding getImplicitMethod(char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
public final ReferenceBinding getJavaIoSerializable()
public final ReferenceBinding getJavaLangAnnotationAnnotation()
public final ReferenceBinding getJavaLangAssertionError()
public final ReferenceBinding getJavaLangClass()
public final ReferenceBinding getJavaLangCloneable()
public final ReferenceBinding getJavaLangEnum()
public final ReferenceBinding getJavaLangIterable()
public final ReferenceBinding getJavaLangObject()
public final ReferenceBinding getJavaLangString()
public final ReferenceBinding getJavaLangThrowable()
public final ReferenceBinding getJavaUtilIterator()
public final ReferenceBinding getMemberType(char[] typeName,
ReferenceBinding enclosingType)
public MethodBinding getMethod(TypeBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite)
public final Binding getPackage(char[][] compoundName)
public final TypeBinding getType(char[] name)
public final TypeBinding getType(char[] name,
PackageBinding packageBinding)
public final TypeBinding getType(char[][] compoundName,
int typeNameLength)
public final Binding getTypeOrPackage(char[][] compoundName)
protected boolean hasErasedCandidatesCollisions(TypeBinding one,
TypeBinding two,
java.util.Map invocations,
ReferenceBinding type,
ASTNode typeRef)
public CaseStatement innermostSwitchCase()
protected boolean isAcceptableMethod(MethodBinding one,
MethodBinding two)
public boolean isBoxingCompatibleWith(TypeBinding expressionType,
TypeBinding targetType)
public final boolean isDefinedInField(FieldBinding field)
public final boolean isDefinedInMethod(MethodBinding method)
public final boolean isDefinedInSameUnit(ReferenceBinding type)
public final boolean isDefinedInType(ReferenceBinding type)
public boolean isInsideCase(CaseStatement caseStatement)
public boolean isInsideDeprecatedCode()
public TypeBinding lowerUpperBound(TypeBinding[] types)
public final MethodScope methodScope()
protected TypeBinding[] minimalErasedCandidates(TypeBinding[] types,
java.util.Map allInvocations)
protected final MethodBinding mostSpecificClassMethodBinding(MethodBinding[] visible,
int visibleSize,
InvocationSite invocationSite)
protected final MethodBinding mostSpecificInterfaceMethodBinding(MethodBinding[] visible,
int visibleSize,
InvocationSite invocationSite)
protected final MethodBinding mostSpecificMethodBinding(MethodBinding[] visible,
int visibleSize,
TypeBinding[] argumentTypes,
InvocationSite invocationSite,
ReferenceBinding receiverType)
public final ClassScope outerMostClassScope()
public final MethodScope outerMostMethodScope()
public int parameterCompatibilityLevel(MethodBinding method,
TypeBinding[] arguments)
public abstract ProblemReporter problemReporter()
public final CompilationUnitDeclaration referenceCompilationUnit()
public ReferenceContext referenceContext()
public TypeVariableBinding findTypeVariable(char[] name,
SourceTypeBinding sourceType)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||