|
||||||||||
| 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.
The GNU Lesser General Public License for details.| 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)
i - the i-th coller
ArrayIndexOutOfBoundsException - if the index is not valid
|
Copyright ยจ 2003-2015 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||