Class FallbackTypeConverter

java.lang.Object
org.apache.camel.converter.jaxb.FallbackTypeConverter

@Converter(generateLoader=true) public class FallbackTypeConverter extends Object
  • Field Details

  • 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

      @Converter(fallback=true) public Object convertTo(Class<?> type, org.apache.camel.Exchange exchange, Object value, org.apache.camel.spi.TypeConverterRegistry registry)
    • 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