org.apache.camel.impl.converter
Class StaticMethodTypeConverter

java.lang.Object
  extended by org.apache.camel.impl.converter.StaticMethodTypeConverter
All Implemented Interfaces:
TypeConverter

public class StaticMethodTypeConverter
extends Object
implements TypeConverter

A TypeConverter implementation which invokes a static method to convert from a type to another type

Version:
$Revision: 35332 $

Constructor Summary
StaticMethodTypeConverter(Method method)
           
 
Method Summary
<T> T
convertTo(Class<T> type, Object value)
          Converts the value to the specified type
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StaticMethodTypeConverter

public StaticMethodTypeConverter(Method method)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

convertTo

public <T> T convertTo(Class<T> type,
                       Object value)
Description copied from interface: TypeConverter
Converts the value to the specified type

Specified by:
convertTo in interface TypeConverter
Parameters:
type - the requested type
value - the value to be converted
Returns:
the converted value or null if it can not be converted


Copyright © 2008 IONA Open Source Community. All Rights Reserved.