org.apache.camel.converter
Class ObjectConverter

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

@Converter
public final class ObjectConverter
extends java.lang.Object

Some core java.lang based Type Converters

Version:

Method Summary
static java.lang.String fromCharArray(char[] value)
           
static boolean isCollection(java.lang.Object value)
           
static java.util.Iterator iterator(java.lang.Object value)
          Creates an iterator over the value
static boolean toBool(java.lang.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 java.lang.Boolean toBoolean(java.lang.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 java.lang.Boolean toBoolean(java.lang.String value)
           
static java.lang.Byte toByte(java.lang.Object value)
          Returns the converted value, or null if the value is null
static char toChar(java.lang.String value)
           
static char[] toCharArray(java.lang.String value)
           
static java.lang.Class toClass(java.lang.Object value, Exchange exchange)
          Returns the converted value, or null if the value is null
static java.lang.Double toDouble(java.lang.Object value)
          Returns the converted value, or null if the value is null
static java.lang.Double toDouble(java.lang.String value)
           
static java.lang.Float toFloat(java.lang.Object value)
          Returns the converted value, or null if the value is null
static java.lang.Float toFloat(java.lang.String value)
           
static java.lang.Integer toInteger(java.lang.Object value)
          Returns the converted value, or null if the value is null
static java.lang.Integer toInteger(java.lang.String value)
           
static java.lang.Long toLong(java.lang.Object value)
          Returns the converted value, or null if the value is null
static java.lang.Long toLong(java.lang.String value)
           
static java.lang.Short toShort(java.lang.Object value)
          Returns the converted value, or null if the value is null
static java.lang.String toString(java.lang.Boolean value)
           
static java.lang.String toString(java.lang.Integer value)
           
static java.lang.String toString(java.lang.Long value)
           
static java.lang.String toString(java.lang.StringBuffer value)
           
static java.lang.String toString(java.lang.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(java.lang.Object value)

toBool

@Converter
public static boolean toBool(java.lang.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 java.lang.Boolean toBoolean(java.lang.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 java.util.Iterator iterator(java.lang.Object value)
Creates an iterator over the value


toByte

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


toCharArray

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

toChar

@Converter
public static char toChar(java.lang.String value)

fromCharArray

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

toClass

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


toShort

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


toInteger

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


toLong

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


toFloat

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


toDouble

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


toString

@Converter
public static java.lang.String toString(java.lang.Integer value)

toString

@Converter
public static java.lang.String toString(java.lang.Long value)

toString

@Converter
public static java.lang.String toString(java.lang.Boolean value)

toString

@Converter
public static java.lang.String toString(java.lang.StringBuffer value)

toString

@Converter
public static java.lang.String toString(java.lang.StringBuilder value)

toInteger

@Converter
public static java.lang.Integer toInteger(java.lang.String value)

toLong

@Converter
public static java.lang.Long toLong(java.lang.String value)

toFloat

@Converter
public static java.lang.Float toFloat(java.lang.String value)

toDouble

@Converter
public static java.lang.Double toDouble(java.lang.String value)

toBoolean

@Converter
public static java.lang.Boolean toBoolean(java.lang.String value)


Apache CAMEL