public class SubtypeChecker
extends java.lang.Object
| Constructor and Description |
|---|
SubtypeChecker(polyglot.types.Type supertype,
polyglot.types.Type subtype) |
| Modifier and Type | Method and Description |
|---|---|
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. |
public SubtypeChecker(polyglot.types.Type supertype,
polyglot.types.Type subtype)
public void addSubtypeConstraints(LabelChecker lc, polyglot.util.Position pos) throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionprotected void addSubtypeConstraints(LabelChecker lc, polyglot.util.Position pos, polyglot.types.Type supertype, polyglot.types.Type subtype) throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionpublic static JifPolyType polyTypeForClass(JifClassType jct)
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.