de.xabsl.jxabslx.conversions
Class Conversions

java.lang.Object
  extended by de.xabsl.jxabslx.conversions.Conversions

public class Conversions
extends java.lang.Object

Registers and provides conversions between native java data types and XABSL data types


Constructor Summary
Conversions()
           
 
Method Summary
static void addBoolean(BooleanConversion conversion)
          Add a boolean conversion.
static void addDecimal(DecimalConversion conversion)
          Add a decimal conversion.
static void addEnumerated(EnumeratedConversion conversion)
          Add an enumerated conversion.
static BooleanConversion getBooleanConversion(java.lang.Class<?> type)
          Looks up a conversion for a certain java type
static DecimalConversion getDecimalConversion(java.lang.Class<?> type)
          Looks up a conversion for a certain java type
static EnumeratedConversion getEnumeratedConversion(java.lang.Class<?> type)
          Looks up a conversion for a certain java type
static ClassUtils.XabslType javaTypeToXabslType(java.lang.Class type)
          For a given Java type, find a XABSL type (boolean, decimal, enumerated) so that a conversion exists between the two.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Conversions

public Conversions()
Method Detail

addBoolean

public static void addBoolean(BooleanConversion conversion)
Add a boolean conversion.


addDecimal

public static void addDecimal(DecimalConversion conversion)
Add a decimal conversion.


addEnumerated

public static void addEnumerated(EnumeratedConversion conversion)
Add an enumerated conversion.


getBooleanConversion

public static BooleanConversion getBooleanConversion(java.lang.Class<?> type)
Looks up a conversion for a certain java type

Parameters:
type - a java class
Throws:
EngineInitializationException - if no conversion exists for the type

getDecimalConversion

public static DecimalConversion getDecimalConversion(java.lang.Class<?> type)
Looks up a conversion for a certain java type

Parameters:
type - a java class
Throws:
EngineInitializationException - if no conversion exists for the type

getEnumeratedConversion

public static EnumeratedConversion getEnumeratedConversion(java.lang.Class<?> type)
Looks up a conversion for a certain java type

Parameters:
type - a java class
Throws:
EngineInitializationException - if no conversion exists for the type

javaTypeToXabslType

public static ClassUtils.XabslType javaTypeToXabslType(java.lang.Class type)
For a given Java type, find a XABSL type (boolean, decimal, enumerated) so that a conversion exists between the two. Subtypes take precendence over supertypes; bool takes precedence over decimal over enumerated.

Parameters:
type -
Returns: