java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScope
Bekannte direkte Unterklassen:
CodeSnippetScope, MethodScope, ModuleScope

public class BlockScope extends Scope
  • Felddetails

    • 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
    • insideTypeAnnotation

      public boolean insideTypeAnnotation
    • blockStatement

      public Statement blockStatement
    • finallyInfo

      public FlowInfo finallyInfo
      Used only during analyseCode and only for checking if a resource was closed in a finallyBlock.
  • Konstruktordetails

    • 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)
  • Methodendetails

    • 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
    • adjustLocalVariablePositions

      public void adjustLocalVariablePositions(int delta, boolean offsetAlreadyUpdated)
    • adjustCurrentAndSubScopeLocalVariablePositions

      public void adjustCurrentAndSubScopeLocalVariablePositions(int delta)
    • 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, InvocationSite invocationSite)
      Setzt außer Kraft:
      findVariable in Klasse 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()
      Beschreibung aus Klasse kopiert: Scope
      See also the contract of ProblemReporter.close().
      Angegeben von:
      problemReporter in Klasse Scope
    • propagateInnerEmulation

      public void propagateInnerEmulation(ReferenceBinding targetType, boolean isEnclosingInstanceSupplied)
    • referenceType

      public TypeDeclaration referenceType()
    • scopeIndex

      public int scopeIndex()
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • toString

      public String toString(int tab)
    • registerTrackingVariable

      public int registerTrackingVariable(FakedTrackingVariable fakedTrackingVariable)
      Register a tracking variable and compute its id.
    • removeTrackingVar

      public void removeTrackingVar(FakedTrackingVariable trackingVariable)
      When are no longer interested in this tracking variable - remove it.
    • pruneWrapperTrackingVar

      public void pruneWrapperTrackingVar(FakedTrackingVariable trackingVariable)
      Unregister a wrapper resource without affecting its inner.
    • hasResourceTrackers

      public boolean hasResourceTrackers()
    • checkUnclosedCloseables

      public void checkUnclosedCloseables(FlowInfo flowInfo, FlowContext flowContext, ASTNode location, BlockScope locationScope)
      At the end of a block check the closing-status of all tracked closeables that are declared in this block. Also invoked when entering unreachable code.
    • correlateTrackingVarsIfElse

      public void correlateTrackingVarsIfElse(FlowInfo thenFlowInfo, FlowInfo elseFlowInfo)
      If one branch of an if-else closes any AutoCloseable resource, and if the same resource is known to be null on the other branch mark it as closed, too, so that merging both branches indicates that the resource is always closed. Example: FileReader fr1 = null; try {\n" + fr1 = new FileReader(someFile);" + fr1.read(buf);\n" + } finally {\n" + if (fr1 != null)\n" + try {\n" + fr1.close();\n" + } catch (IOException e) { // do nothing } // after this if statement fr1 is definitely not leaked }
    • checkAppropriateMethodAgainstSupers

      public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod, TypeBinding[] parameters, InvocationSite site)
      15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?"