public class Infer extends Object
This is NOT part of any supported API. 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.
Modifier and Type | Class and Description |
---|---|
protected static class |
Infer.BoundFilter |
static class |
Infer.InferenceException
This exception class is design to store a list of diagnostics corresponding
to inference errors that can arise during a method applicability check.
|
Modifier and Type | Field and Description |
---|---|
static Type |
anyPoly
A value for prototypes that admit any type, including polymorphic ones.
|
protected Infer.InferenceException |
inferenceException |
protected static Context.Key<Infer> |
inferKey |
Modifier | Constructor and Description |
---|---|
protected |
Infer(Context context) |
Modifier and Type | Method and Description |
---|---|
static Infer |
instance(Context context) |
Type |
instantiateFunctionalInterface(JCDiagnostic.DiagnosticPosition pos,
Type funcInterface,
List<Type> paramTypes,
Check.CheckContext checkContext)
This method is used to infer a suitable target SAM in case the original
SAM type contains one or more wildcards.
|
Type |
instantiateMethod(Env<AttrContext> env,
List<Type> tvars,
Type.MethodType mt,
com.sun.tools.javac.comp.Attr.ResultInfo resultInfo,
Symbol msym,
List<Type> argtypes,
boolean allowBoxing,
boolean useVarargs,
com.sun.tools.javac.comp.Resolve.MethodResolutionContext resolveContext,
Warner warn)
Main inference entry point - instantiate a generic method type
using given argument types and (possibly) an expected target-type.
|
protected static final Context.Key<Infer> inferKey
public static final Type anyPoly
protected final Infer.InferenceException inferenceException
protected Infer(Context context)
public Type instantiateMethod(Env<AttrContext> env, List<Type> tvars, Type.MethodType mt, com.sun.tools.javac.comp.Attr.ResultInfo resultInfo, Symbol msym, List<Type> argtypes, boolean allowBoxing, boolean useVarargs, com.sun.tools.javac.comp.Resolve.MethodResolutionContext resolveContext, Warner warn) throws Infer.InferenceException
Infer.InferenceException
public Type instantiateFunctionalInterface(JCDiagnostic.DiagnosticPosition pos, Type funcInterface, List<Type> paramTypes, Check.CheckContext checkContext)
Copyright © 2015. All rights reserved.