Class Utils

java.lang.Object
io.opentelemetry.javaagent.tooling.Utils

public class Utils extends Object
  • Method Details

    • getAgentClassLoader

      public static ClassLoader getAgentClassLoader()
      Return the class loader the core agent is running on.
    • getExtensionsClassLoader

      public static ClassLoader getExtensionsClassLoader()
    • getBootstrapProxy

      public static io.opentelemetry.javaagent.bootstrap.AgentClassLoader.BootstrapClassLoaderProxy getBootstrapProxy()
      Return a class loader which can be used to look up bootstrap resources.
    • getResourceName

      public static String getResourceName(String className)
      com.foo.Bar to com/foo/Bar.class
    • getClassName

      public static String getClassName(String internalName)
      com/foo/Bar to com.foo.Bar
    • getInternalName

      public static String getInternalName(Class<?> clazz)
      com.foo.Bar to com/foo/Bar
    • getMethodDefinition

      public static net.bytebuddy.description.method.MethodDescription getMethodDefinition(net.bytebuddy.description.type.TypeDefinition type, String methodName)
      Get method definition for given TypeDefinition and method name.
      Parameters:
      type - type
      methodName - method name
      Returns:
      MethodDescription for given method
      Throws:
      IllegalStateException - if more then one method matches (i.e. in case of overloaded methods) or if no method found