ma.glasnost.orika.converter.builtin
Class BuiltinConverters
java.lang.Object
ma.glasnost.orika.converter.builtin.BuiltinConverters
public abstract class BuiltinConverters
- extends Object
BuiltinConverters is a utility class used to register common built-in converters.
- Author:
- mattdeboer
|
Method Summary |
static void |
register(ConverterFactory converterFactory)
Registers a common set of built-in converters which can handle many common conversion situations.
Specifically, this includes:
ConstructorConverter: converts from the source type to destination type if there is
a constructor available on the destination type which takes the source as a single argument. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BuiltinConverters
public BuiltinConverters()
register
public static void register(ConverterFactory converterFactory)
- Registers a common set of built-in converters which can handle many common conversion situations.
Specifically, this includes:
- ConstructorConverter: converts from the source type to destination type if there is
a constructor available on the destination type which takes the source as a single argument.
- FromStringConverter: able to convert from a String to enum, primitive, or primitive wrapper.
- ToStringconverter: able to convert any type to String
- DateAndTimeConverters: convert between common date/time representations
- java.util.Calendar
- java.util.Date
- long / java.lang.Long
- javax.xml.datatype.XMLGregorianCalendar
- java.sql.Date
- java.sql.Time
- java.sql.Timestamp
- PassThroughConverter registered for the following (additional) immutable types:
- java.net.URL
- java.net.URI
- java.util.UUID
- java.math.BigInteger
- java.util.Locale
- java.io.File
- java.net.Inet4Address
- java.net.Inet6Address
- java.net.InetSocketAddress
- CloneableConverter registered for the following cloneable types:
- java.util.Date
- java.util.Calendar
- javax.xml.datatype.XMLGregorianCalendar
- Parameters:
converterFactory - the converter factory on which to register the converters
Copyright © 2013 Glasnost. All Rights Reserved.