|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.jparam.conversion.ConverterRegistry
This registry maintains a list of all possible conversions that are currently supported by JParam, if new conversions are added than the list is updated accordingly
Method Summary | |
static void |
clearSingleton()
|
java.lang.Object |
convert(java.lang.Class targetType,
java.lang.Object sourceObject)
Convert the source object to the given target class, an exception is thrown either when there is no exception/exception is ambigous or when the conversion process itself failed |
ScalarConversionWeight |
getConversionWeight(java.lang.Class sourceType,
java.lang.Class targetType)
Return the weight of the conversion between the given source and target type |
static ConverterRegistry |
getInstance()
|
void |
registerConverter(IConverter c)
This method is used to register a new converter, it shouldn't be used externally, but is defined public to support special cases that might arise It will perform all needed changes to the registry that are introduced by the new converter |
void |
registerHelperClass(java.lang.Class helperClass)
Register all conversion methods in the given helper class, a method is considered a conversion if: |
Methods inherited from class java.lang.Object |
|
Method Detail |
public static ConverterRegistry getInstance()
public void registerHelperClass(java.lang.Class helperClass)
public
static
helperClass
- public void registerConverter(IConverter c)
c
- public java.lang.Object convert(java.lang.Class targetType, java.lang.Object sourceObject) throws JParamException
targetType
- sourceObject
- JParamException
- public static void clearSingleton()
public ScalarConversionWeight getConversionWeight(java.lang.Class sourceType, java.lang.Class targetType)
sourceType
- targetType
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |