java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode
org.aspectj.org.eclipse.jdt.internal.compiler.ast.Statement
Alle implementierten Schnittstellen:
TypeConstants, TypeIds
Bekannte direkte Unterklassen:
AbstractVariableDeclaration, AssertStatement, Block, BranchStatement, CaseStatement, DoStatement, EmptyStatement, ExplicitConstructorCall, Expression, ForeachStatement, ForStatement, IfStatement, LabeledStatement, ReturnStatement, SubRoutineStatement, ThrowStatement, TypeDeclaration, WhileStatement

public abstract class Statement extends ASTNode
  • Felddetails

    • NOT_COMPLAINED

      public static final int NOT_COMPLAINED
      Siehe auch:
    • COMPLAINED_FAKE_REACHABLE

      public static final int COMPLAINED_FAKE_REACHABLE
      Siehe auch:
    • COMPLAINED_UNREACHABLE

      public static final int COMPLAINED_UNREACHABLE
      Siehe auch:
  • Konstruktordetails

    • Statement

      public Statement()
  • Methodendetails

    • isKnowDeadCodePattern

      protected static boolean isKnowDeadCodePattern(Expression expression)
      Answers true if the if is identified as a known coding pattern which should be tolerated by dead code analysis. e.g. if (DEBUG) print(); // no complaint Only invoked when overall condition is known to be optimizeable into false/true.
    • analyseCode

      public abstract FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo)
    • doesNotCompleteNormally

      public boolean doesNotCompleteNormally()
      Lambda shape analysis: *Assuming* this is reachable, analyze if this completes normally i.e control flow can reach the textually next statement. For blocks, we don't perform intra-reachability analysis. We assume the lambda body is free of intrinsic control flow errors (if such errors exist they will not be flagged by this analysis, but are guaranteed to surface later on.)
      Siehe auch:
    • completesByContinue

      public boolean completesByContinue()
      Lambda shape analysis: *Assuming* this is reachable, analyze if this completes by continuing i.e control flow cannot reach the textually next statement. This is necessitated by the fact that continue claims to not complete normally. So this is necessary to discriminate between do { continue; } while (false); which completes normally and do { throw new Exception(); } while (false); which does not complete normally.
    • canCompleteNormally

      public boolean canCompleteNormally()
      Switch Expression analysis: *Assuming* this is reachable, analyze if this completes normally i.e control flow can reach the textually next statement, as per JLS 14 Sec 14.22 For blocks, we don't perform intra-reachability analysis. Note: delinking this from a similar (opposite) doesNotCompleteNormally() since that was coded for a specific purpose of Lambda Shape Analysis.
    • continueCompletes

      public boolean continueCompletes()
      The equivalent function of completesByContinue - implements both the rules concerning continue with and without a label.
    • analyseArguments

      protected void analyseArguments(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, MethodBinding methodBinding, Expression[] arguments)
      Analysing arguments of MessageSend, ExplicitConstructorCall, AllocationExpression.
    • checkAgainstNullTypeAnnotation

      protected void checkAgainstNullTypeAnnotation(BlockScope scope, TypeBinding requiredType, Expression expression, FlowContext flowContext, FlowInfo flowInfo)
    • branchChainTo

      public void branchChainTo(BranchLabel label)
      INTERNAL USE ONLY. This is used to redirect inter-statements jumps.
    • breaksOut

      public boolean breaksOut(char[] label)
    • continuesAtOuterLabel

      public boolean continuesAtOuterLabel()
    • complainIfUnreachable

      public int complainIfUnreachable(FlowInfo flowInfo, BlockScope scope, int previousComplaintLevel, boolean endOfBlock)
    • doNotReportUnreachable

      protected boolean doNotReportUnreachable()
    • generateArguments

      public void generateArguments(MethodBinding binding, Expression[] arguments, BlockScope currentScope, CodeStream codeStream)
      Generate invocation arguments, considering varargs methods
    • generateCode

      public abstract void generateCode(BlockScope currentScope, CodeStream codeStream)
    • isBoxingCompatible

      public boolean isBoxingCompatible(TypeBinding expressionType, TypeBinding targetType, Expression expression, Scope scope)
    • isEmptyBlock

      public boolean isEmptyBlock()
    • isValidJavaStatement

      public boolean isValidJavaStatement()
    • print

      public StringBuffer print(int indent, StringBuffer output)
      Angegeben von:
      print in Klasse ASTNode
    • printStatement

      public abstract StringBuffer printStatement(int indent, StringBuffer output)
    • resolve

      public abstract void resolve(BlockScope scope)
    • getPatternVariablesWhenTrue

      public LocalVariableBinding[] getPatternVariablesWhenTrue()
    • getPatternVariablesWhenFalse

      public LocalVariableBinding[] getPatternVariablesWhenFalse()
    • addPatternVariablesWhenTrue

      public void addPatternVariablesWhenTrue(LocalVariableBinding[] vars)
    • addPatternVariablesWhenFalse

      public void addPatternVariablesWhenFalse(LocalVariableBinding[] vars)
    • promotePatternVariablesIfApplicable

      public void promotePatternVariablesIfApplicable(LocalVariableBinding[] patternVariablesInScope, BooleanSupplier condition)
    • resolveWithPatternVariablesInScope

      public void resolveWithPatternVariablesInScope(LocalVariableBinding[] patternVariablesInScope, BlockScope scope)
    • resolveExpressionType

      public TypeBinding resolveExpressionType(BlockScope scope)
      Returns the resolved expression if any associated to this statement - used parameter statement has to be either a SwitchStatement or a SwitchExpression
    • containsPatternVariable

      public boolean containsPatternVariable()
    • invocationTargetType

      public TypeBinding invocationTargetType()
      Implementation of InvocationSite.invocationTargetType() suitable at this level. Subclasses should override as necessary.
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.lookup.InvocationSite#invocationTargetType()
    • expectedType

      public TypeBinding expectedType()
      Simpler notion of expected type, suitable for code assist purposes.
    • getExpressionContext

      public ExpressionContext getExpressionContext()
    • findConstructorBinding

      protected MethodBinding findConstructorBinding(BlockScope scope, Invocation site, ReferenceBinding receiverType, TypeBinding[] argumentTypes)
      For all constructor invocations: find the constructor binding; if site.innersNeedUpdate() perform some post processing for those and produce any updates as side-effects into 'argumentTypes'.