Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jif.extension
Class LabelTypeCheckUtil

    java.lang.Object
      jif.extension.LabelTypeCheckUtil

    public class LabelTypeCheckUtil

extends java.lang.Object

Contains some common utility code to type check dynamic labels and principals

Field Summary
`protected JifTypeSystem` | `ts`

Constructor Summary
`LabelTypeCheckUtil(JifTypeSystem ts)`

Method Summary
`PathMap` | `labelCheckType(polyglot.types.Type t, LabelChecker lc, java.util.List throwTypes, polyglot.util.Position pos)`
`java.util.List` | `labelCheckTypeParams(polyglot.types.Type t, LabelChecker lc, java.util.List throwTypes, polyglot.util.Position pos)`
`java.util.Collection` | `labelComponents(Label L)`
`java.util.Set` | `localInstancesUsed(JifClassType type)` Returns a set of local instances that are used in the type.
`java.util.List` | `throwTypes(JifClassType type)` Return the types that may be thrown by a runtime evalution of the type `type`.
`void` | `typeCheckLabel(polyglot.visit.TypeChecker tc, Label Lbl)` Check that all access paths occurring in label Lbl have the appropriate type.
`void` | `typeCheckPolicy(polyglot.visit.TypeChecker tc, Policy p)`
`void` | `typeCheckPrincipal(polyglot.visit.TypeChecker tc, Principal principal)` Check the type of any access path contained in a dynamic principal.
`void` | `typeCheckType(polyglot.visit.TypeChecker tc, polyglot.types.Type t)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ts

    protected final JifTypeSystem ts

Constructor Detail

### LabelTypeCheckUtil

    public LabelTypeCheckUtil(JifTypeSystem ts)

Method Detail

### typeCheckPrincipal

    public void typeCheckPrincipal(polyglot.visit.TypeChecker tc,
                                   Principal principal)
                            throws polyglot.types.SemanticException

  Check the type of any access path contained in a dynamic principal. All such access paths should have type Principal.

  Parameters:
    `tc` -
    `principal` -
  Throws:
    `polyglot.types.SemanticException`

### typeCheckLabel

    public void typeCheckLabel(polyglot.visit.TypeChecker tc,
                               Label Lbl)
                        throws polyglot.types.SemanticException

  Check that all access paths occurring in label Lbl have the appropriate type.

  Parameters:
    `tc` -
    `Lbl` -
  Throws:
    `polyglot.types.SemanticException`

### labelComponents

    public java.util.Collection labelComponents(Label L)

### typeCheckPolicy

    public void typeCheckPolicy(polyglot.visit.TypeChecker tc,
                                Policy p)
                         throws polyglot.types.SemanticException

  Throws:
    `polyglot.types.SemanticException`

### typeCheckType

    public void typeCheckType(polyglot.visit.TypeChecker tc,
                              polyglot.types.Type t)
                       throws polyglot.types.SemanticException

  Throws:
    `polyglot.types.SemanticException`

### labelCheckType

    public PathMap labelCheckType(polyglot.types.Type t,
                                  LabelChecker lc,
                                  java.util.List throwTypes,
                                  polyglot.util.Position pos)
                           throws polyglot.types.SemanticException

  Throws:
    `polyglot.types.SemanticException`

### labelCheckTypeParams

    public java.util.List labelCheckTypeParams(polyglot.types.Type t,
                                               LabelChecker lc,
                                               java.util.List throwTypes,
                                               polyglot.util.Position pos)
                                        throws polyglot.types.SemanticException

  Parameters:
    `t` -
    `lc` -
  Returns:
    List of `PathMap`s, one for each parameter of the subst type.
  Throws:
    `polyglot.types.SemanticException`

### throwTypes

    public java.util.List throwTypes(JifClassType type)

  Return the types that may be thrown by a runtime evalution of the type `type`.

  Parameters:
    `type` -
  Returns:
    the types that may be thrown by a runtime evalution of the type `type`.

### localInstancesUsed

    public java.util.Set localInstancesUsed(JifClassType type)

  Returns a set of local instances that are used in the type.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD