From c69697da810f30b712580fc6a3d2af9bc26adae1 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 14 May 2026 21:24:54 +0000
Subject: [PATCH 1/2] Initial plan
From f3d1e074711388d2d5b608163098e629132cb325 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 14 May 2026 21:45:50 +0000
Subject: [PATCH 2/2] Add XML documentation to JValue struct
Agent-Logs-Url: https://github.com/dotnet/android/sessions/a7333575-ebda-4bf1-95a4-d10a0cae606e
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
---
src/Mono.Android/Android.Runtime/JValue.cs | 70 ++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/src/Mono.Android/Android.Runtime/JValue.cs b/src/Mono.Android/Android.Runtime/JValue.cs
index 5adece43f03..db7821d928b 100644
--- a/src/Mono.Android/Android.Runtime/JValue.cs
+++ b/src/Mono.Android/Android.Runtime/JValue.cs
@@ -3,6 +3,16 @@
namespace Android.Runtime {
+ ///
+ /// Represents a JNI jvalue union, used to pass arguments to Java methods
+ /// via JNI function calls.
+ ///
+ ///
+ ///
+ /// Each constructor corresponds to one of the JNI primitive types or an object reference.
+ /// See the JNI Type Specification.
+ ///
+ ///
[StructLayout(LayoutKind.Explicit)]
public struct JValue {
#pragma warning disable 0414
@@ -17,62 +27,122 @@ public struct JValue {
[FieldOffset(0)] IntPtr l;
#pragma warning restore 0414
+ ///
+ /// A representing a JNI NULL object reference.
+ ///
public static JValue Zero = new JValue (IntPtr.Zero);
+ ///
+ /// Creates a from a value,
+ /// corresponding to the JNI jboolean type.
+ ///
+ /// The Boolean value.
public JValue (bool value)
{
this = new JValue ();
z = value;
}
+ ///
+ /// Creates a from an value,
+ /// corresponding to the JNI jbyte type.
+ ///
+ /// The signed byte value.
public JValue (sbyte value)
{
this = new JValue ();
b = value;
}
+ ///
+ /// Creates a from a value,
+ /// corresponding to the JNI jchar type.
+ ///
+ /// The character value.
public JValue (char value)
{
this = new JValue ();
c = value;
}
+ ///
+ /// Creates a from a value,
+ /// corresponding to the JNI jshort type.
+ ///
+ /// The short integer value.
public JValue (short value)
{
this = new JValue ();
s = value;
}
+ ///
+ /// Creates a from an value,
+ /// corresponding to the JNI jint type.
+ ///
+ /// The integer value.
public JValue (int value)
{
this = new JValue ();
i = value;
}
+ ///
+ /// Creates a from a value,
+ /// corresponding to the JNI jlong type.
+ ///
+ /// The long integer value.
public JValue (long value)
{
this = new JValue ();
j = value;
}
+ ///
+ /// Creates a from a value,
+ /// corresponding to the JNI jfloat type.
+ ///
+ /// The single-precision floating-point value.
public JValue (float value)
{
this = new JValue ();
f = value;
}
+ ///
+ /// Creates a from a value,
+ /// corresponding to the JNI jdouble type.
+ ///
+ /// The double-precision floating-point value.
public JValue (double value)
{
this = new JValue ();
d = value;
}
+ ///
+ /// Creates a from an value,
+ /// corresponding to a JNI jobject reference.
+ ///
+ /// The raw JNI object reference handle.
public JValue (IntPtr value)
{
this = new JValue ();
l = value;
}
+ ///
+ /// Creates a from an instance,
+ /// corresponding to a JNI jobject reference.
+ ///
+ ///
+ /// The Java object instance. If , the resulting
+ /// will contain .
+ ///
+ ///
+ /// This constructor extracts the from the
+ /// provided object, or passes if the object is .
+ ///
public JValue (IJavaObject value)
{
this = new JValue ();