Public Member Functions | |
XMLFieldHandler () | |
boolean | equals (Object obj) |
Object | getValue (Object object) throws IllegalStateException |
Object | newInstance (Object parent) throws IllegalStateException |
Object | newInstance (Object parent, Object[] args) throws IllegalStateException |
void | setValue (Object object, Object value) throws IllegalStateException, IllegalArgumentException |
void | resetValue (Object object) throws IllegalStateException, IllegalArgumentException |
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.
org.exolab.castor.xml.XMLFieldHandler.XMLFieldHandler | ( | ) |
Creates a new default XMLFieldHandler
boolean org.exolab.castor.xml.XMLFieldHandler.equals | ( | Object | obj | ) |
Returns true if the given object is an XMLFieldHandler that is equivalent to this one. An equivalent XMLFieldHandler is an XMLFieldHandler that is an instances of the same class. This method can be overwritten to provide more advanced equivalence tests.
Reimplemented in org.exolab.castor.xml.handlers.CollectionFieldHandler, and org.exolab.castor.xml.handlers.DateFieldHandler.
Object org.exolab.castor.xml.XMLFieldHandler.getValue | ( | Object | object | ) | throws IllegalStateException [virtual] |
Returns the value of the field from the object.
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 |
Implements org.exolab.castor.mapping.AbstractFieldHandler.
Reimplemented in org.exolab.castor.types.CenturyDescriptor.CenturyFieldHandler, org.exolab.castor.types.DateDescriptor.DateFieldHandler, org.exolab.castor.types.DurationDescriptor.DurationFieldHandler, org.exolab.castor.types.GDayDescriptor.GDayFieldHandler, org.exolab.castor.types.GMonthDayDescriptor.GMonthDayFieldHandler, org.exolab.castor.types.GMonthDescriptor.GMonthFieldHandler, org.exolab.castor.types.GYearDescriptor.GYearFieldHandler, org.exolab.castor.types.GYearMonthDescriptor.GYearMonthFieldHandler, org.exolab.castor.types.MonthDescriptor.MonthFieldHandler, org.exolab.castor.types.RecurringDurationDescriptor.RecurringDurationFieldHandler, org.exolab.castor.types.TimeDescriptor.TimeFieldHandler, org.exolab.castor.types.TimeDurationDescriptor.TimeDurationFieldHandler, org.exolab.castor.types.TimePeriodDescriptor.TimePeriodFieldHandler, org.exolab.castor.types.YearDescriptor.YearFieldHandler, org.exolab.castor.xml.handlers.CollectionFieldHandler, and org.exolab.castor.xml.handlers.DateFieldHandler.
Object org.exolab.castor.xml.XMLFieldHandler.newInstance | ( | Object | parent, | |
Object[] | args | |||
) | throws IllegalStateException [virtual] |
Creates a new instance of the object described by this field.
parent | The object for which the field is created | |
args | the set of constructor arguments |
IllegalStateException | This field is a simple type and cannot be instantiated |
Implements org.exolab.castor.mapping.AbstractFieldHandler.
References org.exolab.castor.xml.XMLFieldHandler.newInstance().
Object org.exolab.castor.xml.XMLFieldHandler.newInstance | ( | Object | parent | ) | throws IllegalStateException [virtual] |
Creates a new instance of the object described by this field.
parent | The object for which the field is created |
IllegalStateException | This field is a simple type and cannot be instantiated |
Implements org.exolab.castor.mapping.AbstractFieldHandler.
Reimplemented in org.exolab.castor.types.CenturyDescriptor.CenturyFieldHandler, org.exolab.castor.types.DateDescriptor.DateFieldHandler, org.exolab.castor.types.DurationDescriptor.DurationFieldHandler, org.exolab.castor.types.GDayDescriptor.GDayFieldHandler, org.exolab.castor.types.GMonthDayDescriptor.GMonthDayFieldHandler, org.exolab.castor.types.GMonthDescriptor.GMonthFieldHandler, org.exolab.castor.types.GYearDescriptor.GYearFieldHandler, org.exolab.castor.types.GYearMonthDescriptor.GYearMonthFieldHandler, org.exolab.castor.types.MonthDescriptor.MonthFieldHandler, org.exolab.castor.types.RecurringDurationDescriptor.RecurringDurationFieldHandler, org.exolab.castor.types.TimeDescriptor.TimeFieldHandler, org.exolab.castor.types.TimeDurationDescriptor.TimeDurationFieldHandler, org.exolab.castor.types.TimePeriodDescriptor.TimePeriodFieldHandler, org.exolab.castor.types.YearDescriptor.YearFieldHandler, org.exolab.castor.xml.handlers.CollectionFieldHandler, and org.exolab.castor.xml.handlers.DateFieldHandler.
Referenced by org.exolab.castor.xml.XMLFieldHandler.newInstance().
void org.exolab.castor.xml.XMLFieldHandler.resetValue | ( | Object | object | ) | throws IllegalStateException, IllegalArgumentException [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.
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 |
Implements org.exolab.castor.mapping.AbstractFieldHandler.
Reimplemented in org.exolab.castor.types.CenturyDescriptor.CenturyFieldHandler, org.exolab.castor.types.DateDescriptor.DateFieldHandler, org.exolab.castor.types.DurationDescriptor.DurationFieldHandler, org.exolab.castor.types.GDayDescriptor.GDayFieldHandler, org.exolab.castor.types.GMonthDayDescriptor.GMonthDayFieldHandler, org.exolab.castor.types.GMonthDescriptor.GMonthFieldHandler, org.exolab.castor.types.GYearDescriptor.GYearFieldHandler, org.exolab.castor.types.GYearMonthDescriptor.GYearMonthFieldHandler, org.exolab.castor.types.MonthDescriptor.MonthFieldHandler, org.exolab.castor.types.RecurringDurationDescriptor.RecurringDurationFieldHandler, org.exolab.castor.types.TimeDescriptor.TimeFieldHandler, org.exolab.castor.types.TimeDurationDescriptor.TimeDurationFieldHandler, org.exolab.castor.types.TimePeriodDescriptor.TimePeriodFieldHandler, org.exolab.castor.types.YearDescriptor.YearFieldHandler, org.exolab.castor.xml.handlers.CollectionFieldHandler, and org.exolab.castor.xml.handlers.DateFieldHandler.
void org.exolab.castor.xml.XMLFieldHandler.setValue | ( | Object | object, | |
Object | value | |||
) | throws IllegalStateException, IllegalArgumentException [virtual] |
Sets the value of the field on the object.
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 |
Implements org.exolab.castor.mapping.AbstractFieldHandler.
Reimplemented in org.exolab.castor.types.CenturyDescriptor.CenturyFieldHandler, org.exolab.castor.types.DateDescriptor.DateFieldHandler, org.exolab.castor.types.DurationDescriptor.DurationFieldHandler, org.exolab.castor.types.GDayDescriptor.GDayFieldHandler, org.exolab.castor.types.GMonthDayDescriptor.GMonthDayFieldHandler, org.exolab.castor.types.GMonthDescriptor.GMonthFieldHandler, org.exolab.castor.types.GYearDescriptor.GYearFieldHandler, org.exolab.castor.types.GYearMonthDescriptor.GYearMonthFieldHandler, org.exolab.castor.types.MonthDescriptor.MonthFieldHandler, org.exolab.castor.types.RecurringDurationDescriptor.RecurringDurationFieldHandler, org.exolab.castor.types.TimeDescriptor.TimeFieldHandler, org.exolab.castor.types.TimeDurationDescriptor.TimeDurationFieldHandler, org.exolab.castor.types.TimePeriodDescriptor.TimePeriodFieldHandler, org.exolab.castor.types.YearDescriptor.YearFieldHandler, org.exolab.castor.xml.handlers.CollectionFieldHandler, and org.exolab.castor.xml.handlers.DateFieldHandler.