public final class CallContext extends Object
It has been tested to work in command line and WebStart environments.
The GNU Lesser General Public License for details.| Modifier and Type | Field and Description |
|---|---|
private static int |
CALL_CONTEXT_OFFSET
Offset needed to represent the caller of the method that called this
method.
|
private static CallContext |
resolver |
| Modifier | Constructor and Description |
|---|---|
private |
CallContext()
Prevent instantiation
|
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
getCallingClass()
When called from a method it will return the class calling that method.
|
static Class<?> |
getCallingClass(int i)
When called from a method it will return the i-th class calling that
method, up the call chain.
|
static CallContext |
instance()
Singleton accessor
|
private static final int CALL_CONTEXT_OFFSET
private static CallContext resolver
public static CallContext instance()
public static Class<?> getCallingClass()
public static Class<?> getCallingClass(int i)
i - the i-th collerArrayIndexOutOfBoundsException - if the index is not valid