Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Cryptix V3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## java.lang
Class IJCE_ClassLoaderDepth

    java.lang.Object
      |
      +--java.lang.IJCE_ClassLoaderDepth

public class IJCE_ClassLoaderDepth
extends Object

This class is a gross hack. It allows IJCE to obtain the current class loader depth (the number of stack frames after the last method in this thread that was part of a class loaded by a ClassLoader).

Since `ClassLoader.classLoaderDepth()` is protected, and since the JDK does not allow creating a security manager after one has already been installed, this requires having code in the java.lang package.

Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.1.1.1 $

Since:
  IJCE 1.0.1
Author:
  David Hopwood

Method Summary
`static int` | `classLoaderDepth()` Gets the current classLoaderDepth (assuming there is a security manager installed).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### classLoaderDepth

    public static int classLoaderDepth()

  Gets the current classLoaderDepth (assuming there is a security manager installed). This will be 1 if this method was called directly by a class with a ClassLoader, 2 if there is one intervening stack frame, etc.

  If there is no ClassLoader in the call stack of the current thread, -1 is returned. If there is no security manager installed, -2 is returned.

  This should only be used to implement higher-level security primitives; never directly to make security decisions.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Cryptix V3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) 1995-2000 The Cryptix Foundation Ltd. All rights reserved.