public class MapConverter extends Object implements org.osgi.service.blueprint.container.Converter
DescribableServiceMap
objects to pass through for Map
implementations. Without this converter, blueprint will copy the map and lose the
reference.Constructor and Description |
---|
MapConverter() |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Object sourceObject,
org.osgi.service.blueprint.container.ReifiedType targetType) |
Object |
convert(Object sourceObject,
org.osgi.service.blueprint.container.ReifiedType targetType)
Converts (casts) the sourceObject to a DescribableServiceMap.
|
public boolean canConvert(Object sourceObject, org.osgi.service.blueprint.container.ReifiedType targetType)
canConvert
in interface org.osgi.service.blueprint.container.Converter
sourceObject
- object considering to be convertedtargetType
- The target type T
.public Object convert(Object sourceObject, org.osgi.service.blueprint.container.ReifiedType targetType) throws Exception
convert
in interface org.osgi.service.blueprint.container.Converter
sourceObject
- object being convertedtargetType
- The target type T
.Exception
This work is licensed under a Creative Commons Attribution 4.0 International License.