Package org.apache.camel.converter.jaxb
Class FallbackTypeConverter
java.lang.Object
org.apache.camel.converter.jaxb.FallbackTypeConverter
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertTo
(Class<?> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.spi.TypeConverterRegistry registry) protected <T> jakarta.xml.bind.JAXBContext
createContext
(Class<T> type) protected <T> jakarta.xml.bind.Unmarshaller
getUnmarshaller
(Class<T> type) protected <T> boolean
isJaxbType
(Class<T> type, org.apache.camel.Exchange exchange, boolean objectFactory) boolean
boolean
protected <T> T
marshall
(Class<T> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.TypeConverter converter, Method objectFactoryMethod, boolean prettyPrint) protected boolean
needFiltering
(org.apache.camel.Exchange exchange) void
setObjectFactory
(boolean objectFactory) Whether the JAXB converter supports using ObjectFactory classes to create the POJO classes during conversion.void
setPrettyPrint
(boolean prettyPrint) Whether the JAXB converter should use pretty print or not (default is true)protected Object
unmarshal
(jakarta.xml.bind.Unmarshaller unmarshaller, org.apache.camel.Exchange exchange, Object value) protected <T> T
unmarshall
(Class<T> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.TypeConverter converter) Lets try parse via JAXB
-
Field Details
-
PRETTY_PRINT
- See Also:
-
OBJECT_FACTORY
- See Also:
-
-
Constructor Details
-
FallbackTypeConverter
public FallbackTypeConverter()
-
-
Method Details
-
isPrettyPrint
public boolean isPrettyPrint() -
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint) Whether the JAXB converter should use pretty print or not (default is true) -
isObjectFactory
public boolean isObjectFactory() -
setObjectFactory
public void setObjectFactory(boolean objectFactory) Whether the JAXB converter supports using ObjectFactory classes to create the POJO classes during conversion. This only applies to POJO classes that has not been annotated with JAXB and providing jaxb.index descriptor files. -
convertTo
-
isJaxbType
protected <T> boolean isJaxbType(Class<T> type, org.apache.camel.Exchange exchange, boolean objectFactory) -
unmarshall
protected <T> T unmarshall(Class<T> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.TypeConverter converter) throws Exception Lets try parse via JAXB- Throws:
Exception
-
marshall
protected <T> T marshall(Class<T> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.TypeConverter converter, Method objectFactoryMethod, boolean prettyPrint) throws jakarta.xml.bind.JAXBException, FactoryConfigurationError, org.apache.camel.TypeConversionException - Throws:
jakarta.xml.bind.JAXBException
FactoryConfigurationError
org.apache.camel.TypeConversionException
-
unmarshal
protected Object unmarshal(jakarta.xml.bind.Unmarshaller unmarshaller, org.apache.camel.Exchange exchange, Object value) throws jakarta.xml.bind.JAXBException, UnsupportedEncodingException, XMLStreamException - Throws:
jakarta.xml.bind.JAXBException
UnsupportedEncodingException
XMLStreamException
-
needFiltering
protected boolean needFiltering(org.apache.camel.Exchange exchange) -
createContext
protected <T> jakarta.xml.bind.JAXBContext createContext(Class<T> type) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-
getUnmarshaller
protected <T> jakarta.xml.bind.Unmarshaller getUnmarshaller(Class<T> type) throws jakarta.xml.bind.JAXBException - Throws:
jakarta.xml.bind.JAXBException
-