org.aspectj.org.eclipse.jdt.internal.compiler.lookup
Class Scope

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
Direct Known Subclasses:
BlockScope, ClassScope, CompilationUnitScope

public abstract class Scope
extends java.lang.Object


Nested Class Summary
static class Scope.Substitutor
           
 
Field Summary
static int APPLICABILITY
          Request Invocation Applicability Inference (18.5.1).
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
           
static int FULL_INFERENCE
          Request both APPLICABILITY and INVOCATION_TYPE inference.
static int INVOCATION_TYPE
          Request Invocation Type Inference (18.5.2).
 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, int inferenceLevel)
          Internal use only Given a method, returns null if arguments cannot be converted to parameters.
protected  MethodBinding computeCompatibleMethod(MethodBinding method, TypeBinding[] arguments, InvocationSite invocationSite, int inferenceLevel, boolean tiebreakingVarargsMethods)
          Internal use only Given a method, returns null if arguments cannot be converted to parameters.
protected  boolean connectTypeVariables(TypeParameter[] typeParameters, boolean checkForErasedCandidateCollisions)
          Connect type variable supertypes, and returns true if no problem was detected
static TypeBinding convertEliminatingTypeVariables(TypeBinding originalType, ReferenceBinding genericType, int rank, java.util.Set eliminatedVariables)
          Returns a type where either all variables or specific ones got discarded.
 ArrayBinding createArrayType(TypeBinding type, int dimension)
           
 ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations)
           
 TypeVariableBinding[] createTypeVariables(TypeParameter[] typeParameters, Binding declaringElement)
           
 void deferBoundCheck(TypeReference typeRef)
           
 boolean deferCheck(java.lang.Runnable check)
           
 ClassScope enclosingClassScope()
           
 MethodScope enclosingLambdaScope()
           
 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)
           
 FieldBinding findField(TypeBinding receiverType, char[] fieldName, InvocationSite invocationSite, boolean needResolve, boolean invisibleFieldsOk)
           
 ReferenceBinding findMemberType(char[] typeName, ReferenceBinding enclosingType)
           
 MethodBinding findMethod(ReferenceBinding receiverType, char[] selector, TypeBinding[] argumentTypes, InvocationSite invocationSite, boolean inStaticContext)
           
 MethodBinding findMethod0(ReferenceBinding receiverType, char[] selector, TypeBinding[] argumentTypes, InvocationSite invocationSite, boolean inStaticContext)
           
 MethodBinding findMethodForArray(ArrayBinding receiverType, char[] selector, TypeBinding[] argumentTypes, InvocationSite invocationSite)
           
protected  void findMethodInSuperInterfaces(ReferenceBinding receiverType, char[] selector, ObjectVector found, java.util.List<TypeBinding> visitedTypes, InvocationSite invocationSite)
           
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)
           
 MethodBinding getConstructor0(ReferenceBinding receiverType, TypeBinding[] argumentTypes, InvocationSite invocationSite)
           
 PackageBinding getCurrentPackage()
           
 int getDeclarationModifiers()
          Returns the modifiers of the innermost enclosing declaration.
 MethodBinding getExactConstructor(TypeBinding receiverType, InvocationSite invocationSite)
           
 MethodBinding getExactMethod(TypeBinding receiverType, char[] selector, InvocationSite invocationSite)
           
 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 getJavaLangIllegalArgumentException()
           
 ReferenceBinding getJavaLangInvokeLambdaMetafactory()
           
 ReferenceBinding getJavaLangInvokeMethodHandlesLookup()
           
 ReferenceBinding getJavaLangInvokeSerializedLambda()
           
 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 getOnlyPackage(char[][] compoundName)
           
 Binding getPackage(char[][] compoundName)
           
 MethodBinding getStaticFactory(ParameterizedTypeBinding allocationType, ReferenceBinding originalEnclosingType, TypeBinding[] argumentTypes, Invocation allocationSite)
           
 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, Scope scope, LookupEnvironment environment)
           
abstract  boolean hasDefaultNullnessFor(int location)
          Answer a defaultNullness defined for the closest enclosing scope, using bits from Binding.NullnessDefaultMASK.
 boolean hasErasedCandidatesCollisions(TypeBinding one, TypeBinding two, java.util.Map invocations, ReferenceBinding type, ASTNode typeRef)
           
protected  MethodBinding inferInvocationType(InvocationSite invocationSite, MethodBinding applicable, TypeBinding[] argumentTypes)
          Given a selected applibable method, check if it has an unfinished InferenceContext18 associated.
 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()
           
 boolean isLambdaScope()
           
 boolean isLambdaSubscope()
           
 boolean isPossibleSubtypeOfRawType(TypeBinding paramType)
           
 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)
           
 MethodScope namedMethodScope()
           
 ReferenceContext originalReferenceContext()
          Returns the nearest original reference context, starting from current scope.
 ClassScope outerMostClassScope()
           
 MethodScope outerMostMethodScope()
           
 int parameterCompatibilityLevel(MethodBinding method, TypeBinding[] arguments)
           
 int parameterCompatibilityLevel(MethodBinding method, TypeBinding[] arguments, boolean tiebreakingVarargsMethods)
           
 int parameterCompatibilityLevel(TypeBinding arg, TypeBinding param)
           
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.
 void tagAsAccessingEnclosingInstanceStateOf(ReferenceBinding enclosingType, boolean typeVariableAccess)
           
static BlockScope typeAnnotationsResolutionScope(Scope scope)
           
 boolean validateNullAnnotation(long tagBits, TypeReference typeRef, Annotation[] annotations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCK_SCOPE

public static final int BLOCK_SCOPE
See Also:
Constant Field Values

CLASS_SCOPE

public static final int CLASS_SCOPE
See Also:
Constant Field Values

COMPILATION_UNIT_SCOPE

public static final int COMPILATION_UNIT_SCOPE
See Also:
Constant Field Values

METHOD_SCOPE

public static final int METHOD_SCOPE
See Also:
Constant Field Values

NOT_COMPATIBLE

public static final int NOT_COMPATIBLE
See Also:
Constant Field Values

COMPATIBLE

public static final int COMPATIBLE
See Also:
Constant Field Values

AUTOBOX_COMPATIBLE

public static final int AUTOBOX_COMPATIBLE
See Also:
Constant Field Values

VARARGS_COMPATIBLE

public static final int VARARGS_COMPATIBLE
See Also:
Constant Field Values

EQUAL_OR_MORE_SPECIFIC

public static final int EQUAL_OR_MORE_SPECIFIC
See Also:
Constant Field Values

NOT_RELATED

public static final int NOT_RELATED
See Also:
Constant Field Values

MORE_GENERIC

public static final int MORE_GENERIC
See Also:
Constant Field Values

APPLICABILITY

public static final int APPLICABILITY
Request Invocation Applicability Inference (18.5.1).

See Also:
Constant Field Values

INVOCATION_TYPE

public static final int INVOCATION_TYPE
Request Invocation Type Inference (18.5.2).

See Also:
Constant Field Values

FULL_INFERENCE

public static final int FULL_INFERENCE
Request both APPLICABILITY and INVOCATION_TYPE inference.

See Also:
Constant Field Values

kind

public int kind

parent

public Scope parent
Constructor Detail

Scope

protected Scope(int kind,
                Scope parent)
Method Detail

compareTypes

public static int compareTypes(TypeBinding left,
                               TypeBinding right)

convertEliminatingTypeVariables

public static TypeBinding convertEliminatingTypeVariables(TypeBinding originalType,
                                                          ReferenceBinding genericType,
                                                          int rank,
                                                          java.util.Set eliminatedVariables)
Returns a type where either all variables or specific ones got discarded. e.g. List (discarding ) will return: List>


getBaseType

public static TypeBinding getBaseType(char[] name)

greaterLowerBound

public static ReferenceBinding[] greaterLowerBound(ReferenceBinding[] types)

greaterLowerBound

public static TypeBinding[] greaterLowerBound(TypeBinding[] types,
                                              Scope scope,
                                              LookupEnvironment environment)

substitute

public static ReferenceBinding[] substitute(Substitution substitution,
                                            ReferenceBinding[] originalTypes)
Returns an array of types, where original types got substituted given a substitution. Only allocate an array if anything is different.


substitute

public static TypeBinding substitute(Substitution substitution,
                                     TypeBinding originalType)
Returns a type, where original type was substituted using the receiver parameterized type. In raw mode (see Substitution.isRawSubstitution()), all parameterized types are converted to raw types. Cf. 4.8: "The type of a constructor (8.8), instance method (8.4, 9.4), or non-static field (8.3) M of a raw type C that is not inherited from its superclasses or superinterfaces is the raw type that corresponds to the erasure of its type in the generic declaration corresponding to C."


substitute

public static TypeBinding[] substitute(Substitution substitution,
                                       TypeBinding[] originalTypes)
Returns an array of types, where original types got substituted given a substitution. Only allocate an array if anything is different.


boxing

public TypeBinding boxing(TypeBinding type)

classScope

public final ClassScope classScope()

compilationUnitScope

public final CompilationUnitScope compilationUnitScope()

isLambdaScope

public boolean isLambdaScope()

isLambdaSubscope

public boolean isLambdaSubscope()

compilerOptions

public final CompilerOptions compilerOptions()
Finds the most specific compiler options


computeCompatibleMethod

protected final MethodBinding computeCompatibleMethod(MethodBinding method,
                                                      TypeBinding[] arguments,
                                                      InvocationSite invocationSite,
                                                      int inferenceLevel)
Internal use only Given a method, returns null if arguments cannot be converted to parameters. Will answer a substituted method in case the method was generic and type inference got triggered; in case the method was originally compatible, then simply answer it back.


computeCompatibleMethod

protected final MethodBinding computeCompatibleMethod(MethodBinding method,
                                                      TypeBinding[] arguments,
                                                      InvocationSite invocationSite,
                                                      int inferenceLevel,
                                                      boolean tiebreakingVarargsMethods)
Internal use only Given a method, returns null if arguments cannot be converted to parameters. Will answer a substituted method in case the method was generic and type inference got triggered; in case the method was originally compatible, then simply answer it back.


connectTypeVariables

protected boolean connectTypeVariables(TypeParameter[] typeParameters,
                                       boolean checkForErasedCandidateCollisions)
Connect type variable supertypes, and returns true if no problem was detected

Parameters:
typeParameters -
checkForErasedCandidateCollisions -

createArrayType

public ArrayBinding createArrayType(TypeBinding type,
                                    int dimension)

createArrayType

public ArrayBinding createArrayType(TypeBinding type,
                                    int dimension,
                                    AnnotationBinding[] annotations)

createTypeVariables

public TypeVariableBinding[] createTypeVariables(TypeParameter[] typeParameters,
                                                 Binding declaringElement)

enclosingClassScope

public final ClassScope enclosingClassScope()

enclosingMethodScope

public final MethodScope enclosingMethodScope()

enclosingLambdaScope

public final MethodScope enclosingLambdaScope()

enclosingReceiverType

public final ReferenceBinding enclosingReceiverType()

enclosingReferenceContext

public ReferenceContext enclosingReferenceContext()
Returns the immediately enclosing reference context, starting from current scope parent. If starting on a class, it will skip current class. If starting on unitScope, returns null.


enclosingSourceType

public final SourceTypeBinding enclosingSourceType()

invocationType

public 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.


environment

public final LookupEnvironment environment()

findDefaultAbstractMethod

protected MethodBinding findDefaultAbstractMethod(ReferenceBinding receiverType,
                                                  char[] selector,
                                                  TypeBinding[] argumentTypes,
                                                  InvocationSite invocationSite,
                                                  ReferenceBinding classHierarchyStart,
                                                  ObjectVector found,
                                                  MethodBinding concreteMatch)

findDirectMemberType

public ReferenceBinding findDirectMemberType(char[] typeName,
                                             ReferenceBinding enclosingType)

findExactMethod

public MethodBinding findExactMethod(ReferenceBinding receiverType,
                                     char[] selector,
                                     TypeBinding[] argumentTypes,
                                     InvocationSite invocationSite)

findPrivilegedHandler

public static final IPrivilegedHandler findPrivilegedHandler(ReferenceBinding type)

findField

public FieldBinding findField(TypeBinding receiverType,
                              char[] fieldName,
                              InvocationSite invocationSite,
                              boolean needResolve)

findField

public FieldBinding findField(TypeBinding receiverType,
                              char[] fieldName,
                              InvocationSite invocationSite,
                              boolean needResolve,
                              boolean invisibleFieldsOk)

findMemberType

public ReferenceBinding findMemberType(char[] typeName,
                                       ReferenceBinding enclosingType)

findMethod

public MethodBinding findMethod(ReferenceBinding receiverType,
                                char[] selector,
                                TypeBinding[] argumentTypes,
                                InvocationSite invocationSite,
                                boolean inStaticContext)

findMethod0

public MethodBinding findMethod0(ReferenceBinding receiverType,
                                 char[] selector,
                                 TypeBinding[] argumentTypes,
                                 InvocationSite invocationSite,
                                 boolean inStaticContext)

findMethodForArray

public MethodBinding findMethodForArray(ArrayBinding receiverType,
                                        char[] selector,
                                        TypeBinding[] argumentTypes,
                                        InvocationSite invocationSite)

findMethodInSuperInterfaces

protected void findMethodInSuperInterfaces(ReferenceBinding receiverType,
                                           char[] selector,
                                           ObjectVector found,
                                           java.util.List<TypeBinding> visitedTypes,
                                           InvocationSite invocationSite)

findType

public ReferenceBinding findType(char[] typeName,
                                 PackageBinding declarationPackage,
                                 PackageBinding invocationPackage)

findVariable

public LocalVariableBinding findVariable(char[] variable)

getBinding

public Binding getBinding(char[] name,
                          int mask,
                          InvocationSite invocationSite,
                          boolean needResolve)

getExactMethod

public MethodBinding getExactMethod(TypeBinding receiverType,
                                    char[] selector,
                                    InvocationSite invocationSite)

getExactConstructor

public MethodBinding getExactConstructor(TypeBinding receiverType,
                                         InvocationSite invocationSite)

getConstructor

public MethodBinding getConstructor(ReferenceBinding receiverType,
                                    TypeBinding[] argumentTypes,
                                    InvocationSite invocationSite)

getConstructor0

public MethodBinding getConstructor0(ReferenceBinding receiverType,
                                     TypeBinding[] argumentTypes,
                                     InvocationSite invocationSite)

getCurrentPackage

public final PackageBinding getCurrentPackage()

getDeclarationModifiers

public int getDeclarationModifiers()
Returns the modifiers of the innermost enclosing declaration.

Returns:
modifiers

getField

public FieldBinding getField(TypeBinding receiverType,
                             char[] fieldName,
                             InvocationSite invocationSite)

getImplicitMethod

public MethodBinding getImplicitMethod(char[] selector,
                                       TypeBinding[] argumentTypes,
                                       InvocationSite invocationSite)

getJavaIoSerializable

public final ReferenceBinding getJavaIoSerializable()

getJavaLangAnnotationAnnotation

public final ReferenceBinding getJavaLangAnnotationAnnotation()

getJavaLangAssertionError

public final ReferenceBinding getJavaLangAssertionError()

getJavaLangClass

public final ReferenceBinding getJavaLangClass()

getJavaLangCloneable

public final ReferenceBinding getJavaLangCloneable()

getJavaLangEnum

public final ReferenceBinding getJavaLangEnum()

getJavaLangInvokeLambdaMetafactory

public final ReferenceBinding getJavaLangInvokeLambdaMetafactory()

getJavaLangInvokeSerializedLambda

public final ReferenceBinding getJavaLangInvokeSerializedLambda()

getJavaLangInvokeMethodHandlesLookup

public final ReferenceBinding getJavaLangInvokeMethodHandlesLookup()

getJavaLangIterable

public final ReferenceBinding getJavaLangIterable()

getJavaLangObject

public final ReferenceBinding getJavaLangObject()

getJavaLangString

public final ReferenceBinding getJavaLangString()

getJavaLangThrowable

public final ReferenceBinding getJavaLangThrowable()

getJavaLangIllegalArgumentException

public final ReferenceBinding getJavaLangIllegalArgumentException()

getJavaUtilIterator

public final ReferenceBinding getJavaUtilIterator()

getMemberType

public final ReferenceBinding getMemberType(char[] typeName,
                                            ReferenceBinding enclosingType)

getMethod

public MethodBinding getMethod(TypeBinding receiverType,
                               char[] selector,
                               TypeBinding[] argumentTypes,
                               InvocationSite invocationSite)

getPackage

public final Binding getPackage(char[][] compoundName)

getOnlyPackage

public final Binding getOnlyPackage(char[][] compoundName)

getType

public final TypeBinding getType(char[] name)

getType

public final TypeBinding getType(char[] name,
                                 PackageBinding packageBinding)

getType

public final TypeBinding getType(char[][] compoundName,
                                 int typeNameLength)

getTypeOrPackage

public final Binding getTypeOrPackage(char[][] compoundName)

hasErasedCandidatesCollisions

public boolean hasErasedCandidatesCollisions(TypeBinding one,
                                             TypeBinding two,
                                             java.util.Map invocations,
                                             ReferenceBinding type,
                                             ASTNode typeRef)

innermostSwitchCase

public CaseStatement innermostSwitchCase()
Returns the immediately enclosing switchCase statement (carried by closest blockScope),


isAcceptableMethod

protected boolean isAcceptableMethod(MethodBinding one,
                                     MethodBinding two)

isBoxingCompatibleWith

public boolean isBoxingCompatibleWith(TypeBinding expressionType,
                                      TypeBinding targetType)

isDefinedInField

public final boolean isDefinedInField(FieldBinding field)

isDefinedInMethod

public final boolean isDefinedInMethod(MethodBinding method)

isDefinedInSameUnit

public final boolean isDefinedInSameUnit(ReferenceBinding type)

isDefinedInType

public final boolean isDefinedInType(ReferenceBinding type)

isInsideCase

public 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.


isInsideDeprecatedCode

public boolean isInsideDeprecatedCode()

isPossibleSubtypeOfRawType

public boolean isPossibleSubtypeOfRawType(TypeBinding paramType)

lowerUpperBound

public TypeBinding lowerUpperBound(TypeBinding[] types)
Returns VoidBinding if types have no intersection (e.g. 2 unrelated interfaces), or null if no common supertype (e.g. List and List), or the intersection type if possible


methodScope

public final MethodScope methodScope()

namedMethodScope

public final MethodScope namedMethodScope()

minimalErasedCandidates

protected TypeBinding[] minimalErasedCandidates(TypeBinding[] types,
                                                java.util.Map allInvocations)
Returns the most specific set of types compatible with all given types. (i.e. most specific common super types) If no types is given, will return an empty array. If not compatible reference type is found, returns null. In other cases, will return an array of minimal erased types, where some nulls may appear (and must simply be ignored).


mostSpecificClassMethodBinding

protected final MethodBinding mostSpecificClassMethodBinding(MethodBinding[] visible,
                                                             int visibleSize,
                                                             InvocationSite invocationSite)

mostSpecificInterfaceMethodBinding

protected final MethodBinding mostSpecificInterfaceMethodBinding(MethodBinding[] visible,
                                                                 int visibleSize,
                                                                 InvocationSite invocationSite)

mostSpecificMethodBinding

protected final MethodBinding mostSpecificMethodBinding(MethodBinding[] visible,
                                                        int visibleSize,
                                                        TypeBinding[] argumentTypes,
                                                        InvocationSite invocationSite,
                                                        ReferenceBinding receiverType)

outerMostClassScope

public final ClassScope outerMostClassScope()

outerMostMethodScope

public final MethodScope outerMostMethodScope()

parameterCompatibilityLevel

public int parameterCompatibilityLevel(MethodBinding method,
                                       TypeBinding[] arguments)

parameterCompatibilityLevel

public int parameterCompatibilityLevel(MethodBinding method,
                                       TypeBinding[] arguments,
                                       boolean tiebreakingVarargsMethods)

parameterCompatibilityLevel

public int parameterCompatibilityLevel(TypeBinding arg,
                                       TypeBinding param)

problemReporter

public abstract ProblemReporter problemReporter()

referenceCompilationUnit

public final CompilationUnitDeclaration referenceCompilationUnit()

referenceContext

public ReferenceContext referenceContext()
Returns the nearest reference context, starting from current scope. If starting on a class, it will return current class. If starting on unitScope, returns unit.


originalReferenceContext

public ReferenceContext originalReferenceContext()
Returns the nearest original reference context, starting from current scope. If starting on a class, it will return current class. If starting on unitScope, returns unit.


deferCheck

public boolean deferCheck(java.lang.Runnable check)

deferBoundCheck

public void deferBoundCheck(TypeReference typeRef)

getStaticFactory

public MethodBinding getStaticFactory(ParameterizedTypeBinding allocationType,
                                      ReferenceBinding originalEnclosingType,
                                      TypeBinding[] argumentTypes,
                                      Invocation allocationSite)

validateNullAnnotation

public boolean validateNullAnnotation(long tagBits,
                                      TypeReference typeRef,
                                      Annotation[] annotations)

hasDefaultNullnessFor

public abstract boolean hasDefaultNullnessFor(int location)
Answer a defaultNullness defined for the closest enclosing scope, using bits from Binding.NullnessDefaultMASK.


typeAnnotationsResolutionScope

public static BlockScope typeAnnotationsResolutionScope(Scope scope)

tagAsAccessingEnclosingInstanceStateOf

public void tagAsAccessingEnclosingInstanceStateOf(ReferenceBinding enclosingType,
                                                   boolean typeVariableAccess)

inferInvocationType

protected MethodBinding inferInvocationType(InvocationSite invocationSite,
                                            MethodBinding applicable,
                                            TypeBinding[] argumentTypes)
Given a selected applibable method, check if it has an unfinished InferenceContext18 associated. If so perform the outstanding Invocation Type Inference and return the improved method, otherwise return the applicable method unchanged.


findTypeVariable

public TypeVariableBinding findTypeVariable(char[] name,
                                            SourceTypeBinding sourceType)
Other scopes can override this method