| java.lang.Object com.sun.tools.javac.comp.Infer
Infer | public class Infer (Code) | | Helper class for type parameter inference, used by the attribution phase.
This is NOT part of any API supported by Sun Microsystems. If
you write code that depends on this, you do so at your own risk.
This code and its internal interfaces are subject to change or
deletion without notice.
|
Method Summary | |
public static Infer | instance(Context context) | public Type | instantiateExpr(ForAll that, Type to, Warner warn) Try to instantiate expression type `that' to given type `to'. | public Type | instantiateMethod(List<Type> tvars, MethodType mt, List<Type> argtypes, boolean allowBoxing, boolean useVarargs, Warner warn) Instantiate method type `mt' by finding instantiations of
`tvars' so that method can be applied to `argtypes'. | void | maximizeInst(UndetVar that, Warner warn) Instantiate undetermined type variable to its minimal upper bound. | void | minimizeInst(UndetVar that, Warner warn) Instaniate undetermined type variable to the lub of all its lower bounds. |
anyPoly | final public static Type anyPoly(Code) | | A value for prototypes that admit any type, including polymorphic ones.
|
fromTypeVarFun | Mapping fromTypeVarFun(Code) | | A mapping that turns type variables into undetermined type variables.
|
getInstFun | Mapping getInstFun(Code) | | A mapping that returns its type argument with every UndetVar replaced
by its `inst' field. Throws a NoInstanceException
if this not possible because an `inst' field is null.
|
instantiateExpr | public Type instantiateExpr(ForAll that, Type to, Warner warn) throws NoInstanceException(Code) | | Try to instantiate expression type `that' to given type `to'.
If a maximal instantiation exists which makes this type
a subtype of type `to', return the instantiated type.
If no instantiation exists, or if several incomparable
best instantiations exist throw a NoInstanceException.
|
instantiateMethod | public Type instantiateMethod(List<Type> tvars, MethodType mt, List<Type> argtypes, boolean allowBoxing, boolean useVarargs, Warner warn) throws NoInstanceException(Code) | | Instantiate method type `mt' by finding instantiations of
`tvars' so that method can be applied to `argtypes'.
|
maximizeInst | void maximizeInst(UndetVar that, Warner warn) throws NoInstanceException(Code) | | Instantiate undetermined type variable to its minimal upper bound.
Throw a NoInstanceException if this not possible.
|
minimizeInst | void minimizeInst(UndetVar that, Warner warn) throws NoInstanceException(Code) | | Instaniate undetermined type variable to the lub of all its lower bounds.
Throw a NoInstanceException if this not possible.
|
|
|