org.apache.myfaces.trinidadinternal.convert
Class ReflectionConverter

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.convert.ReverseDiscoveryGenericConverter
      extended by org.apache.myfaces.trinidadinternal.convert.ReflectionConverter
All Implemented Interfaces:
TypeConverter

public class ReflectionConverter
extends ReverseDiscoveryGenericConverter

ReverseDiscoveryGenericConverter implementation based on Java Reflection


Constructor Summary
ReflectionConverter()
           
 
Method Summary
 java.lang.Object convert(java.lang.Object source, java.lang.Class<?> targetType)
          converts the given Object into an instance of the targetType.
 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
 

Constructor Detail

ReflectionConverter

public ReflectionConverter()
Method Detail

convert

public java.lang.Object convert(java.lang.Object source,
                                java.lang.Class<?> targetType)
Description copied from class: ReverseDiscoveryGenericConverter
converts the given Object into an instance of the targetType.

Specified by:
convert in interface TypeConverter
Specified by:
convert in class ReverseDiscoveryGenericConverter
Returns:
an instance of the targetType.

getSourceTypes

public java.util.List<java.lang.Class<?>> getSourceTypes(java.lang.Class<?> targetType)
Description copied from class: ReverseDiscoveryGenericConverter
Gets all the supported source types for the given targetType. This converter must be able to convert each source type into the targetType.

Specified by:
getSourceTypes in class ReverseDiscoveryGenericConverter
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.