Package ddf.catalog.util.impl
Class ListConverter
java.lang.Object
ddf.catalog.util.impl.ListConverter
- All Implemented Interfaces:
org.osgi.service.blueprint.container.Converter
This converter is used to allow
SortedServiceList objects to pass through for List implementations. This was originally intended to allow plugins to be
automatically sorted in the list. Without this converter, blueprint will copy the list and lose
the reference.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvert(Object sourceObject, org.osgi.service.blueprint.container.ReifiedType targetType) Converts (casts) the sourceObject to a SortedServiceList.
-
Constructor Details
-
ListConverter
public ListConverter()
-
-
Method Details
-
canConvert
public boolean canConvert(Object sourceObject, org.osgi.service.blueprint.container.ReifiedType targetType) - Specified by:
canConvertin interfaceorg.osgi.service.blueprint.container.Converter- Returns:
- true if sourceObject is an instance of SortedServiceList; false otherwise
-
convert
public Object convert(Object sourceObject, org.osgi.service.blueprint.container.ReifiedType targetType) throws Exception Converts (casts) the sourceObject to a SortedServiceList.- Specified by:
convertin interfaceorg.osgi.service.blueprint.container.Converter- Returns:
- sourceObject cast to a SortedServiceList
- Throws:
Exception
-