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
Describes a conversion from a Pkl source type to a (possibly parameterized) Java target type,
performed by the given
Converter.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <S,T> Conversion <S, T> of(org.pkl.core.PClassInfo<S> sourceType, 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, 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.
-
Field Details
-
sourceType
-
targetType
-
converter
-
-
Method Details
-
of
public static <S,T> Conversion<S,T> of(org.pkl.core.PClassInfo<S> sourceType, 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, 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.
-