Class ReflectiveAccessModulesReconfigurer

java.lang.Object
io.quarkus.deployment.jvm.ReflectiveAccessModulesReconfigurer
All Implemented Interfaces:
JvmModulesReconfigurer

final class ReflectiveAccessModulesReconfigurer extends Object implements JvmModulesReconfigurer
Implements the JvmModulesReconfigurer interface to reconfigure JVM module restrictions through reflective access. Restrictions: - This class relies on the JVM option: `--add-opens=java.base/java.lang.invoke=ALL-UNNAMED` to access otherwise sealed private methods and fields of the java.base module. Without this option, reflective access will fail. Design Notes: - Reflection is used to access internal JVM mechanisms, making this implementation dependent on the stability of the relevant internal API. We therefore rely on a multiple of different strategies - this being one of them. - This approach bypasses strict module system rules, enabling dynamic adjustments to module access at runtime: it's meant as a convenience during development, Quarkus does not use such techniques in production mode.