List of all members.
Public Member Functions |
| EnumFieldHandler (Class enumType, FieldHandler handler) |
Object | getValue (Object target) throws java.lang.IllegalStateException |
void | setValue (Object target, Object value) throws java.lang.IllegalStateException |
void | resetValue (Object targer) |
void | checkValidity (Object object) throws ValidityException, IllegalStateException |
Object | newInstance (Object parent) throws IllegalStateException |
boolean | equals (Object obj) |
Detailed Description
A specialized MarshalDescriptor for the XML Schema enumeration types
- Author:
- Keith Visco
- Version:
- Revision:
- 1.2
- Date:
- 2003/11/10 07:38:31
Constructor & Destructor Documentation
org.exolab.castor.xml.handlers.EnumFieldHandler.EnumFieldHandler |
( |
Class |
enumType, |
|
|
FieldHandler |
handler | |
|
) |
| | |
Creates a new EnumFieldHandler with the given type and FieldHandler
- Parameters:
-
| type | the Class type of the described field |
| handler | the FieldHandler to delegate to |
Member Function Documentation
void org.exolab.castor.xml.handlers.EnumFieldHandler.checkValidity |
( |
Object |
object |
) |
throws ValidityException, IllegalStateException |
Checks the field validity. Returns successfully if the field can be stored, is valid, etc, throws an exception otherwise.
- Parameters:
-
- Exceptions:
-
| 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 |
Implements org.exolab.castor.mapping.FieldHandler.
boolean org.exolab.castor.xml.handlers.EnumFieldHandler.equals |
( |
Object |
obj |
) |
|
Object org.exolab.castor.xml.handlers.EnumFieldHandler.getValue |
( |
Object |
target |
) |
throws java.lang.IllegalStateException |
Object org.exolab.castor.xml.handlers.EnumFieldHandler.newInstance |
( |
Object |
parent |
) |
throws IllegalStateException |
Creates a new instance of the object described by this field.
- Parameters:
-
| parent | The object for which the field is created |
- Returns:
- A new instance of the field's value
- Exceptions:
-
| IllegalStateException | This field is a simple type and cannot be instantiated |
Implements org.exolab.castor.mapping.FieldHandler.
void org.exolab.castor.xml.handlers.EnumFieldHandler.resetValue |
( |
Object |
object |
) |
|
Sets the value of the field to a default value.
Reference fields are set to null, primitive fields are set to their default value, collection fields are emptied of all elements.
- Parameters:
-
- Exceptions:
-
| IllegalStateException | The Java object has changed and is no longer supported by this handler, or the handler is not compatiable with the Java object |
Implements org.exolab.castor.mapping.FieldHandler.
void org.exolab.castor.xml.handlers.EnumFieldHandler.setValue |
( |
Object |
target, |
|
|
Object |
value | |
|
) |
| | throws java.lang.IllegalStateException |
The documentation for this class was generated from the following file: