Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.osgi.service.blueprint.container
Interface Converter

All Known Implementing Classes:
  SpringBlueprintConverter

    public interface Converter

Type converter to convert an object to a target type.

Version:
  $Revision: 7564 $

Method Summary
`boolean` | `canConvert(Object sourceObject, ReifiedType targetType)` Return if this converter is able to convert the specified object to the specified type.
`Object` | `convert(Object sourceObject, ReifiedType targetType)` Convert the specified object to an instance of the specified type.

Method Detail

### canConvert

    boolean canConvert(Object sourceObject,
                       ReifiedType targetType)

  Return if this converter is able to convert the specified object to the specified type.

  Parameters:
    `sourceObject` - The source object `s` to convert.
    `targetType` - The target type `T`.
  Returns:
    `true` if the conversion is possible, `false` otherwise.

### convert

    Object convert(Object sourceObject,
                   ReifiedType targetType)
                   throws Exception

  Convert the specified object to an instance of the specified type.

  Parameters:
    `sourceObject` - 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`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 Spring Framework. All Rights Reserved.