org.exolab.castor.mapping.handlers

Class EnumFieldHandler

public class EnumFieldHandler extends GeneralizedFieldHandler

A specialized FieldHandler for the type-safe enum style classes. Adapted from org.exolab.castor.xml.handlers.EnumFieldHandler which is used for the generated source code.

Version: $Revision: 1.3 $ $Date: 2005/05/02 20:58:58 $

Author: Keith Visco

Constructor Summary
EnumFieldHandler(Class enumType, FieldHandler handler, Method createMethod)
Creates a new EnumFieldHandler with the given type and FieldHandler
Method Summary
ObjectconvertUponGet(Object value)
ObjectconvertUponSet(Object value)
booleanequals(Object obj)
Returns true if the given object is an XMLFieldHandler that is equivalent to the delegated handler.
ClassgetFieldType()
ObjectnewInstance(Object parent)
ObjectnewInstance(Object parent, Object[] args)

Constructor Detail

EnumFieldHandler

public EnumFieldHandler(Class enumType, FieldHandler handler, Method createMethod)
Creates a new EnumFieldHandler with the given type and FieldHandler

Parameters: enumType the Class type of the described field handler the FieldHandler to delegate to

Method Detail

convertUponGet

public Object convertUponGet(Object value)

convertUponSet

public Object convertUponSet(Object value)

equals

public boolean equals(Object obj)
Returns true if the given object is an XMLFieldHandler that is equivalent to the delegated handler. An equivalent XMLFieldHandler is an XMLFieldHandler that is an instances of the same class.

Returns: true if the given object is an XMLFieldHandler that is equivalent to this one.

getFieldType

public Class getFieldType()

newInstance

public Object newInstance(Object parent)

newInstance

public Object newInstance(Object parent, Object[] args)
Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com