IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
PropertiesAccessor.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 PropertiesAccessor : Accessor<object>
12 {
13
14 MethodAccessor<Func<object, string, object>> getProperty;
15 MethodAccessor<Func<object, string, string, object>> setProperty;
16
21 public PropertiesAccessor(AccessorTypeResolver resolver) :
22 base(resolver, "java.util.Properties")
23 {
24
25 }
26
33 public object InvokeGetProperty(object self, string key) => GetMethod(ref getProperty, nameof(getProperty), typeof(string), typeof(string)).Invoker(self, key);
34
42 public object InvokeSetProperty(object self, string key, string value) => GetMethod(ref setProperty, nameof(setProperty), typeof(object), typeof(string), typeof(string)).Invoker(self, key, value);
43
44 }
45
46#endif
47
48}