java.lang.Object
jakarta.xml.bind.ModuleUtil
Propagates openness of Jakarta XML Binding annotated classes packages to Jakarta XML Binding impl module.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
delegateAddOpensToImplModule
(Class<?>[] classes, Class<?> factorySPI) Implementation may be defined in other module thanjakarta.xml.bind
.(package private) static Class<?>
findFirstByJaxbIndex
(String pkg, ClassLoader classLoader) Find first class in package byjaxb.index
file.(package private) static Class<?>[]
getClassesFromContextPath
(String contextPath, ClassLoader classLoader) Resolves classes from context path.
-
Field Details
-
LOGGER
-
-
Constructor Details
-
ModuleUtil
ModuleUtil()
-
-
Method Details
-
getClassesFromContextPath
static Class<?>[] getClassesFromContextPath(String contextPath, ClassLoader classLoader) throws JAXBException Resolves classes from context path. Only one class per package is needed to access itsModule
- Throws:
JAXBException
-
findFirstByJaxbIndex
static Class<?> findFirstByJaxbIndex(String pkg, ClassLoader classLoader) throws IOException, JAXBException Find first class in package byjaxb.index
file.- Throws:
IOException
JAXBException
-
delegateAddOpensToImplModule
public static void delegateAddOpensToImplModule(Class<?>[] classes, Class<?> factorySPI) throws JAXBException Implementation may be defined in other module thanjakarta.xml.bind
. In that case openness open of classes should be delegated to implementation module.- Parameters:
classes
- used to resolve module for Module.addOpens(String, Module)factorySPI
- used to resolveModule
of the implementation.- Throws:
JAXBException
- if ony of a classes package is not open tojakarta.xml.bind
module.
-