jif.types.label

## Class JoinPolicy_c<P extends Policy>

- java.lang.Object
- - polyglot.types.TypeObject_c
  - - jif.types.label.Policy_c
    - - jif.types.label.JoinPolicy_c<P>

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, JoinPolicy<P>, Policy, polyglot.types.TypeObject, polyglot.util.Copy<polyglot.types.TypeObject>
  Direct Known Subclasses:
    JoinConfPolicy_c, JoinIntegPolicy_c

      public abstract class JoinPolicy_c<P extends Policy>
      extends Policy_c
      implements JoinPolicy<P>

  Represents a join of a number of policies.
  See Also:
    Serialized Form

- - ### Nested Class Summary

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

      `polyglot.util.Copy.Util`

  - ### Field Summary

    - ### Fields inherited from class polyglot.types.TypeObject_c

      `position, ts`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JoinPolicy_c(java.util.Set<P> components, JifTypeSystem ts, polyglot.util.Position pos)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract Policy` | `constructJoinPolicy(java.util.Set<P> components, polyglot.util.Position pos)`
    `boolean` | `equalsImpl(polyglot.types.TypeObject o)`
    `int` | `hashCode()`
    `boolean` | `hasVariables()`
    `boolean` | `hasWritersToReaders()`
    `boolean` | `isBottom()`
    `boolean` | `isCanonical()`
    `boolean` | `isRuntimeRepresentable()`
    `boolean` | `isSingleton()`
    `boolean` | `isTop()`
    `java.util.Collection<P>` | `joinComponents()`
    `PathMap` | `labelCheck(JifContext A, LabelChecker lc)`
    `protected boolean` | `leq_(Policy p, LabelEnv env, LabelEnv.SearchState state)`
    `protected Policy` | `simplifyImpl()`
    `Policy` | `subst(LabelSubstitution substitution)`
    `java.util.List<polyglot.types.Type>` | `throwTypes(polyglot.types.TypeSystem ts)`
    `java.lang.String` | `toString(java.util.Set<Label> printedLabels)`
    `protected void` | `updateContextForComp(LabelChecker lc, JifContext A, PathMap Xprev)` Utility method for updating the context for checking a join component.

    - ### Methods inherited from class jif.types.label.Policy_c

      `copy, simplify, toString`

    - ### Methods inherited from class polyglot.types.TypeObject_c

      `equals, position, typeSystem`

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

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

    - ### Methods inherited from interface jif.types.label.Policy

      `simplify`

    - ### Methods inherited from interface polyglot.types.TypeObject

      `position, typeSystem`

    - ### Methods inherited from interface polyglot.util.Copy

      `copy`

- - ### Constructor Detail

    - #### JoinPolicy_c

          public JoinPolicy_c(java.util.Set<P> components,
                              JifTypeSystem ts,
                              polyglot.util.Position pos)

  - ### Method Detail

    - #### isSingleton

          public boolean isSingleton()

      Specified by:
        `isSingleton` in interface `Policy`

    - #### isCanonical

          public boolean isCanonical()

      Specified by:
        `isCanonical` in interface `Policy`
      Specified by:
        `isCanonical` in interface `polyglot.types.TypeObject`

    - #### isRuntimeRepresentable

          public boolean isRuntimeRepresentable()

      Specified by:
        `isRuntimeRepresentable` in interface `Policy`

    - #### equalsImpl

          public boolean equalsImpl(polyglot.types.TypeObject o)

      Specified by:
        `equalsImpl` in interface `polyglot.types.TypeObject`
      Specified by:
        `equalsImpl` in class `Policy_c`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `polyglot.types.TypeObject_c`

    - #### toString

          public java.lang.String toString(java.util.Set<Label> printedLabels)

      Specified by:
        `toString` in interface `Policy`
      Specified by:
        `toString` in class `Policy_c`
      Parameters:
        `printedLabels` - the set of labels for which auxiliary information should be omitted.

    - #### leq_

          protected boolean leq_(Policy p,
                                 LabelEnv env,
                                 LabelEnv.SearchState state)

    - #### joinComponents

          public java.util.Collection<P> joinComponents()

      Specified by:
        `joinComponents` in interface `JoinPolicy<P extends Policy>`

    - #### simplifyImpl

          protected Policy simplifyImpl()

      Specified by:
        `simplifyImpl` in class `Policy_c`
      Returns:
        An equivalent label with fewer components by pulling out less restrictive policies.

    - #### constructJoinPolicy

          protected abstract Policy constructJoinPolicy(java.util.Set<P> components,
                                                        polyglot.util.Position pos)

    - #### throwTypes

          public java.util.List<polyglot.types.Type> throwTypes(polyglot.types.TypeSystem ts)

      Specified by:
        `throwTypes` in interface `Policy`

    - #### subst

          public Policy subst(LabelSubstitution substitution)
                       throws polyglot.types.SemanticException

      Specified by:
        `subst` in interface `Policy`
      Throws:
        `polyglot.types.SemanticException`

    - #### hasWritersToReaders

          public boolean hasWritersToReaders()

      Specified by:
        `hasWritersToReaders` in interface `Policy`
      Overrides:
        `hasWritersToReaders` in class `Policy_c`

    - #### hasVariables

          public boolean hasVariables()

      Specified by:
        `hasVariables` in interface `Policy`
      Overrides:
        `hasVariables` in class `Policy_c`

    - #### labelCheck

          public PathMap labelCheck(JifContext A,
                                    LabelChecker lc)

      Specified by:
        `labelCheck` in interface `Policy`

    - #### updateContextForComp

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

      Utility method for updating the context for checking a join component. Useful for overriding in projects like Fabric.

    - #### isTop

          public boolean isTop()

      Specified by:
        `isTop` in interface `Policy`

    - #### isBottom

          public boolean isBottom()

      Specified by:
        `isBottom` in interface `Policy`