F
- The type to convert from.T
- The type to convert to.public class TypeRule<F,T> extends java.lang.Object implements TargetRule
Rule
implementation.
Filtering on the to is done by the converter customization
mechanism.Modifier and Type | Field and Description |
---|---|
private ConverterFunction |
function |
private java.lang.reflect.Type |
toType |
Constructor and Description |
---|
TypeRule(java.lang.reflect.Type from,
java.lang.reflect.Type to,
Function<F,T> func)
Create an instance based on source, target types and a conversion
function.
|
Modifier and Type | Method and Description |
---|---|
ConverterFunction |
getFunction()
The function to perform the conversion.
|
private static <F,T> ConverterFunction |
getFunction(java.lang.reflect.Type from,
Function<F,T> func) |
java.lang.reflect.Type |
getTargetType()
The target type of this rule.
|
private final ConverterFunction function
private final java.lang.reflect.Type toType
private static <F,T> ConverterFunction getFunction(java.lang.reflect.Type from, Function<F,T> func)
public ConverterFunction getFunction()
TargetRule
getFunction
in interface TargetRule
public java.lang.reflect.Type getTargetType()
TargetRule
getTargetType
in interface TargetRule