|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.mapping.loader.FieldHandlerFriend<T>
org.exolab.castor.mapping.ExtendedFieldHandler<T>
org.exolab.castor.mapping.AbstractFieldHandler<T>
org.exolab.castor.xml.XMLFieldHandler<T>
public class XMLFieldHandler<T>
This FieldHandler is used in the generated descriptors.
A field handler knows how to perform various operations on the field that require access to the field value.
FieldDescriptor| Field Summary |
|---|
| Fields inherited from class org.exolab.castor.mapping.AbstractFieldHandler |
|---|
_properties |
| Constructor Summary | |
|---|---|
XMLFieldHandler()
Creates a new default XMLFieldHandler instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Returns true if the given object is an XMLFieldHandler that is equivalent to this one. |
T |
getValue(Object object)
Returns the value of the field from the object. |
T |
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. |
void |
resetValue(Object object)
Sets the value of the field to a default value. |
void |
setValue(Object object,
T value)
Sets the value of the field on the object. |
| 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 XMLFieldHandler()
| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Object
public T getValue(Object object)
throws IllegalStateException
object - The object
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 T newInstance(Object parent)
throws IllegalStateException
parent - The object for which the field is created
IllegalStateException - This field is a simple type and cannot be instantiated
public Object newInstance(Object parent,
Object[] args)
throws IllegalStateException
newInstance in class ExtendedFieldHandler<T>parent - The object for which the field is createdargs - the set of constructor arguments
IllegalStateException - This field is a simple type and cannot be instantiated
public void setValue(Object object,
T value)
throws IllegalStateException,
IllegalArgumentException
object - The object.value - The new value.
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.
public void resetValue(Object object)
throws IllegalStateException,
IllegalArgumentException
FieldHandlerReference fields are set to null, primitive fields are set to their default value, collection fields are emptied of all elements.
object - The object.
IllegalStateException - The Java object has changed and is no longer supported by this
handler, or the handler is not compatible with the Java object.
IllegalArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||