Class InClassLoaderMatcher

java.lang.Object
io.opentelemetry.javaagent.bootstrap.internal.InClassLoaderMatcher

public final class InClassLoaderMatcher extends Object
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    get()
    Returns whether the ClassLoaderMatcher is currently executing.
    static boolean
    getAndSet(boolean value)
    WARNING This should not be used by instrumentation.
    static void
    set(boolean value)
    WARNING This should not be used by instrumentation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

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

      This is used (at least) by the internal-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.