TypeConvertorManager should be used to utiliize
type convertors.
- Author:
- Stephen Colebourne
Method Summary |
java.lang.Object |
convertFromObject(java.lang.Object object,
java.lang.Object errSource)
Convert an object from one type to another. |
java.lang.String |
convertToString(java.lang.Object object,
java.lang.Object errSource)
Convert an object of this convertor's type to a string |
java.lang.Class |
getType()
Get the single type that this convertor converts. |
convertFromObject
public java.lang.Object convertFromObject(java.lang.Object object,
java.lang.Object errSource)
- Convert an object from one type to another. The original
object may be returned if it is of the correct type and is
fully immutable (final and no setters).
- Parameters:
object
- the object to converterrSource
- the source object used to attach errors to
- Returns:
- the converted object
convertToString
public java.lang.String convertToString(java.lang.Object object,
java.lang.Object errSource)
- Convert an object of this convertor's type to a string
- Parameters:
object
- the object to converterrSource
- the source object used to attach errors to
- Returns:
- the converted object
getType
public java.lang.Class getType()
- Get the single type that this convertor converts.
This may return null if the type is not available on the
current JDK version (for example Currency is only available from
JDK 1.4).
- Returns:
- the type of the converted object
Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.