public class RelayStatesConverter extends Object implements org.osgi.service.blueprint.container.Converter
Constructor and Description |
---|
RelayStatesConverter() |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Object sourceObject,
org.osgi.service.blueprint.container.ReifiedType targetType)
Return if this converter is able to convert the specified object to the specified type.
|
Object |
convert(Object sourceObject,
org.osgi.service.blueprint.container.ReifiedType targetType)
Convert the specified object to an instance of the specified type.
|
public boolean canConvert(Object sourceObject, org.osgi.service.blueprint.container.ReifiedType targetType)
canConvert
in interface org.osgi.service.blueprint.container.Converter
sourceObject
- The source object s
to convert.targetType
- The target type T
.true
if the conversion is possible, false
otherwise.public Object convert(Object sourceObject, org.osgi.service.blueprint.container.ReifiedType targetType) throws Exception
convert
in interface org.osgi.service.blueprint.container.Converter
sourceObject
- The source object s
to convert.targetType
- The target type T
.Exception
- If the conversion cannot succeed. This exception should not be thrown when
the canConvert
method has returned true
.This work is licensed under a Creative Commons Attribution 4.0 International License.