Top Description Fields Constructors Methods
jakarta.xml.bind

pack-priv Class ModuleUtil

extends Object
Class Inheritance
Imports
java.io.BufferedReader, .IOException, .InputStream, .InputStreamReader, java.util.ArrayList, .List, java.util.logging.Level, .Logger

Propagates openness of Jakarta XML Binding annotated classes packages to Jakarta XML Binding impl module.
Author
Roman Grigoriadi

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static void
delegateAddOpensToImplModule(Class<?>[]
used to resolve module for Module#addOpens(String, Module)
classes
,
Class<?>
used to resolve Module of the implementation.
factorySPI
)

Implementation may be defined in other module than jakarta.xml.bind.

pack-priv static Class<?>
findFirstByJaxbIndex(String pkg, ClassLoader classLoader)

Find first class in package by jaxb.index file.

pack-priv static Class<?>[]
getClassesFromContextPath(String contextPath, ClassLoader classLoader)

Resolves classes from context path.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

ModuleUtilback to summary
pack-priv ModuleUtil()

Method Detail

delegateAddOpensToImplModuleback to summary
public static void delegateAddOpensToImplModule(Class<?>[] classes, Class<?> factorySPI) throws JAXBException

Implementation may be defined in other module than jakarta.xml.bind. In that case openness open of classes should be delegated to implementation module.

Parameters
classes:Class<?>[]

used to resolve module for Module#addOpens(String, Module)

factorySPI:Class<?>

used to resolve Module of the implementation.

Exceptions
JAXBException:
if ony of a classes package is not open to jakarta.xml.bind module.
findFirstByJaxbIndexback to summary
pack-priv static Class<?> findFirstByJaxbIndex(String pkg, ClassLoader classLoader) throws IOException, JAXBException

Find first class in package by jaxb.index file.

getClassesFromContextPathback to summary
pack-priv static Class<?>[] getClassesFromContextPath(String contextPath, ClassLoader classLoader) throws JAXBException

Resolves classes from context path. Only one class per package is needed to access its java.lang.Module