|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.binding.convert.support.AbstractConverter
org.springframework.binding.convert.support.ConversionServiceAwareConverter
public abstract class ConversionServiceAwareConverter
Base class for converters that use other converters to convert things, thus they are conversion-service aware.
| Constructor Summary | |
|---|---|
protected |
ConversionServiceAwareConverter()
Default constructor, expectes to conversion service to be injected using setConversionService(ConversionService). |
protected |
ConversionServiceAwareConverter(ConversionService conversionService)
Create a converter using given conversion service. |
| Method Summary | |
|---|---|
protected ConversionExecutor |
converterFor(java.lang.Class sourceClass,
java.lang.Class targetClass)
Returns a conversion executor capable of converting objects from one class to another. |
protected ConversionExecutor |
fromStringTo(java.lang.Class targetClass)
Returns a conversion executor capable of converting string objects to the specified target class. |
protected ConversionExecutor |
fromStringToAliased(java.lang.String targetAlias)
Returns a conversion executor capable of converting string objects to the target class aliased by the provided alias. |
ConversionService |
getConversionService()
Returns the conversion service used. |
protected Expression |
parseExpression(java.lang.String expressionString)
Helper that parsers the given expression string into an expression, using the installed String->Expression converter. |
void |
setConversionService(ConversionService conversionService)
Set the conversion service this object should be made aware of (as it presumably depends on it). |
| Methods inherited from class org.springframework.binding.convert.support.AbstractConverter |
|---|
convert, convert, convert, convert, doConvert |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.binding.convert.Converter |
|---|
getSourceClasses, getTargetClasses |
| Constructor Detail |
|---|
protected ConversionServiceAwareConverter()
setConversionService(ConversionService).
protected ConversionServiceAwareConverter(ConversionService conversionService)
| Method Detail |
|---|
public ConversionService getConversionService()
public void setConversionService(ConversionService conversionService)
ConversionServiceAware
setConversionService in interface ConversionServiceAwareconversionService - the conversion serviceprotected ConversionExecutor fromStringTo(java.lang.Class targetClass)
targetClass - the target class
protected ConversionExecutor fromStringToAliased(java.lang.String targetAlias)
targetAlias - the target class alias, e.g "long" or "float"
null if no suitable converter exists for alias
protected ConversionExecutor converterFor(java.lang.Class sourceClass,
java.lang.Class targetClass)
sourceClass - the source class to convert fromtargetClass - the target class to convert to
protected Expression parseExpression(java.lang.String expressionString)
expressionString - the expression string to parse
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||