org.exolab.castor.xml.handlers
public class EnumFieldHandler extends Object implements FieldHandler
Version: $Revision: 6238 $ $Date: 2006-04-13 06:47:36 -0600 (Thu, 13 Apr 2006) $
Constructor Summary | |
---|---|
EnumFieldHandler(Class enumType, FieldHandler handler)
Creates a new EnumFieldHandler with the given type and
FieldHandler |
Method Summary | |
---|---|
void | checkValidity(Object object)
Checks the field validity. |
boolean | equals(Object obj)
Returns true if the given object is an XMLFieldHandler that
is equivalent to the delegated handler. |
Object | getValue(Object target)
Returns the value of the field associated with this
descriptor from the given target object. |
Object | newInstance(Object parent)
Creates a new instance of the object described by this field.
|
void | resetValue(Object targer) |
void | setValue(Object target, Object value)
Sets the value of the field associated with this descriptor. |
Parameters: enumType the Class type of the described field handler the FieldHandler to delegate to
Parameters: object The object
Throws: ValidityException The field is invalid, is required and null, or any other validity violation IllegalStateException The Java object has changed and is no longer supported by this handler, or the handler is not compatiable with the Java object
Returns: true if the given object is an XMLFieldHandler that is equivalent to this one.
Parameters: target the object to get the value from
Returns: the value of the field associated with this descriptor from the given target object.
Parameters: parent The object for which the field is created
Returns: A new instance of the field's value
Throws: IllegalStateException This field is a simple type and cannot be instantiated
Parameters: target the object in which to set the value value the value of the field