Package org.elasticsearch.entitlement.bridge
package org.elasticsearch.entitlement.bridge
Contains classes that need to be used directly from instrumented methods.
It's a minimal shim that is patched into the
java.base module so that it is callable from the class library methods instrumented
by the agent. The shim retains a EntitlementChecker instance (inside its
EntitlementCheckerHandle holder) and forwards the entitlement checks to the main library,
that exists in the system classloader.
EntitlementChecker holds all the entitlements check definitions, one for each instrumented
method.
In order to work across multiple Java versions, this project uses multi-release jars via the mrjar plugin, which makes it is
possible to specify classes for specific Java versions in specific src folders (e.g. main23 for classes available to
Java 23+).
All the versioned Java classes are merged into the bridge jar. Therefore, we must prefix the class name
with the version, e.g. Java23EntitlementCheckerHandle and Java23EntitlementChecker.