|
|||||||||
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.mapping.handlers.EnumFieldHandler
A specialized FieldHandler for the type-safe enum style classes. Adapted from org.exolab.castor.xml.handlers.EnumFieldHandler which is used for the generated source code.
Nested Class Summary |
Nested classes inherited from class org.exolab.castor.mapping.GeneralizedFieldHandler |
|
Constructor Summary | |
EnumFieldHandler(java.lang.Class enumType,
FieldHandler handler,
java.lang.reflect.Method createMethod)
Creates a new EnumFieldHandler with the given type and FieldHandler |
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. |
boolean |
equals(java.lang.Object obj)
Returns true if the given object is an XMLFieldHandler that is equivalent to the delegated handler. |
java.lang.Class |
getFieldType()
Returns the class type for the field that this GeneralizedFieldHandler converts to and from. |
java.lang.Object |
newInstance(java.lang.Object parent)
Creates a new instance of the object described by this field. |
java.lang.Object |
newInstance(java.lang.Object parent,
java.lang.Object[] args)
Creates a new instance of the object described by this field. |
Methods inherited from class org.exolab.castor.mapping.GeneralizedFieldHandler |
getValue, 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EnumFieldHandler(java.lang.Class enumType, FieldHandler handler, java.lang.reflect.Method createMethod)
enumType
- the Class type of the described fieldhandler
- the FieldHandler to delegate toMethod 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) throws java.lang.IllegalStateException
GeneralizedFieldHandler
convertUponSet
in class GeneralizedFieldHandler
value
- the object value to convert before performing a set
operation
java.lang.IllegalStateException
public java.lang.Class getFieldType()
GeneralizedFieldHandler
getFieldType
in class GeneralizedFieldHandler
public java.lang.Object newInstance(java.lang.Object parent) throws java.lang.IllegalStateException
GeneralizedFieldHandler
newInstance
in interface FieldHandler
newInstance
in class GeneralizedFieldHandler
parent
- The object for which the field is created
java.lang.IllegalStateException
- This field is a simple type and
cannot be instantiatedpublic java.lang.Object newInstance(java.lang.Object parent, java.lang.Object[] args) throws java.lang.IllegalStateException
GeneralizedFieldHandler
newInstance
in class GeneralizedFieldHandler
parent
- The object for which the field is createdargs
- the set of constructor arguments
java.lang.IllegalStateException
- This field is a simple type and
cannot be instantiatedpublic boolean equals(java.lang.Object obj)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |