org.apache.aries.blueprint.container
Class AggregateConverter

java.lang.Object
  extended by org.apache.aries.blueprint.container.AggregateConverter
All Implemented Interfaces:
org.osgi.service.blueprint.container.Converter

public class AggregateConverter
extends Object
implements org.osgi.service.blueprint.container.Converter

Implementation of the Converter. This object contains all the registered Converters which can be registered by using registerConverter(Converter) and unregistered using unregisterConverter(Converter). Each BlueprintContainer has its own AggregateConverter used to register converters defined by the related blueprint bundle.

Version:
$Rev: 1135629 $, $Date: 2011-06-14 16:01:01 +0100 (Tue, 14 Jun 2011) $

Nested Class Summary
static interface AggregateConverter.Convertible
          Objects implementing this interface will bypass the default conversion rules and be called directly to transform into the expected type.
 
Constructor Summary
AggregateConverter(ExtendedBlueprintContainer blueprintContainer)
           
 
Method Summary
 boolean canConvert(Object fromValue, org.osgi.service.blueprint.container.ReifiedType toType)
           
 Object convert(Object fromValue, org.osgi.service.blueprint.container.ReifiedType type)
           
 Object convert(Object source, Type target)
           
 Object convertFromString(String value, Class toType, Object loader)
           
 Object convertToNumber(Number value, Class toType)
           
static boolean isAssignable(Object source, org.osgi.service.blueprint.container.ReifiedType target)
           
 void registerConverter(org.osgi.service.blueprint.container.Converter converter)
           
 void unregisterConverter(org.osgi.service.blueprint.container.Converter converter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregateConverter

public AggregateConverter(ExtendedBlueprintContainer blueprintContainer)
Method Detail

registerConverter

public void registerConverter(org.osgi.service.blueprint.container.Converter converter)

unregisterConverter

public void unregisterConverter(org.osgi.service.blueprint.container.Converter converter)

canConvert

public boolean canConvert(Object fromValue,
                          org.osgi.service.blueprint.container.ReifiedType toType)
Specified by:
canConvert in interface org.osgi.service.blueprint.container.Converter

convert

public Object convert(Object fromValue,
                      org.osgi.service.blueprint.container.ReifiedType type)
               throws Exception
Specified by:
convert in interface org.osgi.service.blueprint.container.Converter
Throws:
Exception

convertToNumber

public Object convertToNumber(Number value,
                              Class toType)
                       throws Exception
Throws:
Exception

convertFromString

public Object convertFromString(String value,
                                Class toType,
                                Object loader)
                         throws Exception
Throws:
Exception

isAssignable

public static boolean isAssignable(Object source,
                                   org.osgi.service.blueprint.container.ReifiedType target)

convert

public Object convert(Object source,
                      Type target)
               throws Exception
Throws:
Exception


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.