public abstract class ExtendedFieldHandler extends Object implements FieldHandler
FieldDescriptor
,
FieldHandler
Constructor and Description |
---|
ExtendedFieldHandler() |
Modifier and Type | Method and Description |
---|---|
void |
checkValidity(Object object)
Deprecated.
No longer supported
|
protected abstract FieldDescriptor |
getFieldDescriptor()
Returns the FieldDescriptor for the field that this
handler is reponsibile 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.
|
protected 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()
protected abstract void setFieldDescriptor(FieldDescriptor fieldDesc)
fieldDesc
- the FieldDescriptor to setpublic final void checkValidity(Object object) throws ValidityException, IllegalStateException
checkValidity
in interface FieldHandler
ValidityException
IllegalStateException
public abstract Object getValue(Object object) throws IllegalStateException
getValue
in interface FieldHandler
object
- 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 FieldHandler
parent
- 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 FieldHandler
object
- The objectIllegalStateException
- The Java object has changed and
is no longer supported by this handler, or the handler is not
compatiable with the Java objectIllegalArgumentException
public abstract void setValue(Object object, Object value) throws IllegalStateException, IllegalArgumentException
setValue
in interface FieldHandler
object
- 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 © 2013. All rights reserved.