@ProviderType public interface Functioning extends Specifying<Functioning>
Functioning
instance can
be obtained via the Converter
.Modifier and Type | Method and Description |
---|---|
<T> Function<java.lang.Object,T> |
to(java.lang.Class<T> cls)
Specify the target object type for the conversion as a class object.
|
<T> Function<java.lang.Object,T> |
to(java.lang.reflect.Type type)
Specify the target object type as a Java Reflection Type object.
|
<T> Function<java.lang.Object,T> |
to(TypeReference<T> ref)
Specify the target object type as a
TypeReference . |
defaultValue, keysIgnoreCase, sourceAs, sourceAsBean, sourceAsDTO, targetAs, targetAsBean, targetAsDTO, view
<T> Function<java.lang.Object,T> to(java.lang.Class<T> cls)
cls
- The class to convert to.<T> Function<java.lang.Object,T> to(java.lang.reflect.Type type)
type
- A Type object to represent the target type to be converted
to.<T> Function<java.lang.Object,T> to(TypeReference<T> ref)
TypeReference
. If the target
class carries generics information a TypeReference should be used as this
preserves the generic information whereas a Class object has this
information erased. Example use:
List<String> result = converter.function() .to(new TypeReference<List<String>>() {});
ref
- A type reference to the object being converted to.Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0