Package org.faktorips.runtime.util
Class JAXBContextFactory
- java.lang.Object
-
- org.faktorips.runtime.util.JAXBContextFactory
-
@Deprecated public final class JAXBContextFactory extends java.lang.ObjectDeprecated.useIRuntimeRepository.newJAXBContext()instead; that method uses aIpsJAXBContextthat includes all necessary adapters.Provides static factory methods to create a JAXBContext that can marshal / unmarshal all model classes defined in a given runtime repository.- See Also:
JAXBContext,IRuntimeRepository
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static javax.xml.bind.JAXBContextnewContext(IRuntimeRepository repository)Deprecated.Creates a new JAXBContext that can marshal / unmarshal all model classes defined in the given repository.static javax.xml.bind.JAXBContextnewContext(IRuntimeRepository repository, java.lang.ClassLoader cl)Deprecated.Creates a new JAXBContext that can marshal / unmarshal all model classes defined in the given repository.
-
-
-
Method Detail
-
newContext
public static javax.xml.bind.JAXBContext newContext(IRuntimeRepository repository) throws javax.xml.bind.JAXBException, java.lang.ClassNotFoundException
Deprecated.Creates a new JAXBContext that can marshal / unmarshal all model classes defined in the given repository. If the repository references other repositories (directly or indirectly), the context can also handle the classes defined in these other repositories. Note: The repository contains the model classed by name, so this method needs to actually load the classes. If the repository gives access to a class loader (e.g. ClassloaderRuntimeRepository does), the class loader provided by the repository is taken. Otherwise the class loader that has loaded the class the repository is an instance of, is used.- Parameters:
repository- The repository that contains the information about the model classes- Throws:
java.lang.ClassNotFoundException- If one of the model classes was not found.javax.xml.bind.JAXBException- The exception thrown byJAXBContext.newInstance(Class...)java.lang.NullPointerException- ifrepositoryisnull.
-
newContext
public static javax.xml.bind.JAXBContext newContext(IRuntimeRepository repository, java.lang.ClassLoader cl) throws javax.xml.bind.JAXBException, java.lang.ClassNotFoundException
Deprecated.Creates a new JAXBContext that can marshal / unmarshal all model classes defined in the given repository. If the repository references other repositories (directly or indirectly), the context can also handle the classes defined in these other repositories. Note: The repository contains the model classed by name, so this method needs to actually load the classes. This method uses the given class loader do load the classes.- Parameters:
repository- The repository that contains the information about the model classescl- The class loader to load the model classes.- Throws:
java.lang.ClassNotFoundException- If one of the model classes was not found.javax.xml.bind.JAXBException- The exception thrown byJAXBContext.newInstance(Class...)java.lang.NullPointerException- if one of the parameters isnull.
-
-