which class calling?

Hi, I have a Utility Class with methods. Is there any way to print/log the caller? I mean from which class and which method calling this Utility class method.Thanks.
[186 byte] By [raghu182a] at [2007-11-27 2:18:45]
# 1
In JDK 5 or laterSystem.getStackTrace()beforenew Throwable().getStackTrace()Read the API for those methods and for StackTraceElement.Most times, however, this info is not needed. What, exactly, is it you want to do?
masijade.a at 2007-7-12 2:18:30 > top of Java-index,Java Essentials,Java Programming...
# 2
Ugly way: look at System's stacktrace.Not-so-ugly-but-still-not-likeable way: let the calling instance pass itself (this) as a method argument, if possible to overloaded methods.Good way: don't care
CeciNEstPasUnProgrammeura at 2007-7-12 2:18:30 > top of Java-index,Java Essentials,Java Programming...