Class StackTraceScanner
java.lang.Object
clazzfish.monitor.util.StackTraceScanner
This class allows you to scan the stacktrace for different stuff.
- Since:
- 1.4.1 (24.01.2014)
- Author:
- oliver
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class
<?> Gets the caller class by examing the stacktrace.static Class
<?> getCallerClass
(Pattern... excluded) Gets the caller class by examing the stacktrace.static Class
<?> getCallerClass
(Pattern[] excludedMethods, Class<?>... excludedClasses) Gets the caller class by examing the stacktrace.static StackTraceElement[]
Gets the caller stack trace of the method or constructor which calls it.static StackTraceElement[]
getCallerStackTrace
(Pattern... excluded) Gets the caller stack trace of the method or constructor which calls it.static StackTraceElement[]
getCallerStackTrace
(Pattern[] excludedMethods, Class<?>... excludedClasses) Gets the caller stack trace of the method or constructor which calls it.
-
Method Details
-
getCallerClass
Gets the caller class by examing the stacktrace.- Returns:
- the caller class
-
getCallerClass
-
getCallerClass
-
getCallerStackTrace
Gets the caller stack trace of the method or constructor which calls it.- Returns:
- the caller stack trace
- Since:
- 1.4.2 (17.05.2014)
-
getCallerStackTrace
Gets the caller stack trace of the method or constructor which calls it.- Parameters:
excluded
- a list of filters which should be not considered as caller- Returns:
- the caller stack trace
- Since:
- 1.4.2 (17.05.2014)
-
getCallerStackTrace
public static StackTraceElement[] getCallerStackTrace(Pattern[] excludedMethods, Class<?>... excludedClasses) Gets the caller stack trace of the method or constructor which calls it.- Parameters:
excludedMethods
- the excluded methodsexcludedClasses
- the excluded classes- Returns:
- the caller stack trace
- Since:
- 1.4.2 (17.05.2014)
-