org.apache.camel.converter
Class ObjectConverter

java.lang.Object
  extended by org.apache.camel.converter.ObjectConverter

@Converter
public final class ObjectConverter
extends Object

Some core java.lang based Type Converters

Version:

Method Summary
static String fromCharArray(char[] value)
           
static boolean isCollection(Object value)
           
static Iterator iterator(Object value)
          Creates an iterator over the value
static boolean toBool(Object value)
          Converts the given value to a boolean, handling strings or Boolean objects; otherwise returning false if the value could not be converted to a boolean
static Boolean toBoolean(Object value)
          Converts the given value to a Boolean, handling strings or Boolean objects; otherwise returning null if the value cannot be converted to a boolean
static Byte toByte(Object value)
          Returns the converted value, or null if the value is null
static char toChar(String value)
           
static char[] toCharArray(String value)
           
static Class toClass(Object value, Exchange exchange)
          Returns the converted value, or null if the value is null
static Double toDouble(Object value)
          Returns the converted value, or null if the value is null
static Float toFloat(Object value)
          Returns the converted value, or null if the value is null
static Integer toInteger(Object value)
          Returns the converted value, or null if the value is null
static Long toLong(Object value)
          Returns the converted value, or null if the value is null
static Short toShort(Object value)
          Returns the converted value, or null if the value is null
static String toString(Boolean value)
           
static String toString(Integer value)
           
static String toString(Long value)
           
static String toString(StringBuffer value)
           
static String toString(StringBuilder value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isCollection

public static boolean isCollection(Object value)

toBool

@Converter
public static boolean toBool(Object value)
Converts the given value to a boolean, handling strings or Boolean objects; otherwise returning false if the value could not be converted to a boolean


toBoolean

@Converter
public static Boolean toBoolean(Object value)
Converts the given value to a Boolean, handling strings or Boolean objects; otherwise returning null if the value cannot be converted to a boolean


iterator

@Converter
public static Iterator iterator(Object value)
Creates an iterator over the value


toByte

@Converter
public static Byte toByte(Object value)
Returns the converted value, or null if the value is null


toCharArray

@Converter
public static char[] toCharArray(String value)

toChar

@Converter
public static char toChar(String value)

fromCharArray

@Converter
public static String fromCharArray(char[] value)

toClass

@Converter
public static Class toClass(Object value,
                                      Exchange exchange)
Returns the converted value, or null if the value is null


toShort

@Converter
public static Short toShort(Object value)
Returns the converted value, or null if the value is null


toInteger

@Converter
public static Integer toInteger(Object value)
Returns the converted value, or null if the value is null


toLong

@Converter
public static Long toLong(Object value)
Returns the converted value, or null if the value is null


toFloat

@Converter
public static Float toFloat(Object value)
Returns the converted value, or null if the value is null


toDouble

@Converter
public static Double toDouble(Object value)
Returns the converted value, or null if the value is null


toString

@Converter
public static String toString(Integer value)

toString

@Converter
public static String toString(Long value)

toString

@Converter
public static String toString(Boolean value)

toString

@Converter
public static String toString(StringBuffer value)

toString

@Converter
public static String toString(StringBuilder value)


Apache CAMEL