|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.util.CallContext
public final class CallContext
This singleton class provides a way for a method to determine which class called it.
It has been tested to work in command line and WebStart environments.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private static int |
CALL_CONTEXT_OFFSET
Offset needed to represent the caller of the method that called this method. |
private static CallContext |
resolver
|
Constructor Summary | |
---|---|
private |
CallContext()
Prevent instantiation |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int CALL_CONTEXT_OFFSET
private static CallContext resolver
Constructor Detail |
---|
private CallContext()
Method Detail |
---|
public static CallContext instance()
public static Class<?> getCallingClass()
public static Class<?> getCallingClass(int i)
ArrayIndexOutOfBoundsException
- if the index is not valid
|
Copyright ? 2003-2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |