public class SecurityManagerCaller extends SecurityManager implements Caller, Serializable
SecurityManager
方式获取调用者inCheck
Constructor and Description |
---|
SecurityManagerCaller() |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getCaller()
获得调用者
|
Class<?> |
getCaller(int depth)
获得调用者,指定第几级调用者 调用者层级关系:
0
CallerUtil
1 调用CallerUtil 中方法的类
2 调用者的调用者
... |
Class<?> |
getCallerCaller()
获得调用者的调用者
|
boolean |
isCalledBy(Class<?> clazz)
是否被指定类调用
|
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 Class<?> getCallerCaller()
Caller
getCallerCaller
in interface Caller
public Class<?> getCaller(int depth)
Caller
0CallerUtil
1 调用CallerUtil
中方法的类 2 调用者的调用者 ...
getCaller
in interface Caller
depth
- 层级。0表示CallerUtil
本身,1表示调用CallerUtil
的类,2表示调用者的调用者,依次类推public boolean isCalledBy(Class<?> clazz)
Caller
isCalledBy
in interface Caller
clazz
- 调用者类Copyright © 2024. All rights reserved.