jif.types

## Class TypeSubstitutor

- java.lang.Object
- - jif.types.TypeSubstitutor

- Direct Known Subclasses:
    JifFieldDeclExt_c.InvarianceLabelSubstr, JifFormalExt.FormalVarianceLabelSubstr

      public class TypeSubstitutor
      extends java.lang.Object

  Visits an AST, and applies a `LabelSubsitution` to all labels that occur in the AST. The `LabelSubsitution` is not allowed to throw any `SemanticException`s.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TypeSubstitutor(LabelSubstitution substitution)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `recurseIntoArrayType(polyglot.types.ArrayType type)`
    `protected boolean` | `recurseIntoLabeledType(LabeledType type)`
    `protected boolean` | `recurseIntoSubstType(JifSubstType type)`
    `<P extends ActsForParam> P` | `rewriteActsForParam(P param)`
    `<Actor extends ActsForParam,Granter extends ActsForParam> Assertion` | `rewriteAssertion(Assertion a)`
    `Label` | `rewriteLabel(Label L)`
    `protected Principal` | `rewritePrincipal(Principal p)`
    `polyglot.types.Type` | `rewriteType(polyglot.types.Type t)`

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

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

- - ### Constructor Detail

    - #### TypeSubstitutor

          public TypeSubstitutor(LabelSubstitution substitution)

      Parameters:
        `substitution` - the LabelSubstitution to use.

  - ### Method Detail

    - #### rewriteType

          public polyglot.types.Type rewriteType(polyglot.types.Type t)
                                          throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`

    - #### recurseIntoSubstType

          protected boolean recurseIntoSubstType(JifSubstType type)

    - #### recurseIntoArrayType

          protected boolean recurseIntoArrayType(polyglot.types.ArrayType type)

    - #### recurseIntoLabeledType

          protected boolean recurseIntoLabeledType(LabeledType type)

    - #### rewriteActsForParam

          public <P extends ActsForParam> P rewriteActsForParam(P param)
                                                         throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`

    - #### rewriteLabel

          public Label rewriteLabel(Label L)
                             throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`

    - #### rewritePrincipal

          protected Principal rewritePrincipal(Principal p)
                                        throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`

    - #### rewriteAssertion

          public <Actor extends ActsForParam,Granter extends ActsForParam> Assertion rewriteAssertion(Assertion a)
                                                                                               throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`