Class Utils
- java.lang.Object
-
- io.opentelemetry.javaagent.tooling.Utils
-
public class Utils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ClassLoadergetAgentClassLoader()Return the classloader the core agent is running on.static io.opentelemetry.javaagent.bootstrap.AgentClassLoader.BootstrapClassLoaderProxygetBootstrapProxy()Return a classloader which can be used to look up bootstrap resources.static StringgetClassName(String internalName)com/foo/Bar to com.foo.Barstatic ClassLoadergetExtensionsClassLoader()static 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 Detail
-
getAgentClassLoader
public static ClassLoader getAgentClassLoader()
Return the classloader the core agent is running on.
-
getExtensionsClassLoader
public static ClassLoader getExtensionsClassLoader()
-
getBootstrapProxy
public static io.opentelemetry.javaagent.bootstrap.AgentClassLoader.BootstrapClassLoaderProxy getBootstrapProxy()
Return a classloader which can be used to look up bootstrap resources.
-
getResourceName
public static String getResourceName(String className)
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
-
-