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 SubtypeChecker

    java.lang.Object
      jif.extension.SubtypeChecker

    public class SubtypeChecker

extends java.lang.Object

A checker of subtype relationships.

Constructor Summary
`SubtypeChecker(polyglot.types.Type supertype, polyglot.types.Type subtype)`

Method Summary
`void` | `addSubtypeConstraints(LabelChecker lc, polyglot.util.Position pos)` Check that subtype <= supertype
`protected void` | `addSubtypeConstraints(LabelChecker lc, polyglot.util.Position pos, polyglot.types.Type supertype, polyglot.types.Type subtype)` Check that subtype <= supertype
`static JifPolyType` | `polyTypeForClass(JifClassType jct)` Return the `JifPolyType` for the given `JifClassType jct`.

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

Constructor Detail

### SubtypeChecker

    public SubtypeChecker(polyglot.types.Type supertype,
                          polyglot.types.Type subtype)

Method Detail

### addSubtypeConstraints

    public void addSubtypeConstraints(LabelChecker lc,
                                      polyglot.util.Position pos)
                               throws polyglot.types.SemanticException

  Check that subtype <= supertype

  Throws:
    `polyglot.types.SemanticException`

### addSubtypeConstraints

    protected void addSubtypeConstraints(LabelChecker lc,
                                         polyglot.util.Position pos,
                                         polyglot.types.Type supertype,
                                         polyglot.types.Type subtype)
                                  throws polyglot.types.SemanticException

  Check that subtype <= supertype

  Throws:
    `polyglot.types.SemanticException`

### polyTypeForClass

    public static JifPolyType polyTypeForClass(JifClassType jct)

  Return the `JifPolyType` for the given `JifClassType jct`. If `jct` is an instance of `JifPolyType`, then `jct` is returned; otherwise, if `jct` is an instance of `JifSubstType` then `jct.base()` is returned.

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