Class FallbackTypeConverter


  • @Converter(generateLoader=true)
    public class FallbackTypeConverter
    extends Object
    • Constructor Detail

      • FallbackTypeConverter

        public FallbackTypeConverter()
    • Method Detail

      • 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

        @FallbackConverter
        @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
      • needFiltering

        protected boolean needFiltering​(org.apache.camel.Exchange exchange)