public interface FieldHandler
FieldDescriptor
Modifier and Type | Method and Description |
---|---|
void |
checkValidity(Object object)
Deprecated.
No longer supported
|
Object |
getValue(Object object)
Returns the value of the field from the object.
|
Object |
newInstance(Object parent)
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,
Object value)
Sets the value of the field on the object.
|
Object getValue(Object object) throws IllegalStateException
object
- The objectIllegalStateException
- The Java object has changed and
is no longer supported by this handler, or the handler is not
compatible with the Java objectvoid setValue(Object object, Object 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 compatible with the
Java object.IllegalArgumentException
- The value passed is not of a supported type.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.
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
void checkValidity(Object object) throws ValidityException, IllegalStateException
Object newInstance(Object parent) throws IllegalStateException
parent
- The object for which the field is createdIllegalStateException
- This field is a simple type and
cannot be instantiatedCopyright © 2016. All rights reserved.