org.databene.commons.converter
Class MessageConverter
java.lang.Object
org.databene.commons.converter.AbstractConverter<S,T>
org.databene.commons.converter.ThreadSafeConverter<java.lang.Object,java.lang.String>
org.databene.commons.converter.MessageConverter
- All Implemented Interfaces:
- java.lang.Cloneable, Converter<java.lang.Object,java.lang.String>, ThreadAware
public class MessageConverter
- extends ThreadSafeConverter<java.lang.Object,java.lang.String>
Renders a single object or an array of objects into a String, similar to the java.text.MessageFormat.
Created: 12.11.2007 20:46:31
- Author:
- Volker Bergmann
|
Method Summary |
java.lang.String |
convert(java.lang.Object sourceValue)
Concerts an object of type S to an object of type T |
void |
setLocale(java.util.Locale locale)
|
void |
setPattern(java.lang.String pattern)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageConverter
public MessageConverter()
MessageConverter
public MessageConverter(java.lang.String pattern,
java.util.Locale locale)
setPattern
public void setPattern(java.lang.String pattern)
setLocale
public void setLocale(java.util.Locale locale)
convert
public java.lang.String convert(java.lang.Object sourceValue)
throws ConversionException
- Description copied from interface:
Converter
- Concerts an object of type S to an object of type T
- Parameters:
sourceValue - the object to convert
- Returns:
- the converted object
- Throws:
ConversionException - if the conversion fails
Copyright © 2010. All Rights Reserved.