jif.extension

## Class JifFormalExt

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

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

      public class JifFormalExt
      extends JifExt_c

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

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `JifFormalExt.FormalVarianceLabelChecker` Checker to ensure that labels do not use covariant labels in the wrong places
    `protected static class` | `JifFormalExt.FormalVarianceLabelSubstr` Visitor to ensure that labels do not use covariant labels in the wrong places

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

      `polyglot.util.Copy.Util`

  - ### Field Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkVariance(LabelChecker lc, polyglot.ast.Formal f)` Ensure that covariant labels do not occur in the type of the formal for methods.
    `polyglot.ast.Node` | `labelCheck(LabelChecker lc)` Label check the node to which this extension is attached.

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

      `checkAndRemoveThrowType, checkThrowTypes, copy, dump, getPathMap, init, 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 polyglot.ast.Ext

      `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

    - #### JifFormalExt

          public JifFormalExt(ToJavaExt toJava)

  - ### Method Detail

    - #### labelCheck

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

      Description copied from interface: `JifExt`
      Label check the node to which this extension is attached.
      Specified by:
        `labelCheck` in interface `JifExt`
      Overrides:
        `labelCheck` in class `JifExt_c`
      Throws:
        `polyglot.types.SemanticException`

    - #### checkVariance

          protected void checkVariance(LabelChecker lc,
                                       polyglot.ast.Formal f)
                                throws polyglot.types.SemanticException

      Ensure that covariant labels do not occur in the type of the formal for methods. Constructors do not require this check.
      Parameters:
        `lc` -
        `f` -
      Throws:
        `polyglot.types.SemanticException`