org.apache.camel.converter.jaxb
Class FallbackTypeConverter

java.lang.Object
  extended by org.apache.camel.converter.jaxb.FallbackTypeConverter
All Implemented Interfaces:
org.apache.camel.spi.TypeConverterAware, org.apache.camel.TypeConverter

public class FallbackTypeConverter
extends Object
implements org.apache.camel.TypeConverter, org.apache.camel.spi.TypeConverterAware

Version:
$Revision: 1.1 $

Constructor Summary
FallbackTypeConverter()
           
 
Method Summary
<T> T
convertTo(Class<T> type, Object value)
           
protected
<T> javax.xml.bind.JAXBContext
createContext(Class<T> type)
           
protected
<T> boolean
isJaxbType(Class<T> type)
           
 boolean isPrettyPrint()
           
protected
<T> T
marshall(Class<T> type, Object value)
           
 void setPrettyPrint(boolean prettyPrint)
           
 void setTypeConverter(org.apache.camel.TypeConverter parentTypeConverter)
           
protected
<T> T
unmarshall(Class<T> type, Object value)
          Lets try parse via JAXB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FallbackTypeConverter

public FallbackTypeConverter()
Method Detail

isPrettyPrint

public boolean isPrettyPrint()

setPrettyPrint

public void setPrettyPrint(boolean prettyPrint)

setTypeConverter

public void setTypeConverter(org.apache.camel.TypeConverter parentTypeConverter)
Specified by:
setTypeConverter in interface org.apache.camel.spi.TypeConverterAware

convertTo

public <T> T convertTo(Class<T> type,
                       Object value)
Specified by:
convertTo in interface org.apache.camel.TypeConverter

isJaxbType

protected <T> boolean isJaxbType(Class<T> type)

unmarshall

protected <T> T unmarshall(Class<T> type,
                           Object value)
                throws javax.xml.bind.JAXBException
Lets try parse via JAXB

Throws:
javax.xml.bind.JAXBException

marshall

protected <T> T marshall(Class<T> type,
                         Object value)
              throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

createContext

protected <T> javax.xml.bind.JAXBContext createContext(Class<T> type)
                                            throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException


Copyright © 2007 Apache Software Foundation. All Rights Reserved.