org.apache.servicemix.converter
Class Converters

java.lang.Object
  extended by org.apache.servicemix.converter.Converters

public class Converters
extends java.lang.Object

A set of helper methods and classes to convert a few basic types NOTE: if this grows any bigger, we might want to consider moving to Camel @Converter's for this


Constructor Summary
Converters()
           
 
Method Summary
<T> T
as(java.lang.Object value, java.lang.Class<T> target)
          Convert an object to another type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Converters

public Converters()
Method Detail

as

public <T> T as(java.lang.Object value,
                java.lang.Class<T> target)
Convert an object to another type. If the object is null, this method will always return null.

Parameters:
value - the object to be converted
target - the target object type
Returns:
the converted object value or null if no suitable conversion was found


Copyright © 2005-2011 FuseSource. All Rights Reserved.