Package org.osgi.util.converter
Class FunctioningImpl
- java.lang.Object
-
- org.osgi.util.converter.AbstractSpecifying<Functioning>
-
- org.osgi.util.converter.FunctioningImpl
-
- All Implemented Interfaces:
Functioning
,Specifying<Functioning>
class FunctioningImpl extends AbstractSpecifying<Functioning> implements Functioning
-
-
Field Summary
Fields Modifier and Type Field Description (package private) InternalConverter
converter
-
Fields inherited from class org.osgi.util.converter.AbstractSpecifying
defaultValue, hasDefault, keysIgnoreCase, liveView, sourceAsClass, sourceAsDTO, sourceAsJavaBean, targetAsClass, targetAsDTO, targetAsJavaBean
-
-
Constructor Summary
Constructors Constructor Description FunctioningImpl(InternalConverter converterImpl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) InternalConverting
applyModifiers(InternalConverting ic)
<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 aTypeReference
.-
Methods inherited from class org.osgi.util.converter.AbstractSpecifying
defaultValue, keysIgnoreCase, sourceAs, sourceAsBean, sourceAsDTO, targetAs, targetAsBean, targetAsDTO, view
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.osgi.util.converter.Specifying
defaultValue, keysIgnoreCase, sourceAs, sourceAsBean, sourceAsDTO, targetAs, targetAsBean, targetAsDTO, view
-
-
-
-
Field Detail
-
converter
InternalConverter converter
-
-
Constructor Detail
-
FunctioningImpl
FunctioningImpl(InternalConverter converterImpl)
-
-
Method Detail
-
to
public <T> Function<java.lang.Object,T> to(java.lang.Class<T> cls)
Description copied from interface:Functioning
Specify the target object type for the conversion as a class object.- Specified by:
to
in interfaceFunctioning
- Parameters:
cls
- The class to convert to.- Returns:
- A function that can perform the conversion.
-
to
public <T> Function<java.lang.Object,T> to(TypeReference<T> ref)
Description copied from interface:Functioning
Specify the target object type as aTypeReference
. 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>>() {});
- Specified by:
to
in interfaceFunctioning
- Parameters:
ref
- A type reference to the object being converted to.- Returns:
- A function that can perform the conversion.
-
to
public <T> Function<java.lang.Object,T> to(java.lang.reflect.Type type)
Description copied from interface:Functioning
Specify the target object type as a Java Reflection Type object.- Specified by:
to
in interfaceFunctioning
- Parameters:
type
- A Type object to represent the target type to be converted to.- Returns:
- A function that can perform the conversion.
-
applyModifiers
InternalConverting applyModifiers(InternalConverting ic)
-
-