org.apache.camel.converter.jaxb
Class FallbackTypeConverter
java.lang.Object
org.apache.camel.converter.jaxb.FallbackTypeConverter
- All Implemented Interfaces:
- TypeConverterAware, TypeConverter
public class FallbackTypeConverter
- extends Object
- implements TypeConverter, TypeConverterAware
- Version:
- $Revision: 834590 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FallbackTypeConverter
public FallbackTypeConverter()
isPrettyPrint
public boolean isPrettyPrint()
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint)
setTypeConverter
public void setTypeConverter(TypeConverter parentTypeConverter)
- Specified by:
setTypeConverter in interface TypeConverterAware
convertTo
public <T> T convertTo(Class<T> type,
Object value)
- Specified by:
convertTo in interface TypeConverter
convertTo
public <T> T convertTo(Class<T> type,
Exchange exchange,
Object value)
- Specified by:
convertTo in interface TypeConverter
mandatoryConvertTo
public <T> T mandatoryConvertTo(Class<T> type,
Object value)
throws NoTypeConversionAvailableException
- Specified by:
mandatoryConvertTo in interface TypeConverter
- Throws:
NoTypeConversionAvailableException
mandatoryConvertTo
public <T> T mandatoryConvertTo(Class<T> type,
Exchange exchange,
Object value)
throws NoTypeConversionAvailableException
- Specified by:
mandatoryConvertTo in interface TypeConverter
- Throws:
NoTypeConversionAvailableException
isJaxbType
protected <T> boolean isJaxbType(Class<T> type)
unmarshall
protected <T> T unmarshall(Class<T> type,
Object value)
throws JAXBException
- Lets try parse via JAXB
- Throws:
JAXBException
marshall
protected <T> T marshall(Class<T> type,
Object value)
throws JAXBException
- Throws:
JAXBException
unmarshal
protected Object unmarshal(Unmarshaller unmarshaller,
Object value)
throws JAXBException
- Unmarshals the given value with the unmarshaller
- Parameters:
unmarshaller - the unmarshallervalue - the stream to unmarshal (will close it after use, also if exception is thrown)
- Returns:
- the value
- Throws:
JAXBException - is thrown if an exception occur while unmarshalling
createContext
protected <T> JAXBContext createContext(Class<T> type)
throws JAXBException
- Throws:
JAXBException
Copyright © 2007-2009 The Apache Software Foundation. All Rights Reserved.