public class FunctionToInterfaceCoercer extends BaseCoercer implements IResolvingCoercer
MAX_PRIORITY| Modifier and Type | Method and Description |
|---|---|
Object |
coerceValue(IType typeToCoerceTo,
Object value) |
int |
getPriority(IType to,
IType from) |
static IFunctionType |
getRepresentativeFunctionType(IType interfaceType) |
static IMethodInfo |
getSingleMethod(IType interfaceType) |
static IJavaClassMethod |
getSingleMethodFromJavaInterface(IJavaClassInfo interfaceType) |
static IJavaClassMethod |
getSingleMethodFromJavaInterface(IJavaType interfaceType) |
boolean |
handlesNull() |
static FunctionToInterfaceCoercer |
instance() |
boolean |
isExplicitCoercion() |
IType |
resolveType(IType target,
IType source)
This method should produce a more appropriately parameterized type for the given target type for this
coercion.
|
public static FunctionToInterfaceCoercer instance()
public Object coerceValue(IType typeToCoerceTo, Object value)
coerceValue in interface ICoercerpublic static IFunctionType getRepresentativeFunctionType(IType interfaceType)
public static IMethodInfo getSingleMethod(IType interfaceType)
public static IJavaClassMethod getSingleMethodFromJavaInterface(IJavaType interfaceType)
public static IJavaClassMethod getSingleMethodFromJavaInterface(IJavaClassInfo interfaceType)
public boolean isExplicitCoercion()
isExplicitCoercion in interface ICoercerpublic boolean handlesNull()
handlesNull in interface ICoercerpublic int getPriority(IType to, IType from)
getPriority in interface ICoercerpublic IType resolveType(IType target, IType source)
IResolvingCoercerThis method should produce a more appropriately parameterized type for the given target type for this
coercion. This allows a coercion to communicate type information through the coercion process. An example
is the MetaType-to-Class coercion. MetaType
If no more appropriate inference type exists, this method should return the source type.
resolveType in interface IResolvingCoercertarget - typeCopyright © 2018. All rights reserved.