org.apache.myfaces.trinidadinternal.convert
Class ReverseDiscoveryGenericConverter
java.lang.Object
org.apache.myfaces.trinidadinternal.convert.ReverseDiscoveryGenericConverter
- All Implemented Interfaces:
- TypeConverter
- Direct Known Subclasses:
- ReflectionConverter
public abstract class ReverseDiscoveryGenericConverter
- extends java.lang.Object
- implements TypeConverter
This class is capable of converting
one Object into another.
Users of this class may discover source types supported by this TypeConverter
by specifying a target type. Regular GenericConverter allows discovery of supported
target types by specifying a source type
|
Method Summary |
abstract java.lang.Object |
convert(java.lang.Object source,
java.lang.Class<?> targetType)
converts the given Object into an instance of the
targetType. |
abstract java.util.List<java.lang.Class<?>> |
getSourceTypes(java.lang.Class<?> targetType)
Gets all the supported source types for the given targetType. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReverseDiscoveryGenericConverter
public ReverseDiscoveryGenericConverter()
convert
public abstract java.lang.Object convert(java.lang.Object source,
java.lang.Class<?> targetType)
- converts the given Object into an instance of the
targetType.
- Specified by:
convert in interface TypeConverter
- Returns:
- an instance of the targetType.
getSourceTypes
public abstract java.util.List<java.lang.Class<?>> getSourceTypes(java.lang.Class<?> targetType)
- Gets all the supported source types for the given targetType.
This converter must be able to convert each source type into the
targetType.
- Returns:
- Each item is of type
Class. An empty list must be
returned if the given targetType cannot be converted from anything.
Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.