Runtime Class and Method information
Join the DZone community and get the full member experience.Join For Free
Throwable t = new Throwable();
StackTraceElement elements = t.getStackTrace();
Here is another small snippet to find the name of the class at runtime.
Tiny little things, aren't they!
Happy Programming :)
Opinions expressed by DZone contributors are their own.