org.jboss.reflect.plugins
Class ValueConvertor

java.lang.Object
  extended by org.jboss.reflect.plugins.ValueConvertor

public class ValueConvertor
extends Object

PropertyEditorHelper.

TODO JBMICROCONT-118 fix the introspection assumption

Version:
$Revision: 65585 $
Author:
Adrian Brock

Constructor Summary
ValueConvertor()
           
 
Method Summary
static Object convertValue(Class<? extends Object> clazz, Object value)
          Convert a value

static Object convertValue(Class<? extends Object> clazz, Object value, boolean replaceProperties)
          Convert a value
static Object convertValue(Class<? extends Object> clazz, Object value, boolean replaceProperties, boolean trim)
          Convert a value
static Object progressValue(Class<? extends Object> clazz, Object value)
          Progress a value

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueConvertor

public ValueConvertor()
Method Detail

convertValue

public static Object convertValue(Class<? extends Object> clazz,
                                  Object value)
                           throws Throwable
Convert a value

Parameters:
clazz - the class
value - the value
Returns:
the value or null if there is no editor
Throws:
Throwable - for any error

convertValue

public static Object convertValue(Class<? extends Object> clazz,
                                  Object value,
                                  boolean replaceProperties)
                           throws Throwable
Convert a value

Parameters:
clazz - the class
value - the value
replaceProperties - whether to replace system properties
Returns:
the value or null if there is no editor
Throws:
Throwable - for any error

convertValue

public static Object convertValue(Class<? extends Object> clazz,
                                  Object value,
                                  boolean replaceProperties,
                                  boolean trim)
                           throws Throwable
Convert a value

Parameters:
clazz - the class
value - the value
replaceProperties - whether to replace system properties
trim - whether to trim string value
Returns:
the value or null if there is no editor
Throws:
Throwable - for any error

progressValue

public static Object progressValue(Class<? extends Object> clazz,
                                   Object value)
                            throws Throwable
Progress a value

Parameters:
clazz - the class
value - the value
Returns:
the progressed value or null if unsupported
Throws:
Throwable - for any error


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.