Package org.osgi.util.converter
Class ConverterImpl
java.lang.Object
org.osgi.util.converter.ConverterImpl
- All Implemented Interfaces:
Converter,InternalConverter
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void(package private) String(package private) StringcharArrayToString(char[] ca) Start a conversion for the given object.function()Start defining a function that can perform given conversions.(package private) Class<?> loadClassUnchecked(String className) Obtain a builder to create a modified converter based on this converter.private voidreflectiveAddJavaTimeRule(ConverterBuilder cb, String timeClsName) (package private) Character[](package private) char[]
-
Field Details
-
ISO8601_DATE_FORMAT
-
-
Constructor Details
-
ConverterImpl
ConverterImpl()
-
-
Method Details
-
convert
Description copied from interface:ConverterStart a conversion for the given object.- Specified by:
convertin interfaceConverter- Specified by:
convertin interfaceInternalConverter- Parameters:
obj- The object that should be converted.- Returns:
- A
Convertingobject to complete the conversion.
-
function
Description copied from interface:ConverterStart defining a function that can perform given conversions.- Specified by:
functionin interfaceConverter- Returns:
- A
Functioningobject to complete the definition.
-
addStandardRules
-
reflectiveAddJavaTimeRule
-
charArrayToString
-
characterArrayToString
-
stringToCharArray
-
stringToCharacterArray
-
loadClassUnchecked
-
newConverterBuilder
Description copied from interface:ConverterObtain a builder to create a modified converter based on this converter. For more details see theConverterBuilderinterface.- Specified by:
newConverterBuilderin interfaceConverter- Returns:
- A new Converter Builder.
-