Klasse ReturnStatement

Alle implementierten Schnittstellen:
TypeConstants, TypeIds
Bekannte direkte Unterklassen:
CodeSnippetReturnStatement, JavadocReturnStatement

public class ReturnStatement extends Statement
  • Felddetails

  • Konstruktordetails

    • ReturnStatement

      public ReturnStatement(Expression expression, int sourceStart, int sourceEnd)
    • ReturnStatement

      public ReturnStatement(Expression expression, int sourceStart, int sourceEnd, boolean implicitReturn)
  • Methodendetails

    • analyseCode

      public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo)
      Angegeben von:
      analyseCode in Klasse Statement
    • doesNotCompleteNormally

      public boolean doesNotCompleteNormally()
      Beschreibung aus Klasse kopiert: Statement
      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.)
      Setzt außer Kraft:
      doesNotCompleteNormally in Klasse Statement
      Siehe auch:
    • canCompleteNormally

      public boolean canCompleteNormally()
      Beschreibung aus Klasse kopiert: Statement
      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) Statement.doesNotCompleteNormally() since that was coded for a specific purpose of Lambda Shape Analysis.
      Setzt außer Kraft:
      canCompleteNormally in Klasse Statement
    • generateCode

      public void generateCode(BlockScope currentScope, CodeStream codeStream)
      Retrun statement code generation generate the finallyInvocationSequence.
      Angegeben von:
      generateCode in Klasse Statement
      Parameter:
      currentScope - org.eclipse.jdt.internal.compiler.lookup.BlockScope
      codeStream - org.eclipse.jdt.internal.compiler.codegen.CodeStream
    • generateReturnBytecode

      public void generateReturnBytecode(CodeStream codeStream)
      Dump the suitable return bytecode for a return statement
    • generateStoreSaveValueIfNecessary

      public void generateStoreSaveValueIfNecessary(Scope scope, CodeStream codeStream)
    • needValue

      public boolean needValue()
    • prepareSaveValueLocation

      public void prepareSaveValueLocation(TryStatement targetTryStatement)
    • printStatement

      public StringBuffer printStatement(int tab, StringBuffer output)
      Angegeben von:
      printStatement in Klasse Statement
    • resolve

      public void resolve(BlockScope scope)
      Angegeben von:
      resolve in Klasse Statement
    • traverse

      public void traverse(ASTVisitor visitor, BlockScope scope)
      Setzt außer Kraft:
      traverse in Klasse ASTNode