-
Notifications
You must be signed in to change notification settings - Fork 52
/
CallVirtualFromConstructorBase.cs
40 lines (30 loc) · 1.31 KB
/
CallVirtualFromConstructorBase.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using Java.Interop;
using Java.Interop.GenericMarshaler;
namespace Java.InteropTests {
[JniTypeSignature (CallVirtualFromConstructorBase.JniTypeName, GenerateJavaPeer=false)]
public class CallVirtualFromConstructorBase : JavaObject {
internal const string JniTypeName = "net/dot/jni/test/CallVirtualFromConstructorBase";
readonly static JniPeerMembers _members = new JniPeerMembers (JniTypeName, typeof (CallVirtualFromConstructorBase));
public override JniPeerMembers JniPeerMembers {
get {return _members;}
}
public unsafe CallVirtualFromConstructorBase (int value)
: this (ref *InvalidJniObjectReference, JniObjectReferenceOptions.None)
{
if (PeerReference.IsValid)
return;
var peer = JniPeerMembers.InstanceMethods.StartGenericCreateInstance ("(I)V", GetType (), value);
Construct (ref peer, JniObjectReferenceOptions.CopyAndDispose);
JniPeerMembers.InstanceMethods.FinishGenericCreateInstance ("(I)V", this, value);
}
public CallVirtualFromConstructorBase (ref JniObjectReference reference, JniObjectReferenceOptions options)
: base (ref reference, options)
{
}
public virtual void CalledFromConstructor (int value)
{
_members.InstanceMethods.InvokeGenericVirtualVoidMethod ("calledFromConstructor.(I)V", this, value);
}
}
}