public final class CallerClassSecurityManager extends SecurityManager
SecurityManager
to help get access to classes in the call stack.inCheck
Modifier and Type | Method and Description |
---|---|
static ClassLoader |
findCallerClassLoader(Class<? extends ClassLoader> classloaderType)
Finds the
ClassLoader of the given type along the caller class chain. |
static Class[] |
getCallerClasses()
Returns the current execution stack as an array of classes.
|
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
public static Class[] getCallerClasses()
SecurityManager.getClassContext()
@Nullable public static ClassLoader findCallerClassLoader(Class<? extends ClassLoader> classloaderType)
ClassLoader
of the given type along the caller class chain. It returns null
if it cannot find any.Copyright © 2023 Cask Data, Inc. Licensed under the Apache License, Version 2.0.