|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.SecurityManager
org.crosswire.common.util.CallContext
public 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.
|
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence| 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
|
| Fields inherited from class java.lang.SecurityManager |
|---|
inCheck |
| Constructor Summary | |
|---|---|
private |
CallContext()
Prevent instansiation |
| Method Summary | |
|---|---|
Class |
getCallingClass()
When called from a method it will return the class calling that method. |
Class |
getCallingClass(int i)
When called from a method it will return the i-th class calling that method, up the call chain. |
protected Class[] |
getClassContext()
|
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()
protected Class[] getClassContext()
getClassContext in class SecurityManagerpublic Class getCallingClass()
public Class getCallingClass(int i)
ArrayIndexOutOfBoundsException - if the index is not valid
|
Copyright ? 2003-2004 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||