public abstract class FieldHandlerFriend extends Object implements FieldHandler
FieldDescriptor,
FieldHandler| Constructor and Description |
|---|
FieldHandlerFriend() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
checkValidity(Object object)
Deprecated.
No longer supported
|
protected abstract FieldDescriptor |
getFieldDescriptor()
Returns the FieldDescriptor for the field that this
handler is responsible for, or null if no FieldDescriptor
has been set.
|
abstract Object |
getValue(Object object)
Returns the value of the field from the object.
|
abstract Object |
newInstance(Object parent)
Creates a new instance of the object described by this field.
|
abstract void |
resetValue(Object object)
Sets the value of the field to a default value.
|
abstract void |
setFieldDescriptor(FieldDescriptor fieldDesc)
Sets the FieldDescriptor that this FieldHander is
responsibile for.
|
abstract void |
setValue(Object object,
Object value)
Sets the value of the field on the object.
|
protected abstract FieldDescriptor getFieldDescriptor()
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.FieldDescriptor, or null if none exists.public abstract void setFieldDescriptor(FieldDescriptor fieldDesc)
fieldDesc - the FieldDescriptor to setpublic abstract void checkValidity(Object object) throws ValidityException, IllegalStateException
checkValidity in interface FieldHandlerValidityExceptionIllegalStateExceptionpublic abstract Object getValue(Object object) throws IllegalStateException
getValue in interface FieldHandlerobject - The objectIllegalStateException - The Java object has changed and
is no longer supported by this handler, or the handler is not
compatiable with the Java objectpublic abstract Object newInstance(Object parent) throws IllegalStateException
newInstance in interface FieldHandlerparent - The object for which the field is createdIllegalStateException - This field is a simple type and
cannot be instantiatedpublic abstract void resetValue(Object object) throws IllegalStateException, IllegalArgumentException
Reference fields are set to null, primitive fields are set to their default value, collection fields are emptied of all elements.
resetValue in interface FieldHandlerobject - The objectIllegalStateException - The Java object has changed and
is no longer supported by this handler, or the handler is not
compatiable with the Java objectIllegalArgumentExceptionpublic abstract void setValue(Object object, Object value) throws IllegalStateException, IllegalArgumentException
setValue in interface FieldHandlerobject - The objectvalue - The new valueIllegalStateException - The Java object has changed and
is no longer supported by this handler, or the handler is not
compatiable with the Java objectIllegalArgumentException - The value passed is not of
a supported typeCopyright © 2014. All rights reserved.