|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.dynamicjava.symbol.TypeSystem
edu.rice.cs.dynamicjava.symbol.StandardTypeSystem
edu.rice.cs.dynamicjava.symbol.JLSTypeSystem
public class JLSTypeSystem
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.rice.cs.dynamicjava.symbol.StandardTypeSystem |
|---|
StandardTypeSystem.SubstitutionMap |
| Field Summary |
|---|
| Fields inherited from class edu.rice.cs.dynamicjava.symbol.StandardTypeSystem |
|---|
CLONEABLE_AND_SERIALIZABLE, IS_ARRAY, IS_PRIMITIVE, IS_REFERENCE |
| Fields inherited from class edu.rice.cs.dynamicjava.symbol.TypeSystem |
|---|
BOOLEAN, BOOLEAN_CLASS, BOTTOM, BYTE, BYTE_CLASS, CHAR, CHARACTER_CLASS, CLONEABLE, DOUBLE, DOUBLE_CLASS, EMPTY_EXPRESSION_ITERABLE, EMPTY_TYPE_ARRAY, EMPTY_TYPE_ITERABLE, EXCEPTION, FLOAT, FLOAT_CLASS, INT, INTEGER_CLASS, LONG, LONG_CLASS, NONE_TYPE_OPTION, NULL, OBJECT, RUNTIME_EXCEPTION, SERIALIZABLE, SHORT, SHORT_CLASS, STRING, THROWABLE, TOP, VOID, VOID_CLASS |
| Constructor Summary | |
|---|---|
JLSTypeSystem(Options opt)
|
|
JLSTypeSystem(Options opt,
boolean packCaptureVars,
boolean alwaysUseArgumentConstraints,
boolean waitToUseDeclaredBounds,
boolean boxingInMostSpecific,
boolean useExplicitTypeArgs,
boolean strictClassEquality)
|
|
| Method Summary | |
|---|---|
protected java.lang.Iterable<Type> |
captureTypeArgs(java.lang.Iterable<? extends Type> targs,
java.lang.Iterable<? extends VariableType> params)
Produce types that are bounded by the corresponding type argument and parameter. |
protected java.lang.Iterable<Type> |
inferTypeArguments(java.lang.Iterable<? extends VariableType> tparams,
java.lang.Iterable<? extends Type> params,
Type returned,
java.lang.Iterable<? extends Type> args,
Option<Type> expected)
Top-level entry point for type inference. |
boolean |
isEqual(Type t1,
Type t2)
Determine if the given types may be treated as equal. |
boolean |
isSubtype(Type subT,
Type superT)
Determine if subT is a subtype of superT. |
boolean |
isWellFormed(Type t)
Determine if the type is well-formed. |
Type |
join(java.lang.Iterable<? extends Type> ts)
Join implementation based on the JLS specification (15.12.2.7). |
Type |
meet(java.lang.Iterable<? extends Type> ts)
Simple meet implementation: construct an intersection if there are more than two. |
| Methods inherited from class edu.rice.cs.dynamicjava.symbol.TypeSystem |
|---|
join, meet, wrap, wrap, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JLSTypeSystem(Options opt)
public JLSTypeSystem(Options opt,
boolean packCaptureVars,
boolean alwaysUseArgumentConstraints,
boolean waitToUseDeclaredBounds,
boolean boxingInMostSpecific,
boolean useExplicitTypeArgs,
boolean strictClassEquality)
| Method Detail |
|---|
public boolean isWellFormed(Type t)
isWellFormed in class StandardTypeSystem
public boolean isEqual(Type t1,
Type t2)
isEqual in class StandardTypeSystem
public boolean isSubtype(Type subT,
Type superT)
subT is a subtype of superT. This is a recursive
(in terms of isEqual(edu.rice.cs.dynamicjava.symbol.type.Type, edu.rice.cs.dynamicjava.symbol.type.Type)), transitive relation.
isSubtype in class StandardTypeSystempublic Type join(java.lang.Iterable<? extends Type> ts)
join in class StandardTypeSystempublic Type meet(java.lang.Iterable<? extends Type> ts)
meet in class StandardTypeSystem
protected java.lang.Iterable<Type> captureTypeArgs(java.lang.Iterable<? extends Type> targs,
java.lang.Iterable<? extends VariableType> params)
StandardTypeSystem
captureTypeArgs in class StandardTypeSystem
protected java.lang.Iterable<Type> inferTypeArguments(java.lang.Iterable<? extends VariableType> tparams,
java.lang.Iterable<? extends Type> params,
Type returned,
java.lang.Iterable<? extends Type> args,
Option<Type> expected)
args were provided where params were expected
(args and params are assumed to have the same length), and returned will
be returned where expected is expected.
inferTypeArguments in class StandardTypeSystemtparams, or null if the parameters
are over-constrained
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||