|
Spring Web Flow | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConversionService
A service interface for retrieving type conversion executors. The returned command objects are thread-safe and may be safely cached for use by client code. Type converters convert from one type to another.
| Method Summary | |
|---|---|
java.lang.Object |
executeConversion(java.lang.Object source,
java.lang.Class<?> targetClass)
Execute a conversion of the source object provided to the specified targetClass |
java.lang.Object |
executeConversion(java.lang.String converterId,
java.lang.Object source,
java.lang.Class<?> targetClass)
Execute a conversion using the custom converter with the provided id. |
java.lang.Class<?> |
getClassForAlias(java.lang.String alias)
Lookup a class by its well-known alias. |
ConversionExecutor |
getConversionExecutor(java.lang.Class<?> sourceClass,
java.lang.Class<?> targetClass)
Return the default conversion executor capable of converting source objects of the specified sourceClass to instances of the targetClass. |
ConversionExecutor |
getConversionExecutor(java.lang.String id,
java.lang.Class<?> sourceClass,
java.lang.Class<?> targetClass)
Return the custom conversion executor capable of converting source objects of the specified sourceClass to instances of the targetClass. |
org.springframework.core.convert.ConversionService |
getDelegateConversionService()
Return the underlying Spring ConversionService. |
| Method Detail |
|---|
java.lang.Object executeConversion(java.lang.Object source,
java.lang.Class<?> targetClass)
throws ConversionException
targetClass
source - the source to convert from (may be null)targetClass - the target class to convert to
targetClass
ConversionException - if an exception occurred during the conversion process
java.lang.Object executeConversion(java.lang.String converterId,
java.lang.Object source,
java.lang.Class<?> targetClass)
converterId - the id of the custom converter, which must be registered with this conversion service and
capable of converting to the target classsource - the source to convert from (may be null)targetClass - the target class to convert to
targetClass
ConversionException - if an exception occurred during the conversion process
ConversionExecutor getConversionExecutor(java.lang.Class<?> sourceClass,
java.lang.Class<?> targetClass)
throws ConversionExecutorNotFoundException
sourceClass to instances of the targetClass.
The returned ConversionExecutor is thread-safe and may safely be cached for use in client code.
sourceClass - the source class to convert from (required)targetClass - the target class to convert to (required)
ConversionExecutorNotFoundException - when no suitable conversion executor could be found
ConversionExecutor getConversionExecutor(java.lang.String id,
java.lang.Class<?> sourceClass,
java.lang.Class<?> targetClass)
throws ConversionExecutorNotFoundException
sourceClass to instances of the targetClass.
The returned ConversionExecutor is thread-safe and may safely be cached for use in client code.
id - the id of the custom conversion executor (required)sourceClass - the source class to convert from (required)targetClass - the target class to convert to (required)
ConversionExecutorNotFoundException - when no suitable conversion executor could be foundjava.lang.Class<?> getClassForAlias(java.lang.String alias)
long for java.lang.Long
alias - the class alias
null if no alias existsorg.springframework.core.convert.ConversionService getDelegateConversionService()
|
Spring Web Flow | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||