org.pentaho.reporting.engine.classic.core.util.beans
Class ConverterRegistry

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.util.beans.ConverterRegistry

public final class ConverterRegistry
extends Object


Method Summary
static Object convert(Object o, Class c, Object defaultValue)
           
static ConverterRegistry getInstance()
           
 ValueConverter getValueConverter(Class c)
           
static String toAttributeValue(Object o)
          Converts an object to an attribute value.
static Object toPropertyValue(String s, Class c)
          Converts a string to a property value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ConverterRegistry getInstance()

getValueConverter

public ValueConverter getValueConverter(Class c)

toAttributeValue

public static String toAttributeValue(Object o)
                               throws BeanException
Converts an object to an attribute value.

Parameters:
o - the object.
Returns:
the attribute value.
Throws:
BeanException - if there was an error during the conversion.

toPropertyValue

public static Object toPropertyValue(String s,
                                     Class c)
                              throws BeanException
Converts a string to a property value.

Parameters:
s - the string.
Returns:
a property value.
Throws:
BeanException - if there was an error during the conversion.

convert

public static Object convert(Object o,
                             Class c,
                             Object defaultValue)