|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.xml.handlers.EnumFieldHandler
public class EnumFieldHandler
A specialized FieldHandler for the XML Schema enumeration types.
| 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 target)
Sets the value of the field to a default value -- for enum, no action needed. |
void |
setValue(Object target,
Object value)
Sets the value of the field associated with this descriptor. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EnumFieldHandler(Class enumType,
FieldHandler handler)
enumType - the Class type of the described fieldhandler - the FieldHandler to delegate to| Method Detail |
|---|
public Object getValue(Object target)
throws IllegalStateException
getValue in interface FieldHandlertarget - the object to get the value from
IllegalStateException - The Java object has changed and is no
longer supported by this handler, or the handler is not
compatible with the Java object
public void setValue(Object target,
Object value)
throws IllegalStateException
setValue in interface FieldHandlertarget - the object in which to set the valuevalue - the value of the field
IllegalStateException - The Java object has changed and is no
longer supported by this handler, or the handler is not
compatible with the Java object.public void resetValue(Object target)
resetValue in interface FieldHandlertarget - The object.
public void checkValidity(Object object)
throws ValidityException,
IllegalStateException
checkValidity in interface FieldHandlerobject - The object
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
public Object newInstance(Object parent)
throws IllegalStateException
newInstance in interface FieldHandlerparent - The object for which the field is created
IllegalStateException - This field is a simple type and cannot be
instantiatedpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||