|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.mapping.loader.FieldHandlerFriend
org.exolab.castor.mapping.ExtendedFieldHandler
org.exolab.castor.mapping.AbstractFieldHandler
org.exolab.castor.mapping.GeneralizedFieldHandler
org.exolab.castor.xml.handlers.ToStringFieldHandler
public class ToStringFieldHandler
An implementation of GeneralizedFieldHandler that simply calls Object#toString() in the conversion methods
Constructor Summary | |
---|---|
ToStringFieldHandler(java.lang.Class type)
Creates a new ToStringFieldHandler |
|
ToStringFieldHandler(java.lang.Class type,
FieldHandler handler)
Creates a new ToStringFieldHandler |
Method Summary | |
---|---|
java.lang.Object |
convertUponGet(java.lang.Object value)
This method is used to convert the value when the getValue method is called. |
java.lang.Object |
convertUponSet(java.lang.Object value)
This method is used to convert the value when the setValue method is called. |
java.lang.Class |
getFieldType()
Returns the class type for the field that this GeneralizedFieldHandler converts to and from. |
Methods inherited from class org.exolab.castor.mapping.GeneralizedFieldHandler |
---|
getValue, newInstance, newInstance, resetValue, setCollectionIteration, setFieldHandler, setValue |
Methods inherited from class org.exolab.castor.mapping.AbstractFieldHandler |
---|
getFieldDescriptor, hasValue, setFieldDescriptor |
Methods inherited from class org.exolab.castor.mapping.ExtendedFieldHandler |
---|
checkValidity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToStringFieldHandler(java.lang.Class type) throws MappingException
type
- the class type to create the FieldHandler for
MappingException
public ToStringFieldHandler(java.lang.Class type, FieldHandler handler) throws MappingException
type
- the class type to create the FieldHandler forhandler
- the FieldHandler to wrap
MappingException
Method Detail |
---|
public java.lang.Object convertUponGet(java.lang.Object value)
GeneralizedFieldHandler
convertUponGet
in class GeneralizedFieldHandler
value
- the object value to convert after performing a get
operation
public java.lang.Object convertUponSet(java.lang.Object value)
GeneralizedFieldHandler
convertUponSet
in class GeneralizedFieldHandler
value
- the object value to convert before performing a set
operation
public java.lang.Class getFieldType()
GeneralizedFieldHandler
getFieldType
in class GeneralizedFieldHandler
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |