public class EnumFieldHandler extends GeneralizedFieldHandler
_properties
Constructor and Description |
---|
EnumFieldHandler(Class enumType,
FieldHandler handler,
Method createMethod)
Creates a new EnumFieldHandler with the given type and
FieldHandler
|
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.
|
boolean |
equals(Object obj)
Returns true if the given object is an XMLFieldHandler that
is equivalent to the delegated handler.
|
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.
|
Object |
newInstance(Object parent,
Object[] args)
Creates a new instance of the object described by this field.
|
getValue, resetValue, setCollectionIteration, setFieldHandler, setValue
getFieldDescriptor, hasValue, setConfiguration, setFieldDescriptor
checkValidity
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkValidity
public EnumFieldHandler(Class enumType, FieldHandler handler, Method createMethod)
enumType
- the Class type of the described fieldhandler
- the FieldHandler to delegate topublic Object convertUponGet(Object value)
GeneralizedFieldHandler
convertUponGet
in class GeneralizedFieldHandler
value
- the object value to convert after performing a get
operationGeneralizedFieldHandler.convertUponGet(java.lang.Object)
public Object convertUponSet(Object value) throws IllegalStateException
GeneralizedFieldHandler
convertUponSet
in class GeneralizedFieldHandler
value
- the object value to convert before performing a set
operationIllegalStateException
GeneralizedFieldHandler.convertUponSet(java.lang.Object)
public Class getFieldType()
GeneralizedFieldHandler
getFieldType
in class GeneralizedFieldHandler
GeneralizedFieldHandler.getFieldType()
public Object newInstance(Object parent) throws IllegalStateException
GeneralizedFieldHandler
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 instantiatedFieldHandler.newInstance(java.lang.Object)
public Object newInstance(Object parent, Object[] args) throws IllegalStateException
GeneralizedFieldHandler
newInstance
in class GeneralizedFieldHandler
parent
- The object for which the field is createdargs
- the set of constructor argumentsIllegalStateException
- This field is a simple type and
cannot be instantiatedExtendedFieldHandler.newInstance(java.lang.Object,
java.lang.Object[])
public boolean equals(Object obj)
Copyright © 2018. All rights reserved.