Class Utils
java.lang.Object
io.opentelemetry.javaagent.tooling.Utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassLoaderReturn the class loader the core agent is running on.static io.opentelemetry.javaagent.bootstrap.AgentClassLoader.BootstrapClassLoaderProxyReturn a class loader which can be used to look up bootstrap resources.static ClassLoadergetContextClassLoader(Thread thread) static ClassLoaderstatic net.bytebuddy.description.method.MethodDescriptiongetMethodDefinition(net.bytebuddy.description.type.TypeDefinition type, String methodName) Get method definition for givenTypeDefinitionand method name.static StringgetResourceName(String className) com.foo.Bar to com/foo/Bar.classstatic voidsetContextClassLoader(Thread thread, ClassLoader classLoader)
-
Method Details
-
getAgentClassLoader
Return the class loader the core agent is running on. -
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
com.foo.Bar to com/foo/Bar.class -
getMethodDefinition
public static net.bytebuddy.description.method.MethodDescription getMethodDefinition(net.bytebuddy.description.type.TypeDefinition type, String methodName) Get method definition for givenTypeDefinitionand method name.- Parameters:
type- typemethodName- method name- Returns:
MethodDescriptionfor given method- Throws:
IllegalStateException- if more then one method matches (i.e. in case of overloaded methods) or if no method found
-
getContextClassLoader
-
setContextClassLoader
-