org.sonatype.gshell.util.converter
Class Converters

java.lang.Object
  extended by org.sonatype.gshell.util.converter.Converters

public class Converters
extends Object

Provides access to conversion.

Since:
2.0

Constructor Summary
Converters()
           
 
Method Summary
static Object getValue(String type, String value, ClassLoader classLoader)
           
static Object getValue(Type type, String value)
           
static boolean isConvertible(Class type)
           
static boolean isConvertible(String type, ClassLoader classLoader)
           
static boolean isRegisterWithVM()
          Are converters registered with the VM PropertyEditorManager.
static void registerConverter(Converter converter)
           
static void setRegisterWithVM(boolean registerWithVM)
          Sets if converters registered with the VM PropertyEditorManager.
static String toString(Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Converters

public Converters()
Method Detail

isRegisterWithVM

public static boolean isRegisterWithVM()
Are converters registered with the VM PropertyEditorManager. By default converters are not registered with the VM as this creates problems for IDE and Spring because they rely in their specific converters being registered to function properly.


setRegisterWithVM

public static void setRegisterWithVM(boolean registerWithVM)
Sets if converters registered with the VM PropertyEditorManager. If the new value is true, all currently registered converters are immediately registered with the VM.


registerConverter

public static void registerConverter(Converter converter)

isConvertible

public static boolean isConvertible(String type,
                                    ClassLoader classLoader)

isConvertible

public static boolean isConvertible(Class type)

toString

public static String toString(Object value)
                       throws ConversionException
Throws:
ConversionException

getValue

public static Object getValue(String type,
                              String value,
                              ClassLoader classLoader)
                       throws ConversionException
Throws:
ConversionException

getValue

public static Object getValue(Type type,
                              String value)
                       throws ConversionException
Throws:
ConversionException


Copyright © 2008-2011 Sonatype. All Rights Reserved.