de.xabsl.jxabslx.conversions.impl
Class EnumeratedToEnumConversion

java.lang.Object
  extended by de.xabsl.jxabslx.conversions.impl.EnumeratedToEnumConversion
All Implemented Interfaces:
EnumeratedConversion

public class EnumeratedToEnumConversion
extends java.lang.Object
implements EnumeratedConversion

Conversion between XABSL enumerated and java enum


Constructor Summary
EnumeratedToEnumConversion()
           
 
Method Summary
 java.lang.Object from(java.lang.Object value)
          Convert an object to an enumerated value
 java.lang.String getEnumerationName(java.lang.Class<?> type)
          Returns the enumeration's name from a certain type.
 java.lang.Object to(java.lang.Object value)
          Convert an enumerated value to an Object
 java.lang.Class<?> type()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumeratedToEnumConversion

public EnumeratedToEnumConversion()
Method Detail

from

public java.lang.Object from(java.lang.Object value)
Description copied from interface: EnumeratedConversion
Convert an object to an enumerated value

Specified by:
from in interface EnumeratedConversion
Parameters:
value - Must be of the type returned by type()
Returns:
The converted value

to

public java.lang.Object to(java.lang.Object value)
Description copied from interface: EnumeratedConversion
Convert an enumerated value to an Object

Specified by:
to in interface EnumeratedConversion
Parameters:
value - Any enumerated value
Returns:
The converted value. The object must be of the type returned by type()

type

public java.lang.Class<?> type()
Specified by:
type in interface EnumeratedConversion
Returns:
The type that this converter handles.

getEnumerationName

public java.lang.String getEnumerationName(java.lang.Class<?> type)
Description copied from interface: EnumeratedConversion
Returns the enumeration's name from a certain type. If this is not possible, the enumeration must be registered manually.

Specified by:
getEnumerationName in interface EnumeratedConversion
Returns: