public class ValueOfFieldHandler extends GeneralizedFieldHandler
FieldDescriptor
,
FieldHandler
_properties
Constructor and Description |
---|
ValueOfFieldHandler(Class type)
Creates a new ValueOfFieldHandler.
|
Modifier and Type | Method and Description |
---|---|
Object |
convertUponGet(Object value)
This method is used to convert the value when the getValue method is
called.
|
Object |
convertUponSet(Object value)
This method is used to convert the value when the setValue method is
called.
|
Class |
getFieldType()
Returns the class type for the field that this GeneralizedFieldHandler
converts to and from.
|
Object |
newInstance(Object parent)
Creates a new instance of the object described by this field.
|
getValue, newInstance, resetValue, setCollectionIteration, setFieldHandler, setValue
getFieldDescriptor, hasValue, setConfiguration, setFieldDescriptor
checkValidity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkValidity
public ValueOfFieldHandler(Class type) throws MappingException
type
- the class type to create the FieldHandler forMappingException
- if the valueOf method cannot be foundpublic Object convertUponGet(Object value)
convertUponGet
in class GeneralizedFieldHandler
value
- the object value to convert after performing a get operationpublic Object convertUponSet(Object value)
convertUponSet
in class GeneralizedFieldHandler
value
- the object value to convert before performing a set
operationpublic Class getFieldType()
getFieldType
in class GeneralizedFieldHandler
public Object newInstance(Object parent) throws IllegalStateException
newInstance
in interface FieldHandler
newInstance
in class GeneralizedFieldHandler
parent
- The object for which the field is createdIllegalStateException
- This field is a simple type and cannot be
instantiatedCopyright © 2022. All rights reserved.