Package org.pkl.config.java.mapper
Class Conversion<S,T>
- java.lang.Object
-
- org.pkl.config.java.mapper.Conversion<S,T>
-
- Type Parameters:
S- Java type representing the Pkl source typeT- Java target type
public final class Conversion<S,T> extends java.lang.ObjectDescribes a conversion from a Pkl source type to a (possibly parameterized) Java target type, performed by the givenConverter.
-
-
Field Summary
Fields Modifier and Type Field Description Converter<? super S,? extends T>converterorg.pkl.core.PClassInfo<S>sourceTypejava.lang.reflect.TypetargetType
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S,T>
Conversion<S,T>of(org.pkl.core.PClassInfo<S> sourceType, java.lang.Class<T> targetType, Converter<? super S,? extends T> converter)Creates a conversion from the given Pkl source type to the given non-parameterized Java type, using the given converter.static <S,T>
Conversion<S,T>of(org.pkl.core.PClassInfo<S> sourceType, java.lang.reflect.Type targetType, Converter<? super S,? extends T> converter)Creates a conversion from the given Pkl source type to the given (possibly parameterized) Java type, using the given converter.
-
-
-
Method Detail
-
of
public static <S,T> Conversion<S,T> of(org.pkl.core.PClassInfo<S> sourceType, java.lang.reflect.Type targetType, Converter<? super S,? extends T> converter)
Creates a conversion from the given Pkl source type to the given (possibly parameterized) Java type, using the given converter.
-
of
public static <S,T> Conversion<S,T> of(org.pkl.core.PClassInfo<S> sourceType, java.lang.Class<T> targetType, Converter<? super S,? extends T> converter)
Creates a conversion from the given Pkl source type to the given non-parameterized Java type, using the given converter. This overload is provided to allow for better type inference.
-
-