Class InClassLoaderMatcher


  • public final class InClassLoaderMatcher
    extends Object
    • Method Detail

      • get

        public static boolean get()
        Returns whether the ClassLoaderMatcher is currently executing.

        This is used (at least) by the eclipse-osgi instrumentation in order to suppress a side effect in the Eclipse OSGi class loader that occurs when ClassLoaderMatcher calls ClassLoader.getResource(). See EclipseOsgiInstrumentationModule for more details.

      • getAndSet

        public static boolean getAndSet​(boolean value)
        WARNING This should not be used by instrumentation. It should only be used by io.opentelemetry.javaagent.tooling.bytebuddy.matcher.ClassLoaderMatcher.

        The reason it can't be (easily) hidden is that this class needs to live in the bootstrap class loader to be accessible to instrumentation, while the ClassLoaderMatcher lives in the agent class loader.

      • set

        public static void set​(boolean value)
        WARNING This should not be used by instrumentation. It should only be used by io.opentelemetry.javaagent.tooling.bytebuddy.matcher.ClassLoaderMatcher.

        The reason it can't be (easily) hidden is that this class needs to live in the bootstrap class loader to be accessible to instrumentation, while the ClassLoaderMatcher lives in the agent class loader.