Class CallStack


  • public class CallStack
    extends java.lang.SecurityManager
    Provides classes (and not just class names) of the call stack.

    NOTE: Extending SecurityManager is a convenient hack that works for Java 8 through 19. StackWalker would be preferred when the compatibility level gets raised to Java 9.

    • Constructor Summary

      Constructors 
      Constructor Description
      CallStack()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<?>[] getCallingClasses()  
      • Methods inherited from class java.lang.SecurityManager

        checkAccept, checkAccess, checkAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkWrite, checkWrite, getClassContext, getSecurityContext, getThreadGroup
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CallStack

        public CallStack()
    • Method Detail

      • getCallingClasses

        public java.lang.Class<?>[] getCallingClasses()