jif.extension

## Class JifStmtExt_c

- java.lang.Object
- - polyglot.ast.Ext_c
  - - jif.ast.JifExt_c
    - - jif.extension.JifStmtExt_c

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, JifExt, JifStmtExt, polyglot.ast.Ext, polyglot.ast.NodeOps, polyglot.util.Copy<polyglot.ast.Ext>
  Direct Known Subclasses:
    JifBlockExt, JifBranchExt, JifCaseExt, JifConstructorCallExt, JifDoExt, JifDowngradeStmtExt, JifEmptyExt, JifEvalExt, JifForExt, JifIfExt, JifLabeledExt, JifLocalDeclExt, JifReturnExt, JifSwitchExt, JifSynchronizedExt, JifThrowExt, JifTryExt, JifWhileExt

      public abstract class JifStmtExt_c
      extends JifExt_c
      implements JifStmtExt

  The root of all kinds of Jif extensions for statements. It provides a generic labelCheck method, which will invoke the labelCheckStmt methods provided by the subclasses of this class.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface polyglot.util.Copy

      `polyglot.util.Copy.Util`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JifStmtExt` | `stmtDel`

    - ### Fields inherited from class jif.ast.JifExt_c

      `toJava, X`

    - ### Fields inherited from class polyglot.ast.Ext_c

      `ext, node, pred`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JifStmtExt_c(JifStmtExt stmtDel, ToJavaExt toJava)`
    `JifStmtExt_c(ToJavaExt toJava)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JifStmtExt` | `copy()`
    `void` | `init(polyglot.ast.Node node)`
    `polyglot.ast.Node` | `labelCheck(LabelChecker lc)` Label check a statement.
    `abstract polyglot.ast.Node` | `labelCheckStmt(LabelChecker lc)`
    `JifStmtExt` | `stmtDel()`
    `JifStmtExt` | `stmtDel(JifStmtExt stmtDel)`

    - ### Methods inherited from class jif.ast.JifExt_c

      `checkAndRemoveThrowType, checkThrowTypes, dump, getPathMap, integerBoundsCalculated, toJava, toJava, updatePathMap, X, X`

    - ### Methods inherited from class polyglot.ast.Ext_c

      `addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, ext, ext, extRewrite, extRewriteEnter, extRewriteOverride, initPred, lang, node, pred, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, superLang, throwTypes, toString, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jif.ast.JifExt

      `integerBoundsCalculated, toJava, toJava, X, X`

    - ### Methods inherited from interface polyglot.ast.Ext

      `dump, ext, ext, initPred, node, pred`

    - ### Methods inherited from interface polyglot.ast.NodeOps

      `addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, extRewriteOverride, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList`

- - ### Field Detail

    - #### stmtDel

          protected JifStmtExt stmtDel

  - ### Constructor Detail

    - #### JifStmtExt_c

          public JifStmtExt_c(JifStmtExt stmtDel,
                              ToJavaExt toJava)

    - #### JifStmtExt_c

          public JifStmtExt_c(ToJavaExt toJava)

  - ### Method Detail

    - #### stmtDel

          public JifStmtExt stmtDel()

      Specified by:
        `stmtDel` in interface `JifStmtExt`

    - #### init

          public void init(polyglot.ast.Node node)

      Specified by:
        `init` in interface `polyglot.ast.Ext`
      Overrides:
        `init` in class `JifExt_c`

    - #### copy

          public JifStmtExt copy()

      Specified by:
        `copy` in interface `polyglot.util.Copy<polyglot.ast.Ext>`
      Overrides:
        `copy` in class `JifExt_c`

    - #### stmtDel

          public JifStmtExt stmtDel(JifStmtExt stmtDel)

      Specified by:
        `stmtDel` in interface `JifStmtExt`

    - #### labelCheckStmt

          public abstract polyglot.ast.Node labelCheckStmt(LabelChecker lc)
                                                    throws polyglot.types.SemanticException

      Specified by:
        `labelCheckStmt` in interface `JifStmtExt`
      Throws:
        `polyglot.types.SemanticException`

    - #### labelCheck

          public polyglot.ast.Node labelCheck(LabelChecker lc)
                                       throws polyglot.types.SemanticException

      Label check a statement. After invoking the overrided `labelCheckStmt` statement, this method will apply the "single path rule" (Figure 4.15): If the path map contains only one path and it is "N" or "R", then the PC label at the end is the same as at the beginning, so just set the path map to use the PC label.
      Specified by:
        `labelCheck` in interface `JifExt`
      Overrides:
        `labelCheck` in class `JifExt_c`
      Throws:
        `polyglot.types.SemanticException`