org.eclipse.jdt.internal.compiler.lookup
Class BlockScope

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.lookup.Scope
      extended by org.eclipse.jdt.internal.compiler.lookup.BlockScope
Direct Known Subclasses:
MethodScope

public class BlockScope
extends Scope


Field Summary
static VariableBinding[] EmulationPathToImplicitThis
           
 CaseStatement enclosingCase
           
 int localIndex
           
 LocalVariableBinding[] locals
           
 int maxOffset
           
static VariableBinding[] NoEnclosingInstanceInConstructorCall
           
static VariableBinding[] NoEnclosingInstanceInStaticContext
           
 int offset
           
 BlockScope[] shiftScopes
           
 int startIndex
           
 int subscopeCount
           
 Scope[] subscopes
           
 
Fields inherited from class org.eclipse.jdt.internal.compiler.lookup.Scope
AUTOBOX_COMPATIBLE, BLOCK_SCOPE, CLASS_SCOPE, COMPATIBLE, COMPILATION_UNIT_SCOPE, EQUAL_OR_MORE_SPECIFIC, kind, METHOD_SCOPE, MORE_GENERIC, NOT_COMPATIBLE, NOT_RELATED, parent, VARARGS_COMPATIBLE
 
Constructor Summary
  BlockScope(BlockScope parent)
           
  BlockScope(BlockScope parent, boolean addToParentScope)
           
  BlockScope(BlockScope parent, int variableCount)
           
protected BlockScope(int kind, Scope parent)
           
 
Method Summary
 void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding)
           
 void addLocalType(TypeDeclaration localType)
           
 void addLocalVariable(LocalVariableBinding binding)
           
 void addSubscope(Scope childScope)
           
 boolean allowBlankFinalFieldAssignment(FieldBinding binding)
          Answer true if the receiver is suitable for assigning final blank fields.
 void emulateOuterAccess(LocalVariableBinding outerLocalVariable)
           
 ReferenceBinding findLocalType(char[] name)
           
 LocalDeclaration[] findLocalVariableDeclarations(int position)
          Returns all declarations of most specific locals containing a given position in their source range.
 LocalVariableBinding findVariable(char[] variableName)
           
 Binding getBinding(char[][] compoundName, int mask, InvocationSite invocationSite, boolean needResolve)
           
 Binding getBinding(char[][] compoundName, InvocationSite invocationSite)
           
 VariableBinding[] getEmulationPath(LocalVariableBinding outerLocalVariable)
           
 Object[] getEmulationPath(ReferenceBinding targetEnclosingType, boolean onlyExactMatch, boolean denyEnclosingArgInConstructorCall)
           
 boolean isDuplicateLocalVariable(char[] name)
           
 int maxShiftedOffset()
           
 boolean needBlankFinalFieldInitializationCheck(FieldBinding binding)
          Returns true if the context requires to check initialization of final blank fields.
 ProblemReporter problemReporter()
           
 void propagateInnerEmulation(ReferenceBinding targetType, boolean isEnclosingInstanceSupplied)
           
 TypeDeclaration referenceType()
           
 void resetEnclosingMethodStaticFlag()
           
 int scopeIndex()
           
 String toString()
           
 String toString(int tab)
           
 
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.Scope
boxing, classScope, compareTypes, compilationUnitScope, compilerOptions, computeCompatibleMethod, connectTypeVariables, convertEliminatingTypeVariables, createArrayType, createTypeVariables, deferBoundCheck, enclosingClassScope, enclosingMethodScope, enclosingReceiverType, enclosingReferenceContext, enclosingSourceType, environment, findDefaultAbstractMethod, findDirectMemberType, findExactMethod, findField, findField, findMemberType, findMethod, findMethod, findMethodForArray, findMethodInSuperInterfaces, findType, getBaseType, getBinding, getConstructor, getCurrentPackage, getDeclarationModifiers, getField, getImplicitMethod, getJavaIoSerializable, getJavaLangAnnotationAnnotation, getJavaLangAssertionError, getJavaLangClass, getJavaLangCloneable, getJavaLangEnum, getJavaLangIterable, getJavaLangObject, getJavaLangString, getJavaLangThrowable, getJavaUtilIterator, getMemberType, getMethod, getPackage, getStaticFactory, getType, getType, getType, getTypeOrPackage, greaterLowerBound, greaterLowerBound, hasErasedCandidatesCollisions, innermostSwitchCase, isAcceptableMethod, isBoxingCompatibleWith, isDefinedInField, isDefinedInMethod, isDefinedInSameUnit, isDefinedInType, isInsideCase, isInsideDeprecatedCode, isPossibleSubtypeOfRawType, lowerUpperBound, methodScope, minimalErasedCandidates, mostSpecificClassMethodBinding, mostSpecificInterfaceMethodBinding, mostSpecificMethodBinding, outerMostClassScope, outerMostMethodScope, parameterCompatibilityLevel, referenceCompilationUnit, referenceContext, substitute, substitute, substitute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

locals

public LocalVariableBinding[] locals

localIndex

public int localIndex

startIndex

public int startIndex

offset

public int offset

maxOffset

public int maxOffset

shiftScopes

public BlockScope[] shiftScopes

subscopes

public Scope[] subscopes

subscopeCount

public int subscopeCount

enclosingCase

public CaseStatement enclosingCase

EmulationPathToImplicitThis

public static final VariableBinding[] EmulationPathToImplicitThis

NoEnclosingInstanceInConstructorCall

public static final VariableBinding[] NoEnclosingInstanceInConstructorCall

NoEnclosingInstanceInStaticContext

public static final VariableBinding[] NoEnclosingInstanceInStaticContext
Constructor Detail

BlockScope

public BlockScope(BlockScope parent)

BlockScope

public BlockScope(BlockScope parent,
                  boolean addToParentScope)

BlockScope

public BlockScope(BlockScope parent,
                  int variableCount)

BlockScope

protected BlockScope(int kind,
                     Scope parent)
Method Detail

addAnonymousType

public final void addAnonymousType(TypeDeclaration anonymousType,
                                   ReferenceBinding superBinding)

addLocalType

public final void addLocalType(TypeDeclaration localType)

addLocalVariable

public final void addLocalVariable(LocalVariableBinding binding)

addSubscope

public void addSubscope(Scope childScope)

allowBlankFinalFieldAssignment

public final boolean allowBlankFinalFieldAssignment(FieldBinding binding)
Answer true if the receiver is suitable for assigning final blank fields. in other words, it is inside an initializer, a constructor or a clinit


emulateOuterAccess

public void emulateOuterAccess(LocalVariableBinding outerLocalVariable)

findLocalType

public final ReferenceBinding findLocalType(char[] name)

findLocalVariableDeclarations

public LocalDeclaration[] findLocalVariableDeclarations(int position)
Returns all declarations of most specific locals containing a given position in their source range. This code does not recurse in nested types. Returned array may have null values at trailing indexes.


findVariable

public LocalVariableBinding findVariable(char[] variableName)
Overrides:
findVariable in class Scope

getBinding

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

getBinding

public final Binding getBinding(char[][] compoundName,
                                InvocationSite invocationSite)

getEmulationPath

public VariableBinding[] getEmulationPath(LocalVariableBinding outerLocalVariable)

getEmulationPath

public Object[] getEmulationPath(ReferenceBinding targetEnclosingType,
                                 boolean onlyExactMatch,
                                 boolean denyEnclosingArgInConstructorCall)

isDuplicateLocalVariable

public final boolean isDuplicateLocalVariable(char[] name)

maxShiftedOffset

public int maxShiftedOffset()

needBlankFinalFieldInitializationCheck

public final boolean needBlankFinalFieldInitializationCheck(FieldBinding binding)
Returns true if the context requires to check initialization of final blank fields. in other words, it is inside an initializer, a constructor or a clinit


problemReporter

public ProblemReporter problemReporter()
Specified by:
problemReporter in class Scope

propagateInnerEmulation

public void propagateInnerEmulation(ReferenceBinding targetType,
                                    boolean isEnclosingInstanceSupplied)

referenceType

public TypeDeclaration referenceType()

scopeIndex

public int scopeIndex()

toString

public String toString()
Overrides:
toString in class Object

toString

public String toString(int tab)

resetEnclosingMethodStaticFlag

public void resetEnclosingMethodStaticFlag()


Copyright © 2012. All Rights Reserved.