-
public interface JAXBContextFactory
Factory that creates new
JAXBContext
instances. JAXBContextFactory can be located usingServiceLoader.load(Class)
- Since:
- 9, JAXB 2.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JAXBContext
createContext(Class<?>[] classesToBeBound, Map<String,?> properties)
Create a new instance of aJAXBContext
class.JAXBContext
createContext(String contextPath, ClassLoader classLoader, Map<String,?> properties)
Create a new instance of aJAXBContext
class.
-
-
-
Method Detail
-
createContext
JAXBContext createContext(Class<?>[] classesToBeBound, Map<String,?> properties) throws JAXBException
Create a new instance of a
JAXBContext
class.For semantics see
JAXBContext.newInstance(Class[], java.util.Map)
- Parameters:
classesToBeBound
- list of java classes to be recognized by the newJAXBContext
. Can be empty, in which case aJAXBContext
that only knows about spec-defined classes will be returned.properties
- provider-specific properties. Can be null, which means the same thing as passing in an empty map.- Returns:
- A new instance of a
JAXBContext
. - Throws:
JAXBException
- if an error was encountered while creating theJAXBContext
. SeeJAXBContext.newInstance(Class[], Map)
for details.IllegalArgumentException
- if the parameter containsnull
(i.e.,newInstance(null,someMap);
)- Since:
- 9, JAXB 2.3
-
createContext
JAXBContext createContext(String contextPath, ClassLoader classLoader, Map<String,?> properties) throws JAXBException
Create a new instance of a
JAXBContext
class.For semantics see
JAXBContext.newInstance(String, ClassLoader, java.util.Map)
The interpretation of properties is up to implementations. Implementations must throw
JAXBException
if it finds properties that it doesn't understand.- Parameters:
contextPath
- list of java package names that contain schema derived classesclassLoader
- This class loader will be used to locate the implementation classes.properties
- provider-specific properties. Can be null, which means the same thing as passing in an empty map.- Returns:
- a new instance of a
JAXBContext
- Throws:
JAXBException
- if an error was encountered while creating theJAXBContext
. SeeJAXBContext.newInstance(String, ClassLoader, Map)
for details.- Since:
- 9, JAXB 2.3
-
-