IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
DotNetAsynchronousSocketChannelImplAccessor.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 DotNetAsynchronousSocketChannelImplAccessor : Accessor<object>
12 {
13
14 Type javaIoFileDescriptor;
15 Type javaNetSocketAddress;
16 Type sunNioChDotNetAsynchronousChannelGroup;
17
18 MethodAccessor<Func<object, object>> init1;
19 MethodAccessor<Func<object, bool, object>> init2;
20 MethodAccessor<Func<object, object, object, object>> init3;
21 FieldAccessor<object, object> fd;
22 MethodAccessor<Action<object>> begin;
23 MethodAccessor<Action<object>> end;
24 MethodAccessor<Action<object>> enableReading;
25 MethodAccessor<Action<object>> enableWriting;
26 MethodAccessor<Action<object, bool>> enableReading2;
27 MethodAccessor<Action<object, bool>> enableWriting2;
28
33 public DotNetAsynchronousSocketChannelImplAccessor(AccessorTypeResolver resolver) :
34 base(resolver, "sun.nio.ch.DotNetAsynchronousSocketChannelImpl")
35 {
36
37 }
38
39 Type JavaIoFileDescriptor => Resolve(ref javaIoFileDescriptor, "java.io.FileDescriptor");
40
41 Type SunNioChDotNetAsynchronousChannelGroup => Resolve(ref sunNioChDotNetAsynchronousChannelGroup, "sun.nio.ch.DotNetAsynchronousChannelGroup");
42
43 Type JavaNetInetSocketAddress => Resolve(ref javaNetSocketAddress, "java.net.InetSocketAddress");
44
45 public object Init(object group) => GetConstructor(ref init1, SunNioChDotNetAsynchronousChannelGroup).Invoker(group);
46
47 public object Init(object group, bool failIfGroupShutdown) => GetConstructor(ref init2, SunNioChDotNetAsynchronousChannelGroup, typeof(bool)).Invoker(group, failIfGroupShutdown);
48
49 public object Init(object group, object fd, object remote) => GetConstructor(ref init3, SunNioChDotNetAsynchronousChannelGroup, JavaIoFileDescriptor, JavaNetInetSocketAddress).Invoker(group, fd, remote);
50
51 public object GetFd(object self) => GetField(ref fd, nameof(fd)).GetValue(self);
52
53 public void SetFd(object self, object value) => GetField(ref fd, nameof(fd)).SetValue(self, value);
54
55 public void InvokeBegin(object self) => GetMethod(ref begin, nameof(begin), typeof(void)).Invoker(self);
56
57 public void InvokeEnd(object self) => GetMethod(ref end, nameof(end), typeof(void)).Invoker(self);
58
59 public void InvokeEnableReading(object self) => GetMethod(ref enableReading, "enableReading", typeof(void)).Invoker(self);
60
61 public void InvokeEnableWriting(object self) => GetMethod(ref enableWriting, "enableWriting", typeof(void)).Invoker(self);
62
63 public void InvokeEnableReading(object self, bool killed) => GetMethod(ref enableReading2, "enableReading", typeof(void), typeof(bool)).Invoker(self, killed);
64
65 public void InvokeEnableWriting(object self, bool killed) => GetMethod(ref enableWriting2, "enableWriting", typeof(void), typeof(bool)).Invoker(self, killed);
66
67 }
68
69#endif
70
71}
IKVM.Reflection.Type Type