Joda System API

org.joda.property.impl
Class PropertyTypeConvertorManager

java.lang.Object
  |
  +--org.joda.property.impl.PropertyTypeConvertorManager

public class PropertyTypeConvertorManager
extends java.lang.Object

PropertyTypeConvertorManager is a wrapper around the TypeConvertor package adding Property functionality.

Author:
Stephen Colebourne

Method Summary
 java.lang.Object convertFromObject(java.lang.Class convertTo, java.lang.Object object, java.lang.Object errSource)
          Convert an object, typically passed in as a parameter, to the underlying type for this property.
 java.lang.String convertToString(java.lang.Class convertFrom, java.lang.Object object, java.lang.Object errSource)
          Convert an object, typically passed in as a parameter, to the underlying type for this property.
static PropertyTypeConvertorManager getInstance()
          Gets the TypeConvertorManager singleton instance.
 TypeConvertor getTypeConvertor(java.lang.Class convertorRequired)
          Get the type convertor for a particular class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PropertyTypeConvertorManager getInstance()
Gets the TypeConvertorManager singleton instance.

Returns:
the PropertyFactory to set as the default

getTypeConvertor

public TypeConvertor getTypeConvertor(java.lang.Class convertorRequired)
Get the type convertor for a particular class.

Parameters:
convertorRequired - the class to convert to
Returns:
the type convertor, null if not found

convertFromObject

public java.lang.Object convertFromObject(java.lang.Class convertTo,
                                          java.lang.Object object,
                                          java.lang.Object errSource)
Convert an object, typically passed in as a parameter, to the underlying type for this property.

Parameters:
convertTo - the class to convert to
object - input object
Returns:
the converted object
Throws:
ConversionPropertyException - if the conversion fails

convertToString

public java.lang.String convertToString(java.lang.Class convertFrom,
                                        java.lang.Object object,
                                        java.lang.Object errSource)
Convert an object, typically passed in as a parameter, to the underlying type for this property.

Parameters:
object - input object
Returns:
the converted object
Throws:
ConversionPropertyException - if the conversion fails

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.