Caller¶
-
public class
Caller
¶ A Caller represents the class calling the method which generates this Caller. It retrieves information from the stack trace and is a relatively expensive operation. As a result, it should be used only when there is an absolute need.
Author: Hugo Y. K. Lam
Constructors¶
Methods¶
getClassName¶
getFileName¶
getLineNumber¶
-
public int
getLineNumber
()¶ Gets the line number in the source file of the caller class at which the call is made.
Returns: the line number in the source file.
getMethodName¶
getName¶
isUnknown¶
-
public boolean
isUnknown
()¶ Checks if the calling class is undetermined.
Returns: true if the calling class is undetermined.
toString¶
-
public String
toString
()¶ Returns a string representation of this Caller.
Returns: a string representation of this Caller. See also:
java.lang.Object.toString()