Klasse LoopingFlowContext

Alle implementierten Schnittstellen:
TypeConstants

public class LoopingFlowContext extends SwitchFlowContext
Reflects the context of code analysis, keeping track of enclosing try statements, exception handlers, etc...
  • Felddetails

  • Konstruktordetails

  • Methodendetails

    • complainOnDeferredFinalChecks

      public void complainOnDeferredFinalChecks(BlockScope scope, FlowInfo flowInfo)
      Perform deferred checks relative to final variables duplicate initialization of lack of initialization.
      Parameter:
      scope - the scope to which this context is associated
      flowInfo - the flow info against which checks must be performed
    • complainOnDeferredNullChecks

      public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowInfo)
      Perform deferred checks relative to the null status of local variables.
      Parameter:
      scope - the scope to which this context is associated
      callerFlowInfo - the flow info against which checks must be performed
    • complainOnDeferredNullChecks

      public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowInfo, boolean updateInitsOnBreak)
    • continueLabel

      public BranchLabel continueLabel()
      Setzt außer Kraft:
      continueLabel in Klasse FlowContext
    • individualToString

      public String individualToString()
      Setzt außer Kraft:
      individualToString in Klasse SwitchFlowContext
    • isContinuable

      public boolean isContinuable()
      Setzt außer Kraft:
      isContinuable in Klasse FlowContext
    • isContinuedTo

      public boolean isContinuedTo()
    • recordBreakTo

      public void recordBreakTo(FlowContext targetContext)
      Setzt außer Kraft:
      recordBreakTo in Klasse FlowContext
    • recordContinueFrom

      public void recordContinueFrom(FlowContext innerFlowContext, FlowInfo flowInfo)
      Setzt außer Kraft:
      recordContinueFrom in Klasse FlowContext
    • recordFinalAssignment

      protected boolean recordFinalAssignment(VariableBinding binding, Reference finalAssignment)
      Setzt außer Kraft:
      recordFinalAssignment in Klasse FlowContext
    • recordNullReferenceWithAnnotationStatus

      protected void recordNullReferenceWithAnnotationStatus(LocalVariableBinding local, ASTNode expression, int checkType, FlowInfo nullInfo, NullAnnotationMatching nullAnnotationStatus)
      Beschreibung aus Klasse kopiert: FlowContext
      Record a null reference for use by deferred checks. Only looping or finally contexts really record that information. Other contexts immediately check for unboxing.
      Setzt außer Kraft:
      recordNullReferenceWithAnnotationStatus in Klasse FlowContext
      Parameter:
      local - the local variable involved in the check
      expression - the location triggering the analysis, for normal null dereference this is an expression resolving to 'local', for resource leaks it is an early exit statement.
      checkType - the checkType against which the check must be performed; one of CAN_ONLY_NULL, CAN_ONLY_NULL_NON_NULL, MAY_NULL, CAN_ONLY_NON_NULL, potentially combined with a context indicator (one of FlowContext.IN_COMPARISON_NULL, FlowContext.IN_COMPARISON_NON_NULL, FlowContext.IN_ASSIGNMENT or FlowContext.IN_INSTANCEOF).
      Alternatively, a FlowContext.IN_UNBOXING check can e requested.
      nullInfo - the null flow info observed at this first visit of location.
      nullAnnotationStatus - if null annotations are analysed this may hold more information about the exact kind of problem, can be null
    • recordUnboxing

      public void recordUnboxing(Scope scope, Expression expression, int nullStatus, FlowInfo flowInfo)
      Beschreibung aus Klasse kopiert: FlowContext
      Either AST analysis or checking of a child flow context has encountered an unboxing situation. Record this fact for handling at an appropriate point in time.
      Setzt außer Kraft:
      recordUnboxing in Klasse FlowContext
      Parameter:
      nullStatus - the status as we know it so far.
    • recordExitAgainstResource

      public boolean recordExitAgainstResource(BlockScope scope, FlowInfo flowInfo, FakedTrackingVariable trackingVar, ASTNode reference)
      Record the fact that we see an early exit (in 'reference') while 'trackingVar' is in scope and may be unclosed.
      Setzt außer Kraft:
      recordExitAgainstResource in Klasse FlowContext
      Parameter:
      scope - enclosing scope
      flowInfo - flowInfo at the point of the early exit
      trackingVar - representation of the resource
      reference - the return or throw statement marking the early exit
      Gibt zurück:
      true if the situation has been handled by this flow context.
    • recordUsingNullReference

      public void recordUsingNullReference(Scope scope, LocalVariableBinding local, ASTNode location, int checkType, FlowInfo flowInfo)
      Beschreibung aus Klasse kopiert: FlowContext
      Record a null reference for use by deferred checks. Only looping or finally contexts really record that information. The context may emit an error immediately depending on the status of local against flowInfo and its nature (only looping of finally contexts defer part of the checks; nonetheless, contexts that are nested into a looping or a finally context get affected and delegate some checks to their enclosing context).
      Setzt außer Kraft:
      recordUsingNullReference in Klasse FlowContext
      Parameter:
      scope - the scope into which the check is performed
      local - the local variable involved in the check
      location - the location triggering the analysis, for normal null dereference this is an expression resolving to 'local', for resource leaks it is an early exit statement.
      checkType - the status against which the check must be performed; one of CAN_ONLY_NULL, CAN_ONLY_NULL_NON_NULL, MAY_NULL, potentially combined with a context indicator (one of FlowContext.IN_COMPARISON_NULL, FlowContext.IN_COMPARISON_NON_NULL, FlowContext.IN_ASSIGNMENT or FlowContext.IN_INSTANCEOF) and a bit to indicate whether the reference is being recorded inside an assert, FlowContext.HIDE_NULL_COMPARISON_WARNING
      flowInfo - the flow info at the check point; deferring contexts will perform supplementary checks against flow info instances that cannot be known at the time of calling this method (they are influenced by code that follows the current point)
    • simulateThrowAfterLoopBack

      public void simulateThrowAfterLoopBack(FlowInfo flowInfo)
    • recordCatchContextOfEscapingException

      public void recordCatchContextOfEscapingException(ExceptionHandlingFlowContext catchingContext, ReferenceBinding caughtException, FlowInfo exceptionInfo)
    • hasEscapingExceptions

      public boolean hasEscapingExceptions()
    • internalRecordNullityMismatch

      protected boolean internalRecordNullityMismatch(Expression expression, TypeBinding providedType, FlowInfo flowInfo, int nullStatus, NullAnnotationMatching nullAnnotationStatus, TypeBinding expectedType, int checkType)
      Setzt außer Kraft:
      internalRecordNullityMismatch in Klasse FlowContext