Top Fields Constructors Methods
org.osgi.util.converter

pack-priv Class FunctioningImpl

extends AbstractSpecifying<Functioning>
implements Functioning
Class Inheritance
All Implemented Interfaces
org.osgi.util.converter.Functioning, org.osgi.util.converter.Specifying
Imports
java.lang.reflect.Type, org.osgi.util.function.Function

Author
$Id: e3c65aaf796eba04486f34ec88731ec16ad7f4d3 $

Field Summary

Modifier and TypeField and Description
pack-priv InternalConverter
Inherited from org.osgi.util.converter.AbstractSpecifying:
defaultValuehasDefaultkeysIgnoreCaseliveViewsourceAsClasssourceAsDTOsourceAsJavaBeantargetAsClasstargetAsDTOtargetAsJavaBean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv InternalConverting
public <T> Function<Object, T>
to(Class<T>
The class to convert to.
cls
)

Implements org.osgi.util.converter.Functioning.to.

Specify the target object type for the conversion as a class object.

public <T> Function<Object, T>
to(TypeReference<T>
A type reference to the object being converted to.
ref
)

Implements org.osgi.util.converter.Functioning.to.

Specify the target object type as a TypeReference.

public <T> Function<Object, T>
to(final Type
A Type object to represent the target type to be converted to.
type
)

Implements org.osgi.util.converter.Functioning.to.

Specify the target object type as a Java Reflection Type object.

Inherited from org.osgi.util.converter.AbstractSpecifying:
defaultValuekeysIgnoreCasesourceAssourceAsBeansourceAsDTOtargetAstargetAsBeantargetAsDTOview

Field Detail

initialConverterback to summary
pack-priv InternalConverter initialConverter

Constructor Detail

FunctioningImplback to summary
pack-priv FunctioningImpl(InternalConverter converter)

Method Detail

applyModifiersback to summary
pack-priv InternalConverting applyModifiers(InternalConverting converter)
toback to summary
public <T> Function<Object, T> to(Class<T> cls)

Implements org.osgi.util.converter.Functioning.to.

Doc from org.osgi.util.converter.Functioning.to.

Specify the target object type for the conversion as a class object.

Parameters
<T>
The type to convert to.
cls:Class<T>

The class to convert to.

Returns:Function<Object, T>

A function that can perform the conversion.

Annotations
@Override
toback to summary
public <T> Function<Object, T> to(TypeReference<T> ref)

Implements org.osgi.util.converter.Functioning.to.

Doc from org.osgi.util.converter.Functioning.to.

Specify the target object type as a 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>>() {
		});
Parameters
<T>
The type to convert to.
ref:TypeReference<T>

A type reference to the object being converted to.

Returns:Function<Object, T>

A function that can perform the conversion.

Annotations
@Override
toback to summary
public <T> Function<Object, T> to(final Type type)

Implements org.osgi.util.converter.Functioning.to.

Doc from org.osgi.util.converter.Functioning.to.

Specify the target object type as a Java Reflection Type object.

Parameters
<T>
The type to convert to.
type:Type

A Type object to represent the target type to be converted to.

Returns:Function<Object, T>

A function that can perform the conversion.

Annotations
@Override