Class Statement

java.lang.Object
org.glassfish.rmic.tools.tree.Node
org.glassfish.rmic.tools.tree.Statement
All Implemented Interfaces:
Cloneable, Constants, RuntimeConstants
Direct Known Subclasses:
BreakStatement, CaseStatement, CatchStatement, CompoundStatement, ContinueStatement, DeclarationStatement, DoStatement, ExpressionStatement, FinallyStatement, ForStatement, IfStatement, InlineReturnStatement, ReturnStatement, SwitchStatement, SynchronizedStatement, ThrowStatement, TryStatement, VarDeclarationStatement, WhileStatement

public class Statement extends Node
WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
  • Field Details

    • DEAD_END

      public static final Vset DEAD_END
    • empty

      public static final Statement empty
      An empty statement. Its costInline is infinite.
    • MAXINLINECOST

      public static final int MAXINLINECOST
      The largest possible interesting inline cost value.
  • Method Details

    • insertStatement

      public static Statement insertStatement(Statement s1, Statement s2)
      Insert a bit of code at the front of a statement. Side-effect s2, if it is a CompoundStatement.
    • setLabel

      public void setLabel(Environment env, Expression e)
      Set the label of a statement
    • checkMethod

      public Vset checkMethod(Environment env, Context ctx, Vset vset, Hashtable<Object,Object> exp)
      Check a statement
    • checkLabel

      protected void checkLabel(Environment env, Context ctx)
      Make sure the labels on this statement do not duplicate the labels on any enclosing statement. Provided as a convenience for subclasses.
    • inline

      public Statement inline(Environment env, Context ctx)
      Inline
    • eliminate

      public Statement eliminate(Environment env, Statement s)
      Eliminate this statement, which is only possible if it has no label.
    • code

      public void code(Environment env, Context ctx, Assembler asm)
      Code
    • hasLabel

      public boolean hasLabel(Identifier lbl)
    • firstConstructor

      public Expression firstConstructor()
      Check if the first thing is a constructor invocation
    • copyInline

      public Statement copyInline(Context ctx, boolean valNeeded)
      Create a copy of the statement for method inlining
    • costInline

      public int costInline(int thresh, Environment env, Context ctx)
    • print

      public void print(PrintStream out, int indent)
    • print

      public void print(PrintStream out)
      Description copied from class: Node
      Print
      Overrides:
      print in class Node