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: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.
-
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.
-