IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
AccessControllerAccessor.cs
Go to the documentation of this file.
1using System;
2
4{
5
6#if FIRST_PASS == false && EXPORTER == false && IMPORTER == false
7
11 internal sealed class AccessControllerAccessor : Accessor<object>
12 {
13
14 Type ikvmInternalCallerID;
15 Type javaSecurityPrivilegedAction;
16 Type javaSecurityAccessControlContext;
17
18 MethodAccessor<Func<object, object>> doPrivileged;
19 MethodAccessor<Func<object, object, object>> doPrivileged2;
20 MethodAccessor<Func<object, object, object, object>> doPrivileged3;
21
26 public AccessControllerAccessor(AccessorTypeResolver resolver) :
27 base(resolver, "java.security.AccessController")
28 {
29
30 }
31
32 Type IkvmInternalCallerID => Resolve(ref ikvmInternalCallerID, "ikvm.internal.CallerID");
33
34 Type JavaSecurityPrivilegedAction => Resolve(ref javaSecurityPrivilegedAction, "java.security.PrivilegedAction");
35
36 Type JavaSecurityAccessControlContext => Resolve(ref javaSecurityAccessControlContext, "java.security.AccessControlContext");
37
43 public object InvokeDoPrivileged(object action) => GetMethod(ref doPrivileged, nameof(doPrivileged), typeof(object), JavaSecurityPrivilegedAction).Invoker(action);
44
50 public object InvokeDoPrivileged(object action, object accessControlContext) => GetMethod(ref doPrivileged2, "doPrivileged", typeof(object), JavaSecurityPrivilegedAction, JavaSecurityAccessControlContext).Invoker(action, accessControlContext);
51
57 public object InvokeDoPrivileged(object action, object accessControlContext, object callerID) => GetMethod(ref doPrivileged3, "doPrivileged", typeof(object), JavaSecurityPrivilegedAction, JavaSecurityAccessControlContext, IkvmInternalCallerID).Invoker(action, accessControlContext, callerID);
58
59 }
60
61#endif
62
63}
IKVM.Reflection.Type Type