public class StackTraceUtility
extends java.lang.Object
Constructor and Description |
---|
StackTraceUtility() |
Modifier and Type | Method and Description |
---|---|
static int |
getMatchingFrames(java.lang.Exception stackException,
java.lang.String packageName)
Retrieves the number of top-level frames whose class name's package matches
the specified package name.
|
static java.lang.String |
removeFrames(java.lang.Exception stackException,
int framesToRemove)
Modifies the specified Exception's stack trace by removing the specified
number of top-level frames.
|
public static int getMatchingFrames(java.lang.Exception stackException, java.lang.String packageName)
stackException
- the Exception that represents the stack tracepackageName
- fully qualified package name of classes to removepublic static java.lang.String removeFrames(java.lang.Exception stackException, int framesToRemove)
stackException
- the Exception that represents the stack traceframesToRemove
- the number of top-level frames to remove