|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidadinternal.convert.GenericConverterFactory
public class GenericConverterFactory
A factory of GenericConverters. GenericConverters may be registered with this factory. The factory supports converting between the types supported by each individual converter. The factory also supports converting between types supported by combining individual converters.
Method Summary | |
---|---|
java.lang.Object |
convert(java.lang.Object source,
java.lang.Class<?> targetType)
converts the given source instance into an object of the targetType. |
GenericConverter |
getConverter(java.lang.Class<?> sourceType,
java.lang.Class<?> targetType)
Gets a converter that is capable of converting from the given sourceType to the given targetType. |
static GenericConverterFactory |
getCurrentInstance()
|
boolean |
isConvertible(java.lang.Object source,
java.lang.Class<?> targetType)
Checks to see if it is possible to convert the given instance into the specified targetType |
void |
registerConverter(GenericConverter converter)
Registers a converter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public GenericConverter getConverter(java.lang.Class<?> sourceType, java.lang.Class<?> targetType)
The returned converter (or lack thereof) is cached so that subsequent requests for the same source and target types will be fast.
public void registerConverter(GenericConverter converter)
public java.lang.Object convert(java.lang.Object source, java.lang.Class<?> targetType)
source
- the object to converttargetType
- the required type.
public boolean isConvertible(java.lang.Object source, java.lang.Class<?> targetType)
public static GenericConverterFactory getCurrentInstance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |