org.springframework.osgi.blueprint.container
Class SpringBlueprintConverter
java.lang.Object
org.springframework.osgi.blueprint.container.SpringBlueprintConverter
- All Implemented Interfaces:
- Converter
public class SpringBlueprintConverter
- extends Object
- implements Converter
Blueprint converter exposing the backing container conversion capabilities.
- Author:
- Costin Leau
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringBlueprintConverter
public SpringBlueprintConverter(ConfigurableBeanFactory beanFactory)
canConvert
public boolean canConvert(Object source,
ReifiedType targetType)
- Description copied from interface:
Converter
- Return if this converter is able to convert the specified object to the
specified type.
- Specified by:
canConvert
in interface Converter
- Parameters:
source
- The source object s
to convert.targetType
- The target type T
.
- Returns:
true
if the conversion is possible,
false
otherwise.
convert
public Object convert(Object source,
ReifiedType targetType)
throws Exception
- Description copied from interface:
Converter
- Convert the specified object to an instance of the specified type.
- Specified by:
convert
in interface Converter
- Parameters:
source
- The source object s
to convert.targetType
- The target type T
.
- Returns:
- An instance with a type that is assignable from targetType's raw
class
- Throws:
Exception
- If the conversion cannot succeed. This exception should
not be thrown when the canConvert
method has
returned true
.
Copyright © 2006-2009 Spring Framework. All Rights Reserved.