IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
MethodAccessor.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 MethodAccessor : Accessor<object>
12 {
13
14 MethodAccessor<Action<object, bool>> setAccessible;
15 MethodAccessor<Func<object, object, object[], object>> invoke;
16
21 public MethodAccessor(AccessorTypeResolver resolver) :
22 base(resolver, "java.lang.reflect.Method")
23 {
24
25 }
26
30 public void InvokeSetAccessible(object self, bool flag) => GetMethod(ref setAccessible, nameof(setAccessible), typeof(void), typeof(bool)).Invoker(self, flag);
31
35 public void InvokeInvoke(object self, object obj, object[] args) => GetMethod(ref invoke, nameof(invoke), typeof(object), typeof(object), typeof(object[])).Invoker(self, obj, args);
36
37 }
38
39#endif
40
41}