public interface JAXBContextFactory
Factory that creates new JAXBContext instances.
JAXBContextFactory can be located using ServiceLoader.load(Class)
| Modifier and Type | Method and Description |
|---|---|
JAXBContext |
createContext(Class<?>[] classesToBeBound,
Map<String,?> properties)
Create a new instance of a
JAXBContext class. |
JAXBContext |
createContext(String contextPath,
ClassLoader classLoader,
Map<String,?> properties)
Create a new instance of a
JAXBContext class. |
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)
classesToBeBound - list of java classes to be recognized by the new JAXBContext.
Can be empty, in which case a JAXBContext 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.JAXBContext.JAXBException - if an error was encountered while creating the
JAXBContext, such as (but not limited to):
IllegalArgumentException - if the parameter contains null (i.e., newInstance(null,someMap);)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 should
throw JAXBException if it finds properties that it doesn't understand.
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.JAXBContextJAXBException - if an error was encountered while creating the
JAXBContext such as
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-01-26-133437.ivan.openjdk9onspinwait