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 StringgetClassName(String internalName) com/foo/Bar to com.foo.Barstatic ClassLoaderstatic StringgetInternalName(Class<?> clazz) com.foo.Bar to com/foo/Barstatic 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.class
-
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 -
getClassName
com/foo/Bar to com.foo.Bar -
getInternalName
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 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
-