|
||||||||||
| 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
public class 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.
| Field Summary |
|---|
| Fields inherited from class org.exolab.castor.mapping.AbstractFieldHandler |
|---|
_properties |
| Constructor Summary | |
|---|---|
EnumFieldHandler(Class enumType,
FieldHandler handler,
Method createMethod)
Creates a new EnumFieldHandler with the given type and FieldHandler |
|
| Method Summary | |
|---|---|
Object |
convertUponGet(Object value)
This method is used to convert the value when the getValue method is called. |
Object |
convertUponSet(Object value)
This method is used to convert the value when the setValue method is called. |
boolean |
equals(Object obj)
Returns true if the given object is an XMLFieldHandler that is equivalent to the delegated handler. |
Class |
getFieldType()
Returns the class type for the field that this GeneralizedFieldHandler converts to and from. |
Object |
newInstance(Object parent)
Creates a new instance of the object described by this field. |
Object |
newInstance(Object parent,
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, setConfiguration, 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 |
| Methods inherited from interface org.exolab.castor.mapping.FieldHandler |
|---|
checkValidity |
| Constructor Detail |
|---|
public EnumFieldHandler(Class enumType,
FieldHandler handler,
Method createMethod)
enumType - the Class type of the described fieldhandler - the FieldHandler to delegate to| Method Detail |
|---|
public Object convertUponGet(Object value)
GeneralizedFieldHandler
convertUponGet in class GeneralizedFieldHandlervalue - the object value to convert after performing a get
operation
GeneralizedFieldHandler.convertUponGet(java.lang.Object)
public Object convertUponSet(Object value)
throws IllegalStateException
GeneralizedFieldHandler
convertUponSet in class GeneralizedFieldHandlervalue - the object value to convert before performing a set
operation
IllegalStateExceptionGeneralizedFieldHandler.convertUponSet(java.lang.Object)public Class getFieldType()
GeneralizedFieldHandler
getFieldType in class GeneralizedFieldHandlerGeneralizedFieldHandler.getFieldType()
public Object newInstance(Object parent)
throws IllegalStateException
GeneralizedFieldHandler
newInstance in interface FieldHandlernewInstance in class GeneralizedFieldHandlerparent - The object for which the field is created
IllegalStateException - This field is a simple type and
cannot be instantiatedFieldHandler.newInstance(java.lang.Object)
public Object newInstance(Object parent,
Object[] args)
throws IllegalStateException
GeneralizedFieldHandler
newInstance in class GeneralizedFieldHandlerparent - The object for which the field is createdargs - the set of constructor arguments
IllegalStateException - This field is a simple type and
cannot be instantiatedExtendedFieldHandler.newInstance(java.lang.Object,
java.lang.Object[])public boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||