Top Description Fields Constructors Methods
org.osgi.util.converter

pack-priv Class ConverterImpl

extends Object
implements InternalConverter
Class Inheritance
All Implemented Interfaces
org.osgi.util.converter.InternalConverter, org.osgi.util.converter.Converter
Imports
java.lang.reflect.Method, java.text.ParseException, .SimpleDateFormat, java.util.Calendar, .Date, .TimeZone, .UUID, java.util.regex.Pattern, org.osgi.util.function.Function

Top-level implementation of the Converter. This class contains a number of rules that cover 'special cases'.

Note that this class avoids lambda's and hard dependencies on Java-8 (or later) types to also work under Java 7.

Author
$Id: 968f25d271ff94ea5ef0db5c70d91b0281ea2392 $

Field Summary

Modifier and TypeField and Description
pack-priv static final SimpleDateFormat

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv String
pack-priv String
charArrayToString(char[] ca)

public InternalConverting
convert(Object
The object that should be converted.
obj
)

Implements org.osgi.util.converter.InternalConverter.convert.

Start a conversion for the given object.

public Functioning
function()

Implements org.osgi.util.converter.Converter.function.

Start defining a function that can perform given conversions.

pack-priv Class<?>
public ConverterBuilderImpl
newConverterBuilder()

Implements org.osgi.util.converter.Converter.newConverterBuilder.

Obtain a builder to create a modified converter based on this converter.

private void
pack-priv Character[]
pack-priv char[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ISO8601_DATE_FORMATback to summary
pack-priv static final SimpleDateFormat ISO8601_DATE_FORMAT

Constructor Detail

ConverterImplback to summary
pack-priv ConverterImpl()

Method Detail

addStandardRulesback to summary
pack-priv void addStandardRules(ConverterBuilder cb)
characterArrayToStringback to summary
pack-priv String characterArrayToString(Character[] ca)
charArrayToStringback to summary
pack-priv String charArrayToString(char[] ca)
convertback to summary
public InternalConverting convert(Object obj)

Implements org.osgi.util.converter.InternalConverter.convert.

Doc from org.osgi.util.converter.Converter.convert.

Start a conversion for the given object.

Parameters
obj:Object

The object that should be converted.

Returns:InternalConverting

A Converting object to complete the conversion.

Annotations
@Override
functionback to summary
public Functioning function()

Implements org.osgi.util.converter.Converter.function.

Doc from org.osgi.util.converter.Converter.function.

Start defining a function that can perform given conversions.

Returns:Functioning

A Functioning object to complete the definition.

Annotations
@Override
loadClassUncheckedback to summary
pack-priv Class<?> loadClassUnchecked(String className)
newConverterBuilderback to summary
public ConverterBuilderImpl newConverterBuilder()

Implements org.osgi.util.converter.Converter.newConverterBuilder.

Doc from org.osgi.util.converter.Converter.newConverterBuilder.

Obtain a builder to create a modified converter based on this converter. For more details see the ConverterBuilder interface.

Returns:ConverterBuilderImpl

A new Converter Builder.

Annotations
@Override
reflectiveAddJavaTimeRuleback to summary
private void reflectiveAddJavaTimeRule(ConverterBuilder cb, String timeClsName)
stringToCharacterArrayback to summary
pack-priv Character[] stringToCharacterArray(String s)
stringToCharArrayback to summary
pack-priv char[] stringToCharArray(String s)