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.SemanticException
protected void addSubtypeConstraints(LabelChecker lc, polyglot.util.Position pos, polyglot.types.Type supertype, polyglot.types.Type subtype) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public 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.