Package feign.jaxb

Class JAXBContextFactory.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • withMarshallerJAXBEncoding

        public JAXBContextFactory.Builder withMarshallerJAXBEncoding​(java.lang.String value)
        Sets the jaxb.encoding property of any Marshaller created by this factory.
      • withMarshallerSchemaLocation

        public JAXBContextFactory.Builder withMarshallerSchemaLocation​(java.lang.String value)
        Sets the jaxb.schemaLocation property of any Marshaller created by this factory.
      • withMarshallerNoNamespaceSchemaLocation

        public JAXBContextFactory.Builder withMarshallerNoNamespaceSchemaLocation​(java.lang.String value)
        Sets the jaxb.noNamespaceSchemaLocation property of any Marshaller created by this factory.
      • withMarshallerFormattedOutput

        public JAXBContextFactory.Builder withMarshallerFormattedOutput​(java.lang.Boolean value)
        Sets the jaxb.formatted.output property of any Marshaller created by this factory.
      • withMarshallerFragment

        public JAXBContextFactory.Builder withMarshallerFragment​(java.lang.Boolean value)
        Sets the jaxb.fragment property of any Marshaller created by this factory.
      • withProperty

        public JAXBContextFactory.Builder withProperty​(java.lang.String key,
                                                       java.lang.Object value)
        Sets the given property of any Marshaller created by this factory.

        Example :

        new JAXBContextFactory.Builder() .withProperty("com.sun.xml.internal.bind.xmlHeaders", "<!DOCTYPE Example SYSTEM \"example.dtd\">") .build();

      • build

        public JAXBContextFactory build​(java.util.List<java.lang.Class<?>> classes)
                                 throws javax.xml.bind.JAXBException
        Creates a new JAXBContextFactory instance. Pre-loads context cache with given classes
        Parameters:
        classes -
        Returns:
        ContextFactory with a pre-populated JAXBContext cache
        Throws:
        javax.xml.bind.JAXBException - if provided classes can't be used for JAXBContext generation most likely due to missing JAXB annotations