public class CollectionFieldHandler extends XMLFieldHandler
TODO : support all kind of XSList.
_properties| Constructor and Description |
|---|
CollectionFieldHandler(FieldHandler fieldHandler)
Creates a new CollectionFieldHandler using the given FieldHandler for delegation.
|
CollectionFieldHandler(FieldHandler fieldHandler,
TypeValidator validator)
Creates a new CollectionFieldHandler using the given FieldHandler for delegation and the given
type validator for validation.
|
| Modifier and Type | Method and Description |
|---|---|
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)
Gets the value of the field associated with this descriptor.
|
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.
|
void |
setValue(Object target,
Object value)
Sets the value of the field associated with this descriptor.
|
newInstancegetFieldDescriptor, hasValue, setConfiguration, setFieldDescriptorpublic CollectionFieldHandler(FieldHandler fieldHandler)
fieldHandler - the fieldHandler for delegation.public CollectionFieldHandler(FieldHandler fieldHandler, TypeValidator validator)
fieldHandler - the fieldHandler for delegation.validator - Type validator to use to validate an instance of this type.public void setValue(Object target, Object value) throws IllegalStateException
setValue in interface FieldHandlersetValue in class XMLFieldHandlertarget - the object in which to set the valuevalue - the value of the fieldIllegalStateException - if any value provided fails validation.public Object getValue(Object target) throws IllegalStateException
getValue in interface FieldHandlergetValue in class XMLFieldHandlertarget - the object from which to get the valueIllegalStateException - if any value provided fails validation.public void resetValue(Object target) throws IllegalStateException
resetValue in interface FieldHandlerresetValue in class XMLFieldHandlertarget - The object to resetIllegalStateException - if the Java object has changed and is no longer supported by this
handler or the handler is not compatible with the Java objectpublic void checkValidity(Object object) throws ValidityException, IllegalStateException
checkValidity in interface FieldHandlercheckValidity in class ExtendedFieldHandlerobject - The objectValidityException - The field is invalid, is required and null, or any other validity
violationIllegalStateException - The Java object has changed and is no longer supported by this
handler, or the handler is not compatiable with the Java objectpublic Object newInstance(Object parent) throws IllegalStateException
newInstance in interface FieldHandlernewInstance in class XMLFieldHandlerparent - The object for which the field is createdIllegalStateException - This field is a simple type and cannot be instantiatedpublic boolean equals(Object obj)
equals in class XMLFieldHandlerobj - The object to compare to this.Copyright © 2016. All rights reserved.