|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.binding.convert.support.CompositeConversionService
public class CompositeConversionService
A conversion service that delegates to an ordered chain of other conversion services. The first correct reply received from a conversion service in the chain is returned to the caller.
| Constructor Summary | |
|---|---|
CompositeConversionService(ConversionService[] conversionServices)
Create a new composite conversion service. |
|
| Method Summary | |
|---|---|
java.lang.Class |
getClassByAlias(java.lang.String alias)
Return the class with the specified alias. |
ConversionExecutor |
getConversionExecutor(java.lang.Class sourceClass,
java.lang.Class targetClass)
Return a conversion executor command object capable of converting source objects of the specified sourceClass to instances of the targetClass. |
ConversionExecutor |
getConversionExecutorByTargetAlias(java.lang.Class sourceClass,
java.lang.String targetAlias)
Return a conversion executor command object capable of converting source objects of the specified sourceClass to target objects of the type associated with the specified alias. |
ConversionExecutor[] |
getConversionExecutorsForSource(java.lang.Class sourceClass)
Return all conversion executors capable of converting source objects of the the specified sourceClass. |
ConversionService[] |
getConversionServices()
Returns the conversion services in the chain managed by this composite conversion service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompositeConversionService(ConversionService[] conversionServices)
conversionServices - the conversion services in the chain| Method Detail |
|---|
public ConversionService[] getConversionServices()
public ConversionExecutor getConversionExecutor(java.lang.Class sourceClass,
java.lang.Class targetClass)
throws ConversionException
ConversionServicesourceClass to instances of the targetClass.
The returned ConversionExecutor is thread-safe and may safely be cached for use in client code.
getConversionExecutor in interface ConversionServicesourceClass - the source class to convert fromtargetClass - the target class to convert to
ConversionException - an exception occured retrieving a converter for the source-to-target pair
public ConversionExecutor getConversionExecutorByTargetAlias(java.lang.Class sourceClass,
java.lang.String targetAlias)
throws ConversionException
ConversionServicesourceClass to target objects of the type associated with the specified alias.
getConversionExecutorByTargetAlias in interface ConversionServicesourceClass - the sourceClasstargetAlias - the target alias
ConversionException - an exception occured retrieving a converter for the source-to-target pair
public ConversionExecutor[] getConversionExecutorsForSource(java.lang.Class sourceClass)
throws ConversionException
ConversionServicesourceClass.
getConversionExecutorsForSource in interface ConversionServicesourceClass - the source class to convert from
ConversionException - an exception occured retrieving the converters
public java.lang.Class getClassByAlias(java.lang.String alias)
throws ConversionException
ConversionService
getClassByAlias in interface ConversionServicealias - the class alias
ConversionException - when an error occurs looking up the class by alias
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||