|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConversionFactory
Defines a factory for Conversion objects that will create a conversion on demand or return a singleton.
Method Summary | |
---|---|
Conversion |
getInstance(Object value,
Class fromType,
Class toType)
Create a conversion object for the conversion. |
int |
getMatchPercent(Object value,
Class fromType,
Class toType)
Checks if this factory supports the required conversion returning a percentage match. |
Method Detail |
---|
int getMatchPercent(Object value, Class fromType, Class toType)
The returned int
represents the percentage by which this
factory matches the required conversion. The percentage (ie 0-100) is used
to determine which conversion factory to use when a conflict arises.
value
- the value to be converted, read only, may be nullfromType
- the type to convert from, may be nulltoType
- the type to convert to, may be null
Conversion getInstance(Object value, Class fromType, Class toType)
The returned conversion must not store the value. The conversion object will be used repeatedly for all future conversions between these two types without further reference to the factory.
value
- the value to be converted, read only, may be nullfromType
- the type to convert from, may be nulltoType
- the type to convert to, may be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |