Class InstUtils
- java.lang.Object
-
- com.intergral.deep.agent.tracepoint.inst.InstUtils
-
public final class InstUtils extends Object
Utilities to help with instrumentation.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
externalClassName(String className)
Get the external class name.static String
fileName(String relPath)
Get the name of the file from the path.static String
internalClass(Class<?> clazz)
Get the internal class name.static String
internalClass(String clazz)
Get the internal class name.static String
internalClassStripInner(Class<?> clazz)
Convert the class name to the internal class name, remove any inner class names.static String
internalClassStripInner(String className)
Convert the class name to the internal class name, remove any inner class names.static String
shortClassName(String className)
Get the short version of the class name.
-
-
-
Method Detail
-
externalClassName
public static String externalClassName(String className)
Get the external class name.- Parameters:
className
- the class name- Returns:
- the external class name
-
fileName
public static String fileName(String relPath)
Get the name of the file from the path.- Parameters:
relPath
- the path to a file- Returns:
- the name of the file
-
internalClassStripInner
public static String internalClassStripInner(Class<?> clazz)
Convert the class name to the internal class name, remove any inner class names.- Parameters:
clazz
- the class- Returns:
- the internal class name without the inner classes
-
internalClassStripInner
public static String internalClassStripInner(String className)
Convert the class name to the internal class name, remove any inner class names.- Parameters:
className
- the name of the class- Returns:
- the internal class name without the inner classes
-
internalClass
public static String internalClass(String clazz)
Get the internal class name.- Parameters:
clazz
- the name of the class- Returns:
- the internal name of the class
-
internalClass
public static String internalClass(Class<?> clazz)
Get the internal class name.- Parameters:
clazz
- the class- Returns:
- the internal name of the class
-
shortClassName
public static String shortClassName(String className)
Get the short version of the class name.Sometimes
Class.getSimpleName()
doesn't return a name. So we need one that always returns a name. Also, it seems to cause class loading sometimes.- Parameters:
className
- the class name- Returns:
- the name of the class without the package
-
-