Class JumpStatement

All Implemented Interfaces:
Terminal, Cloneable
Direct Known Subclasses:
BreakNode, ContinueNode

public abstract class JumpStatement extends Statement
Common base class for jump statements (e.g. break and continue).
  • Method Details

    • hasGoto

      public boolean hasGoto()
      Description copied from class: Statement
      Check if this statement repositions control flow with goto like semantics, for example BreakNode or a ForNode with no test
      Overrides:
      hasGoto in class Statement
      Returns:
      true if statement has goto semantics
    • getLabelName

      public String getLabelName()
      Get the label name for this break node
      Returns:
      label name, or null if none
    • toString

      public void toString(StringBuilder sb, boolean printType)
      Description copied from class: Node
      Print logic that decides whether to show the optimistic type or not - for example it should not be printed after just parse, when it hasn't been computed, or has been set to a trivially provable value
      Specified by:
      toString in class Node
      Parameters:
      sb - string builder
      printType - print type?