List of all members.
Public Member Functions |
final void | checkValidity (Object object) throws ValidityException, IllegalStateException |
abstract Object | getValue (Object object) throws IllegalStateException |
abstract Object | newInstance (Object parent) throws IllegalStateException |
abstract void | resetValue (Object object) throws IllegalStateException, IllegalArgumentException |
abstract void | setValue (Object object, Object value) throws IllegalStateException, IllegalArgumentException |
Protected Member Functions |
abstract FieldDescriptor | getFieldDescriptor () |
abstract void | setFieldDescriptor (FieldDescriptor fieldDesc) |
Detailed Description
An extended version of the FieldHandler interface which is used for adding additional functionality while preserving backward compatability.
- Author:
- Keith Visco
- Version:
- Revision:
- 1.1.1.1
- Date:
- 2003/03/03 07:08:29
- See also:
- FieldDescriptor
-
FieldHandler
Member Function Documentation
final void org.exolab.castor.mapping.loader.ExtendedFieldHandler.checkValidity |
( |
Object |
object |
) |
throws ValidityException, IllegalStateException |
abstract FieldDescriptor org.exolab.castor.mapping.loader.ExtendedFieldHandler.getFieldDescriptor |
( |
|
) |
[protected, pure virtual] |
Returns the FieldDescriptor for the field that this handler is reponsibile for, or null if no FieldDescriptor has been set. This method is useful for implementations of the FieldHandler interface that wish to obtain information about the field in order to make the FieldHandler more generic and reusable, or simply for validation purposes.
- Returns:
- the FieldDescriptor, or null if none exists.
abstract Object org.exolab.castor.mapping.loader.ExtendedFieldHandler.getValue |
( |
Object |
object |
) |
throws IllegalStateException [pure virtual] |
Returns the value of the field from the object.
- Parameters:
-
- Returns:
- The value of the field
- 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.
abstract Object org.exolab.castor.mapping.loader.ExtendedFieldHandler.newInstance |
( |
Object |
parent |
) |
throws IllegalStateException [pure virtual] |
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.
abstract void org.exolab.castor.mapping.loader.ExtendedFieldHandler.resetValue |
( |
Object |
object |
) |
throws IllegalStateException, IllegalArgumentException [pure virtual] |
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.
abstract void org.exolab.castor.mapping.loader.ExtendedFieldHandler.setFieldDescriptor |
( |
FieldDescriptor |
fieldDesc |
) |
[protected, pure virtual] |
Sets the FieldDescriptor that this FieldHander is responsibile for. By setting the FieldDescriptor, it allows the implementation of the FieldHandler methods to obtain information about the field itself. This allows a particular implementation to become more generic and reusable.
- Parameters:
-
abstract void org.exolab.castor.mapping.loader.ExtendedFieldHandler.setValue |
( |
Object |
object, |
|
|
Object |
value | |
|
) |
| | throws IllegalStateException, IllegalArgumentException [pure virtual] |
Sets the value of the field on the object.
- Parameters:
-
| object | The object |
| value | The new value |
- 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 IllegalArgumentException The value passed is not of a supported type |
Implements org.exolab.castor.mapping.FieldHandler.
The documentation for this class was generated from the following file: