org.castor.cpa.persistence.convertor
Class TypeConvertorRegistry
java.lang.Object
org.castor.cpa.persistence.convertor.TypeConvertorRegistry
public final class TypeConvertorRegistry
- extends Object
Registry of type convertors.
- Since:
- 1.1.3
- Version:
- $Revision: 7134 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Ralf Joachim
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeConvertorRegistry
public TypeConvertorRegistry(AbstractProperties properties)
- Create a new registry instance of type convertors. The registry will be initialized
with all type convertors specified through TYPE_CONVERTORS property of given
properties. The properties get also passed to the type converters for them to
get any required property.
- Parameters:
properties - The properties to use.
getConvertor
public TypeConvertor getConvertor(Class<?> fromType,
Class<?> toType,
String parameter)
throws MappingException
- Returns a type convertor initialized with parameter if specified. A type convertor
can be used to convert an object from Java type fromType to Java type
toType.
- Parameters:
fromType - The Java type to convert from.toType - The Java type to convert to.parameter - The parameter for the convertor (null if is not specified).
- Returns:
- The TypeConverter to convert fromType into toType.
- Throws:
MappingException - No suitable convertor was found.
Copyright © 2010. All Rights Reserved.