org.jboss.xb.builder.runtime
Class EnumValueAdapter

java.lang.Object
  extended by org.jboss.xb.builder.runtime.EnumValueAdapter
All Implemented Interfaces:
ValueAdapter

public class EnumValueAdapter
extends Object
implements ValueAdapter

EnumValueAdapter.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Field Summary
 
Fields inherited from interface org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter
NOOP
 
Constructor Summary
EnumValueAdapter(QName qName, org.jboss.reflect.spi.EnumInfo enumInfo, org.jboss.reflect.spi.TypeInfo enumType)
          Create a new EnumValueAdapter.
 
Method Summary
 Object cast(Object o, Class c)
          An implementation should make sure that an object past in as the first parameter can be set as a value of a field that is of a type passed in as the second parameter
 Map<Object,Object> getMapping()
          Get the mapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumValueAdapter

public EnumValueAdapter(QName qName,
                        org.jboss.reflect.spi.EnumInfo enumInfo,
                        org.jboss.reflect.spi.TypeInfo enumType)
Create a new EnumValueAdapter.

Parameters:
qName - the qName
enumInfo - the enumeration
enumType - the enumType
Throws:
IllegalArgumentException - for a null enumInfo or enumType
Method Detail

getMapping

public Map<Object,Object> getMapping()
Get the mapping

Returns:
the mapping

cast

public Object cast(Object o,
                   Class c)
Description copied from interface: ValueAdapter
An implementation should make sure that an object past in as the first parameter can be set as a value of a field that is of a type passed in as the second parameter

Specified by:
cast in interface ValueAdapter
Returns:


Copyright © 2007 JBoss Inc.. All Rights Reserved.