|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.binding.convert.converters.StringToObject
org.springframework.binding.convert.converters.StringToDate
public class StringToDate
A formatter for Date
types. Allows the configuration of an explicit date pattern and locale.
SimpleDateFormat
Constructor Summary | |
---|---|
StringToDate()
|
Method Summary | |
---|---|
Locale |
getLocale()
The locale to use in formatting date values. |
String |
getPattern()
The pattern to use to format date values. |
void |
setLocale(Locale locale)
Sets the locale to use in formatting date values. |
void |
setPattern(String pattern)
Sets the pattern to use to format date values. |
Object |
toObject(String string,
Class targetClass)
|
String |
toString(Object target)
|
Methods inherited from class org.springframework.binding.convert.converters.StringToObject |
---|
convertSourceToTargetClass, convertTargetToSourceClass, getSourceClass, getTargetClass |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringToDate()
Method Detail |
---|
public String getPattern()
public void setPattern(String pattern)
pattern
- the date formatting patternpublic Locale getLocale()
LocaleContextHolder.getLocale()
public void setLocale(Locale locale)
locale
- the localepublic Object toObject(String string, Class targetClass) throws Exception
Exception
public String toString(Object target) throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |