Class Caller
java.lang.Object
clazzfish.jdbc.internal.Caller
The class Caller looks for the caller by analyzing the stacktrace.
Before 3.1 it was part of the
StasiStatement class.- Since:
- 3.1 (15.06.26)
- Author:
- oboehm
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic StackTraceElement[]getCallerStacktrace(Class<?>... ignoredClasses) Gets the caller stacktrace.inthashCode()static CallerCreates a caller element with the corresponding stack trace entry.static Callerof(StackTraceElement stackTraceElement) Creates a caller element with the given stack trace entry.toString()
-
Method Details
-
of
-
of
Creates a caller element with the given stack trace entry. To avoid too many objects of the same caller the created instances are cached.- Parameters:
stackTraceElement- the stacktrace element of the caller- Returns:
- caller of the of method
-
getCallerStacktrace
Gets the caller stacktrace. To find the real caller we ignore the first element from the stacktrace because this is e.g. the methodThread.getStackTrace()which is not relevant here.In case of a connection pool we have many caller with the same# stacktrace. For this rease we cache the stacktrace to reduche the number of doublettes.
- Parameters:
ignoredClasses- the ignored classes- Returns:
- the caller stacktrace
-
getStackTraceElement
-
toString
-
equals
-
hashCode
-