List of utility methods to do Throwable Method Get
String | getThrowingMethod(Throwable t) Returns the class and method name (+a line number) in which the Throwable was thrown. StackTraceElement[] trace = t.getStackTrace(); StringBuffer sb = new StringBuffer(); if (trace == null || trace.length == 0) { sb.append("[Stack trace not available]"); } else { sb.append(trace[0].isNativeMethod() ? "native method" : ""); sb.append(trace[0].getClassName()); sb.append("."); ... |