jif.extension

## Class JifForExt

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

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, JifExt, JifStmtExt, polyglot.ast.Ext, polyglot.ast.NodeOps, polyglot.util.Copy<polyglot.ast.Ext>

      public class JifForExt
      extends JifStmtExt_c

  The Jif extension of the `For` node.
  See Also:
    `For`, Serialized Form

- - ### Nested Class Summary

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

      `polyglot.util.Copy.Util`

  - ### Field Summary

    - ### Fields inherited from class jif.extension.JifStmtExt_c

      `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
    `JifForExt(ToJavaExt toJava)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected PathMap` | `checkInits(LabelChecker lc, JifContext A, polyglot.ast.For fs, java.util.List<polyglot.ast.ForInit> newInits)` Splitting out checking of inits and checking of the loop to make it easier to extend.
    `polyglot.ast.Node` | `checkLoop(LabelChecker lc, JifContext A, polyglot.ast.For fs, java.util.List<polyglot.ast.ForInit> inits, PathMap Xinit)` Utility for easier overriding of loop checking.
    `polyglot.ast.Node` | `labelCheckStmt(LabelChecker lc)`
    `protected void` | `updateContextForBody(LabelChecker lc, JifContext A, PathMap Xcond)` Utility method for updating the context for checking the body in the for loop.
    `protected void` | `updateContextForNextInit(LabelChecker lc, JifContext A, PathMap Xprev)` Utility method for updating the context for checking the next init statement in the for loop.
    `protected void` | `updateContextForNextIter(LabelChecker lc, JifContext A, PathMap Xprev)` Utility method for updating the context for checking the next iter statement in the for loop.

    - ### Methods inherited from class jif.extension.JifStmtExt_c

      `copy, init, labelCheck, stmtDel, 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`

- - ### Constructor Detail

    - #### JifForExt

          public JifForExt(ToJavaExt toJava)

  - ### Method Detail

    - #### labelCheckStmt

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

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

    - #### checkLoop

          public polyglot.ast.Node checkLoop(LabelChecker lc,
                                             JifContext A,
                                             polyglot.ast.For fs,
                                             java.util.List<polyglot.ast.ForInit> inits,
                                             PathMap Xinit)
                                      throws polyglot.types.SemanticException

      Utility for easier overriding of loop checking.
      Throws:
        `polyglot.types.SemanticException`

    - #### checkInits

          protected PathMap checkInits(LabelChecker lc,
                                       JifContext A,
                                       polyglot.ast.For fs,
                                       java.util.List<polyglot.ast.ForInit> newInits)
                                throws polyglot.types.SemanticException

      Splitting out checking of inits and checking of the loop to make it easier to extend.
      Throws:
        `polyglot.types.SemanticException`

    - #### updateContextForNextInit

          protected void updateContextForNextInit(LabelChecker lc,
                                                  JifContext A,
                                                  PathMap Xprev)

      Utility method for updating the context for checking the next init statement in the for loop. Useful for overriding in projects like fabric.

    - #### updateContextForBody

          protected void updateContextForBody(LabelChecker lc,
                                              JifContext A,
                                              PathMap Xcond)

      Utility method for updating the context for checking the body in the for loop. Useful for overriding in projects like fabric.

    - #### updateContextForNextIter

          protected void updateContextForNextIter(LabelChecker lc,
                                                  JifContext A,
                                                  PathMap Xprev)

      Utility method for updating the context for checking the next iter statement in the for loop. Useful for overriding in projects like fabric.