Package org.osgi.util.converter
Class CustomConverterImpl
java.lang.Object
org.osgi.util.converter.CustomConverterImpl
- All Implemented Interfaces:
Converter
,InternalConverter
A custom converter wraps another converter by adding rules and/or error
handlers.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final List
<ConverterFunction> private final InternalConverter
(package private) final List
<ConverterFunction> (package private) final Map
<Type, List<ConverterFunction>> -
Constructor Summary
ConstructorsConstructorDescriptionCustomConverterImpl
(InternalConverter converter, Map<Type, List<ConverterFunction>> rules, List<ConverterFunction> catchAllRules, List<ConverterFunction> errHandlers) -
Method Summary
Modifier and TypeMethodDescriptionStart a conversion for the given object.function()
Start defining a function that can perform given conversions.Obtain a builder to create a modified converter based on this converter.
-
Field Details
-
delegate
-
typeRules
-
allRules
-
errorHandlers
-
-
Constructor Details
-
CustomConverterImpl
CustomConverterImpl(InternalConverter converter, Map<Type, List<ConverterFunction>> rules, List<ConverterFunction> catchAllRules, List<ConverterFunction> errHandlers)
-
-
Method Details
-
convert
Description copied from interface:Converter
Start a conversion for the given object.- Specified by:
convert
in interfaceConverter
- Specified by:
convert
in interfaceInternalConverter
- Parameters:
obj
- The object that should be converted.- Returns:
- A
Converting
object to complete the conversion.
-
function
Description copied from interface:Converter
Start defining a function that can perform given conversions.- Specified by:
function
in interfaceConverter
- Returns:
- A
Functioning
object to complete the definition.
-
newConverterBuilder
Description copied from interface:Converter
Obtain a builder to create a modified converter based on this converter. For more details see theConverterBuilder
interface.- Specified by:
newConverterBuilder
in interfaceConverter
- Returns:
- A new Converter Builder.
-