From c5d060edad1458005b7ef59fee6c35e3214a6111 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 27 Nov 2026 17:52:09 -0600 Subject: [PATCH 1/3] Fix Java.Interop documentation errors (R072) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../JniRuntime+CreationOptions.xml | 18 ++++----- .../JniRuntime+JniMarshalMemberBuilder.xml | 26 ++++++------- .../JniRuntime+JniTypeManager.xml | 22 +++++------ .../JniRuntime+JniValueManager.xml | 26 ++++++------- .../JniRuntime+ReflectionJniValueManager.xml | 26 ++++++------- docs/xml/Java.Interop/JniRuntime.xml | 16 ++++---- docs/xml/Java.Interop/JniTypeSignature.xml | 1 + .../JniTypeSignatureAttribute.xml | 5 ++- docs/xml/Java.Interop/JniValueMarshaler.xml | 38 +++++++++---------- .../JniValueMarshalerAttribute.xml | 4 +- .../Java.Interop/JniValueMarshalerState.xml | 2 +- docs/xml/Java.Interop/JniValueMarshaler`1.xml | 22 +++++------ docs/xml/Java.Interop/TypeManager.xml | 2 +- 13 files changed, 105 insertions(+), 103 deletions(-) diff --git a/docs/xml/Java.Interop/JniRuntime+CreationOptions.xml b/docs/xml/Java.Interop/JniRuntime+CreationOptions.xml index ccc312799..3fc4df38d 100644 --- a/docs/xml/Java.Interop/JniRuntime+CreationOptions.xml +++ b/docs/xml/Java.Interop/JniRuntime+CreationOptions.xml @@ -90,8 +90,8 @@ System.IntPtr - Gets or sets the obsolete class-loader method identifier. - An unused compatibility value. Class lookup uses Class.forName instead. + Gets or sets the class-loader method identifier, which is obsolete in .NET 10 and .NET 11 for Android. + In .NET 9 for Android, a nonzero value supplies the class loader's loadClass method identifier. In .NET 10 and .NET 11 for Android, the base runtime constructor does not use this value. In .NET 11, class lookup uses JNI FindClass and can fall back to Class.forName. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -133,7 +133,7 @@ Gets or sets the JNI environment pointer used to initialize the current thread. - A JNIEnv pointer, or when an invocation pointer is supplied instead. + A JNIEnv pointer, or to obtain one from the supplied invocation pointer. Both pointers can be supplied. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -241,8 +241,8 @@ Java.Interop.JniRuntime+JniMarshalMemberBuilder - Gets or sets the obsolete marshal member builder option. - A legacy builder value retained for compatibility; it is not used by the base runtime constructor. + Gets or sets the marshal member builder option, which is obsolete in .NET 11 for Android. + In .NET 9 and .NET 10 for Android, the builder to use when marshal member building is enabled. In .NET 11 for Android, the base runtime constructor does not use this value. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -332,7 +332,7 @@ Gets or sets the service used to map managed and JNI types. - The type manager to use. Runtime construction requires a non-null manager. + The type manager to use. In .NET 9 and .NET 10 for Android, a value selects a new base type manager. In .NET 11 for Android, runtime construction requires a non-null manager. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -358,9 +358,9 @@ System.Boolean - Gets or sets the obsolete marshal-member-builder switch. - An unused compatibility flag. Marshal member building is no longer supported. - Setting this property does not enable marshal member building. The runtime's MarshalMemberBuilder getter always throws . + Gets or sets the marshal-member-builder switch, which is obsolete in .NET 11 for Android. + In .NET 9 and .NET 10 for Android, the flag controls builder initialization and defaults to . In .NET 11 for Android, the base runtime constructor does not use this flag. + In .NET 9 and .NET 10 for Android, the runtime's MarshalMemberBuilder getter returns the initialized builder or throws if none is available. In .NET 11 for Android, the getter always throws . diff --git a/docs/xml/Java.Interop/JniRuntime+JniMarshalMemberBuilder.xml b/docs/xml/Java.Interop/JniRuntime+JniMarshalMemberBuilder.xml index afd8c7f1f..d5074a6ee 100644 --- a/docs/xml/Java.Interop/JniRuntime+JniMarshalMemberBuilder.xml +++ b/docs/xml/Java.Interop/JniRuntime+JniMarshalMemberBuilder.xml @@ -30,7 +30,7 @@ - Retains the obsolete marshal-member-builder API and its extension hooks. + Provides marshal-member-building methods and extension hooks. This API is obsolete in .NET 11 for Android. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -107,9 +107,9 @@ - The unused constructor metadata. - Always throws because marshal member building is unsupported. - No delegate is returned. + The constructor metadata. In .NET 9 and .NET 10 for Android, it is used to create the activation expression. + Compiles an activation expression in .NET 9 and .NET 10 for Android. In .NET 11 for Android, throws . + The compiled activation delegate in .NET 9 and .NET 10 for Android. No delegate is returned in .NET 11 for Android. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -132,9 +132,9 @@ - The unused managed delegate. - Always throws because marshal member building is unsupported. - No delegate is returned. + The managed delegate. In .NET 9 and .NET 10 for Android, its method is used to create the marshaling expression. + Compiles a marshaling expression in .NET 9 and .NET 10 for Android. In .NET 11 for Android, throws . + The compiled marshal-to-managed delegate in .NET 9 and .NET 10 for Android. No delegate is returned in .NET 11 for Android. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -255,9 +255,9 @@ - The unused method metadata. - Always throws because marshal member building is unsupported. - No signature is returned. + The method or constructor. In .NET 9 and .NET 10 for Android, it is used to build the signature. + Builds a JNI method signature in .NET 9 and .NET 10 for Android. In .NET 11 for Android, throws . + The JNI method signature in .NET 9 and .NET 10 for Android. No signature is returned in .NET 11 for Android. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -280,9 +280,9 @@ - The unused parameter metadata. - Always throws because marshal member building is unsupported. - No marshaler is returned. + The parameter metadata. In .NET 9 and .NET 10 for Android, it is used to select a value marshaler. + Selects a value marshaler in .NET 9 and .NET 10 for Android. In .NET 11 for Android, throws . + The selected value marshaler in .NET 9 and .NET 10 for Android. No marshaler is returned in .NET 11 for Android. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. diff --git a/docs/xml/Java.Interop/JniRuntime+JniTypeManager.xml b/docs/xml/Java.Interop/JniRuntime+JniTypeManager.xml index a68b6afc8..b71a277c4 100644 --- a/docs/xml/Java.Interop/JniRuntime+JniTypeManager.xml +++ b/docs/xml/Java.Interop/JniRuntime+JniTypeManager.xml @@ -67,7 +67,7 @@ - Marks the type manager disposed through the disposal hook. + Calls the disposal hook with disposing set to . Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -164,7 +164,7 @@ The abstract class or interface whose invoker is to be resolved. Supplies the invoker-type lookup hook. - The invoker type, or from the base implementation. + The invoker type, or if none is found. In .NET 10 for Android, the base implementation reads JniTypeSignatureAttribute and can construct a generic invoker. In .NET 11 for Android, the base implementation returns . GetInvokerType calls this hook only for an abstract class or interface. @@ -348,7 +348,7 @@ The managed type whose simple JNI name is requested. Supplies the single-name lookup hook for a managed type. - in the base implementation. + In .NET 9 and .NET 10 for Android, the base implementation returns the first name from GetSimpleReferences, or if there is none. In .NET 11 for Android, it returns . This hook does not resolve arrays in the base implementation. @@ -371,7 +371,7 @@ The managed type whose simple JNI names are requested. Supplies candidate simple JNI names for a managed type. - An empty sequence from the base implementation. + In .NET 10 for Android, the base implementation can return a name from JniTypeSignatureAttribute. In .NET 9 for Android, it returns an empty sequence for a valid non-array type. In .NET 11 for Android, it returns an empty sequence. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -461,7 +461,7 @@ The JNI type signature to resolve. Resolves one managed type for a JNI type signature. The built-in or hook-resolved type, or when no type is found. - The signature has a nonzero array rank and the type lookup hook resolves its element type. Use for array signatures. + In .NET 11 for Android, the signature has a nonzero array rank and the type lookup hook resolves its element type. Use for array signatures. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -515,7 +515,7 @@ The JNI signature whose managed candidates are requested. Supplies managed type candidates for a JNI signature. - An empty sequence from the base implementation. + In .NET 9 and .NET 10 for Android, the base implementation returns resolved candidates, including array types. In .NET 11 for Android, it returns an empty sequence. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -540,7 +540,7 @@ The simple JNI type name whose candidates are requested. Supplies managed type candidates for a simple JNI name. - An empty sequence from the base implementation. + In .NET 9 and .NET 10 for Android, the base implementation returns the built-in type for a recognized name, or an empty sequence. In .NET 11 for Android, it returns an empty sequence. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -611,9 +611,9 @@ - The managed type to describe; produces an empty sequence. + The managed type to describe. In .NET 10 and .NET 11 for Android, produces an empty sequence. Gets candidate JNI signatures for a managed type. - The built-in or hook-supplied signatures, or an empty sequence. + The mapped signatures, or an empty sequence if none are found. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -696,7 +696,7 @@ The managed type that supplies registration metadata. The method-description span for an overriding implementation. Provides the native-member registration extension point. - The modern base implementation does nothing; derived managers supply registration behavior. + In .NET 9 and .NET 10 for Android, the base implementation attempts registration using generated or attributed callbacks. In .NET 11 for Android, the base implementation does nothing; derived managers supply registration behavior. @@ -733,7 +733,7 @@ The Java class whose native methods are to be registered. The managed type that supplies registration metadata. - The optional method description for an overriding implementation. + The optional method description. The .NET 9 and .NET 10 base implementations pass it to registration callbacks. Provides the obsolete string-based native registration extension point. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. diff --git a/docs/xml/Java.Interop/JniRuntime+JniValueManager.xml b/docs/xml/Java.Interop/JniRuntime+JniValueManager.xml index 467317fce..70d72290f 100644 --- a/docs/xml/Java.Interop/JniRuntime+JniValueManager.xml +++ b/docs/xml/Java.Interop/JniRuntime+JniValueManager.xml @@ -151,7 +151,7 @@ The managed peer being initialized. The source JNI reference passed by reference. Reference-transfer and peer-registration options. - Delegates peer initialization to ConstructPeerCore. + Initializes a managed peer. In .NET 11 for Android, delegates initialization to ConstructPeerCore. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -282,7 +282,7 @@ The source JNI reference for the new managed peer. Reference-transfer options for the peer implementation. The requested peer type, or the implementation's default when . - Creates a managed peer wrapper according to the derived implementation. + Creates a managed peer wrapper for a JNI reference. The created peer, or when the implementation cannot produce a compatible peer. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -324,7 +324,7 @@ The JNI reference supplied to the conversion implementation. Reference-transfer options forwarded to the conversion implementation. The optional requested managed target type. - Creates a managed value through the creation hook after checking manager disposal. + Creates a managed value after checking manager disposal. In .NET 11 for Android, delegates creation to the creation hook. The value produced by the creation implementation. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -387,7 +387,7 @@ The JNI reference supplied to the conversion implementation. Reference-transfer options forwarded to the conversion implementation. The optional requested managed target type. - Creates a typed managed value through the creation hook. + Creates a typed managed value. In .NET 11 for Android, delegates creation to the creation hook. The value produced by the creation implementation. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -561,7 +561,7 @@ The non-null managed peer to dispose. - Runs disposal notification, removes the peer mapping, and releases its JNI reference. + In the base implementation, notifies a peer with a valid JNI reference and removes its mapping. If the reference is still valid after those calls, it disposes the reference. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -606,7 +606,7 @@ - Throws when the manager has been disposed. + Throws when the base disposal method has marked the manager as disposed. Derived operations can use this guard before accessing manager state. @@ -693,8 +693,8 @@ The Java object reference to wrap or look up. The optional managed peer type required for a reused mapping. Reuses a compatible mapped peer or creates one with transfer options. - A compatible existing or created peer, or for a zero reference or incompatible conversion. - The source reference is not consumed by this lookup. + A compatible existing peer or the creation hook's result. A zero reference returns ; the creation hook can also return for an incompatible Java object. + The source reference is passed by value, and the creation hook receives rather than a source-disposal option. @@ -754,7 +754,7 @@ The JNI reference supplied to the conversion implementation. Reference-transfer options forwarded to the conversion implementation. The optional requested managed target type. - Looks up or converts a managed value through the lookup hook. + Looks up or converts a managed value. In .NET 11 for Android, delegates lookup to the lookup hook. The existing or converted value produced by the lookup implementation. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -863,7 +863,7 @@ The JNI reference supplied to the conversion implementation. Reference-transfer options forwarded to the conversion implementation. The optional requested managed target type. - Looks up or converts a typed managed value through the lookup hook. + Looks up or converts a typed managed value. In .NET 11 for Android, delegates lookup to the lookup hook. The existing or converted value produced by the lookup implementation. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -989,7 +989,7 @@ The managed type requiring a value marshaler. - Gets a marshaler through the type-based lookup hook. + Gets a marshaler for a managed type. In .NET 11 for Android, delegates lookup to the type-based hook. The marshaler returned by the implementation. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1022,7 +1022,7 @@ The managed value type requiring a marshaler. - Gets a typed marshaler through the generic lookup hook. + Gets a typed marshaler. In .NET 11 for Android, delegates lookup to the generic hook. The typed marshaler returned by the implementation. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1048,7 +1048,7 @@ The managed type requiring a marshaler. Defines the type-based value-marshaler lookup policy. - The marshaler selected by the derived implementation. + The selected marshaler. In .NET 9 and .NET 10 for Android, the base implementation returns a proxy marshaler. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. diff --git a/docs/xml/Java.Interop/JniRuntime+ReflectionJniValueManager.xml b/docs/xml/Java.Interop/JniRuntime+ReflectionJniValueManager.xml index df24612d8..89daa4b4e 100644 --- a/docs/xml/Java.Interop/JniRuntime+ReflectionJniValueManager.xml +++ b/docs/xml/Java.Interop/JniRuntime+ReflectionJniValueManager.xml @@ -78,7 +78,7 @@ The constructor to invoke on the allocated instance. The constructor argument values. Allocates an uninitialized managed peer and invokes its activation constructor. - Activation failures are wrapped in with diagnostic peer information. + If diagnostic collection succeeds, activation failures are wrapped in with peer information. @@ -103,7 +103,7 @@ The non-null managed peer being initialized. The source reference subject to the supplied transfer options. Reference-copy, source-disposal, and registration flags. - Initializes peer reference ownership, identity hash, and runtime registration. + Unless initialization is deferred or an existing activation reference is reused, initializes the peer reference and identity hash and registers the peer when the options permit it. permits deferred initialization when the peer has no reference. Existing activation peers can reuse their assigned reference. @@ -136,7 +136,7 @@ The managed argument to marshal. Creates a local reference from temporary object-reference argument state. A new local reference, or an invalid reference when no native argument reference was produced. - Temporary marshaler state is destroyed in a block after the local reference is created. + Temporary marshaler state is destroyed in a block, including when no valid reference is produced or local-reference creation fails. @@ -246,9 +246,9 @@ The source JNI reference to convert. Source-reference transfer options. - The optional managed target type; otherwise, the runtime type is used. + The optional managed target type. When it is omitted, an existing proxy value can be returned directly, or the runtime type can be used if available. Creates a managed value using peer, proxy, or selected value-marshaler conversion. - The converted value, or for a zero JNI reference. + The converted value, which can be . A zero JNI reference returns . A known managed proxy can be unwrapped and converted with Convert.ChangeType. @@ -309,8 +309,8 @@ Source-reference transfer options. The requested compatible runtime target, or typeof(T) when . Creates a typed managed value after validating the requested target type. - The converted typed value, or default(T) for a zero reference. - A not assignable to causes . + The converted typed value, which can be default(T). A zero reference returns default(T). + For a valid JNI reference, a not assignable to causes . @@ -347,9 +347,9 @@ The source JNI reference to convert. Source-reference transfer options. - The optional managed target type; otherwise, the runtime type is used. + The optional managed target type. When it is omitted, an existing mapped value can be reused, or the runtime type can be used if available. Reuses a compatible existing mapped value before selecting a converter. - The reused or converted value, or for a zero reference. + The reused or converted value, which can be . A zero reference returns . Source disposal options also apply when an existing value is reused. @@ -410,8 +410,8 @@ Source-reference transfer options. The requested compatible runtime target, or typeof(T) when . Reuses a compatible mapped value or converts it to the requested managed type. - The reused or converted typed value, or default(T) for a zero reference. - A requested must be assignable to . + The reused or converted typed value, which can be default(T). A zero reference returns default(T). + For a valid JNI reference, a requested must be assignable to . @@ -499,9 +499,9 @@ The source reference passed to the activation constructor by reference. Reference-transfer options passed to the constructor and subsequent disposal. The type whose public or non-public activation constructor is searched. - Invokes an activation constructor and applies reference-transfer cleanup. + Invokes a matching activation constructor. If invocation succeeds, applies reference-transfer cleanup. when a matching constructor was invoked; otherwise, . - Searches for (ref JniObjectReference, JniObjectReferenceOptions), updates from the invocation arguments, then applies source disposal. + Searches for (ref JniObjectReference, JniObjectReferenceOptions). After a successful invocation, updates from the invocation arguments, then applies source disposal. diff --git a/docs/xml/Java.Interop/JniRuntime.xml b/docs/xml/Java.Interop/JniRuntime.xml index b99b7f30a..ad2c89e72 100644 --- a/docs/xml/Java.Interop/JniRuntime.xml +++ b/docs/xml/Java.Interop/JniRuntime.xml @@ -104,7 +104,7 @@ Gets the selected managed Java runtime. - The current runtime: the runtime most recently passed to SetCurrent, or the first runtime constructed while no runtime was current. If no runtime is current, the getter returns the only registered runtime. + The current runtime: the runtime most recently passed to SetCurrent, or the first runtime constructed while no runtime was current. If no runtime is current, the getter returns the only registered runtime. It throws if there are no registered runtimes or more than one. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -149,7 +149,7 @@ - Releases runtime services, unregisters this runtime, and suppresses finalization. + Calls the disposal hook with disposing set to and suppresses finalization. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -249,7 +249,7 @@ - Unregisters the runtime through finalizer-mode disposal. + Calls the disposal hook with disposing set to . Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -371,7 +371,7 @@ The Java throwable reference to convert. Reference transfer options passed to the value manager. Converts a Java throwable reference to a managed exception through the value manager. - The managed exception returned by the value manager, or for a null Java reference. + The managed exception returned by the value manager. The reflection-based value manager returns for an invalid reference. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -466,7 +466,7 @@ Gets this runtime's Java VM invocation pointer. - The JavaVM pointer, or after runtime disposal completes. + The JavaVM pointer, or after the base disposal method completes. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -513,8 +513,8 @@ Java.Interop.JniRuntime+JniMarshalMemberBuilder - Gets the unsupported legacy marshal member builder. - No value is returned. The getter always throws . + Gets the marshal member builder, which is unsupported in .NET 11 for Android. + In .NET 9 and .NET 10 for Android, the initialized builder. If no builder is available, the getter throws . In .NET 11 for Android, the getter always throws . Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -669,7 +669,7 @@ Gets the service that maps managed and JNI types. - The type manager supplied during runtime creation. + The type manager used by the runtime. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. diff --git a/docs/xml/Java.Interop/JniTypeSignature.xml b/docs/xml/Java.Interop/JniTypeSignature.xml index 0bc7fd331..e28cdf6a0 100644 --- a/docs/xml/Java.Interop/JniTypeSignature.xml +++ b/docs/xml/Java.Interop/JniTypeSignature.xml @@ -277,6 +277,7 @@ Gets the JNI name used to identify the represented type. for a non-array type, or for an array type. + The simple reference is and either the array rank is zero or the signature's keyword flag is . Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. diff --git a/docs/xml/Java.Interop/JniTypeSignatureAttribute.xml b/docs/xml/Java.Interop/JniTypeSignatureAttribute.xml index 7fa55f08c..bea152bc5 100644 --- a/docs/xml/Java.Interop/JniTypeSignatureAttribute.xml +++ b/docs/xml/Java.Interop/JniTypeSignatureAttribute.xml @@ -93,8 +93,9 @@ Gets or sets whether to generate a Java callable wrapper for the managed type. - to request a Java callable wrapper; otherwise, . + to allow a Java callable wrapper; to suppress one when this property is explicitly set. + The property defaults to . When the property is omitted from the attribute, the Java callable wrapper tooling does not suppress generation. Set the property explicitly to to suppress generation. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -133,7 +134,7 @@ Gets or sets the managed invoker type used for an abstract class or interface. The invoker type, or if no invoker type is specified. - The reflection type manager reads this value when it resolves an invoker for an abstract class or interface. It does not construct invoker types for generic types. + In .NET 10 for Android, the base type manager can use this value to construct a generic invoker. In .NET 11 for Android, the reflection type manager reads this value when it resolves an invoker for an abstract class or interface, but throws if the type is generic. diff --git a/docs/xml/Java.Interop/JniValueMarshaler.xml b/docs/xml/Java.Interop/JniValueMarshaler.xml index 1ab220f1e..408ade8f3 100644 --- a/docs/xml/Java.Interop/JniValueMarshaler.xml +++ b/docs/xml/Java.Interop/JniValueMarshaler.xml @@ -26,7 +26,7 @@ - Defines managed-to-JNI value conversion and argument-state cleanup. + Defines conversion between managed values and JNI, and argument-state cleanup. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -74,9 +74,9 @@ The managed argument to marshal. - Copy-direction flags passed to the object-reference state creator. - Creates argument state through CreateObjectReferenceArgumentState. - The state returned by the object-reference state creator. + Copy-direction flags. The base implementation passes them to the object-reference state creator. + Creates argument state. The base implementation delegates to CreateObjectReferenceArgumentState. + The argument state. In the base implementation, this is the state returned by the object-reference state creator. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -140,11 +140,11 @@ - Collects generated locals, setup statements, and cleanup statements. + Collects generated locals, setup statements, and cleanup statements in the base implementation. The managed source parameter expression. - Copy-direction flags passed to argument-state creation and cleanup. - Builds setup and cleanup expressions for a managed argument's JNI handle. - A local-variable expression containing the argument reference handle. + Copy-direction flags. The base implementation passes them to argument-state creation and cleanup. + Creates an expression for a managed argument's JNI representation. The base implementation adds setup and cleanup for a JNI object reference. + The expression for the JNI argument. In the base implementation, this is the local variable containing the reference handle. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -187,12 +187,12 @@ - Collects generated locals and marshaler construction. - The incoming JNI handle expression. - Reserved synchronization flags; the base implementation does not use them. - The requested managed type, or to leave the call result unconverted. - Builds an expression that converts a JNI handle through CreateValue. - The marshaler call expression, optionally converted to . + Collects generated locals and marshaler construction in the base implementation. + The incoming JNI argument expression. + Synchronization flags. The base implementation does not use them. + The requested managed type. In the base implementation, leaves the call result unconverted. + Creates an expression that converts a JNI argument to a managed value. The base implementation converts a JNI handle through CreateValue. + The expression for the managed argument. In the base implementation, it is the marshaler call, optionally converted to . Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -226,10 +226,10 @@ - Collects argument-state setup, cleanup, and the JNI return local. + Collects argument-state setup, cleanup, and the JNI return local in the base implementation. The managed return-value parameter expression. - Builds expressions that marshal a managed value and transfer a local JNI reference. - The expression for the JNI return-handle local. + Creates expressions for a managed return value. The base implementation prepares a JNI return handle. + The expression for the JNI return value. In the base implementation, it is the local variable for a JNI reference handle; the handle is zero if the marshaled reference is invalid. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -400,8 +400,8 @@ Collects the return local and its assignment. The prefix for the generated return-variable name. The expression to transfer as a JNI return. - Adds an expression that creates and transfers a local JNI return reference. - The local-variable expression containing the transferred handle. + Adds an expression that prepares a JNI return handle. + The local-variable expression containing a local reference handle, or zero if the source reference is invalid. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. diff --git a/docs/xml/Java.Interop/JniValueMarshalerAttribute.xml b/docs/xml/Java.Interop/JniValueMarshalerAttribute.xml index 134ad17e9..6b698f714 100644 --- a/docs/xml/Java.Interop/JniValueMarshalerAttribute.xml +++ b/docs/xml/Java.Interop/JniValueMarshalerAttribute.xml @@ -57,7 +57,7 @@ - A non-null type derived from . + A non-null type or a type derived from it. Creates an attribute that identifies the specified value marshaler type. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -85,7 +85,7 @@ Gets the value marshaler type specified by this attribute. - The type derived from that was supplied to the constructor. + The type or derived type supplied to the constructor. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. diff --git a/docs/xml/Java.Interop/JniValueMarshalerState.xml b/docs/xml/Java.Interop/JniValueMarshalerState.xml index e84ffb57f..ad37f996e 100644 --- a/docs/xml/Java.Interop/JniValueMarshalerState.xml +++ b/docs/xml/Java.Interop/JniValueMarshalerState.xml @@ -336,7 +336,7 @@ Gets the JNI reference stored by this state. - The supplied reference or managed peer reference, or a default reference for an argument-only state. + The supplied reference or managed peer reference, or a default reference for an argument-only state or a null peer. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. diff --git a/docs/xml/Java.Interop/JniValueMarshaler`1.xml b/docs/xml/Java.Interop/JniValueMarshaler`1.xml index 23907b635..e87028530 100644 --- a/docs/xml/Java.Interop/JniValueMarshaler`1.xml +++ b/docs/xml/Java.Interop/JniValueMarshaler`1.xml @@ -112,9 +112,9 @@ The typed managed argument. - Flags forwarded to the typed object-reference state creator. - Creates typed argument state through CreateGenericObjectReferenceArgumentState. - The state returned by the typed object-reference state creator. + Copy-direction flags. The base implementation forwards them to the typed object-reference state creator. + Creates typed argument state. The base implementation delegates to CreateGenericObjectReferenceArgumentState. + The argument state. In the base implementation, this is the state returned by the typed object-reference state creator. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -255,10 +255,10 @@ The source JNI reference. - Source-reference transfer options forwarded to CreateGenericValue. - The requested target type, or typeof(T) when . - Converts a JNI reference through the typed conversion implementation. - The CreateGenericValue result exposed as an object. + Source-reference transfer options. The generic base implementation forwards them to CreateGenericValue. + The requested target type. The generic base implementation uses typeof(T) when this is . + Converts a JNI reference to a managed value. The generic base implementation calls CreateGenericValue. + The managed value. In the generic base implementation, this is the CreateGenericValue result exposed as an object. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -283,10 +283,10 @@ - The original value, cast directly to . - The state passed by reference to typed cleanup. - Flags forwarded to DestroyGenericArgumentState. - Casts the original value to and invokes typed state cleanup. + The original value. The generic base implementation casts it to . + The state to clean up. The generic base implementation passes it by reference to typed cleanup. + Copy-direction flags. The generic base implementation forwards them to DestroyGenericArgumentState. + Cleans up argument state. The generic base implementation casts the value to and invokes typed cleanup. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. diff --git a/docs/xml/Java.Interop/TypeManager.xml b/docs/xml/Java.Interop/TypeManager.xml index 96cf22245..8cf1d04f0 100644 --- a/docs/xml/Java.Interop/TypeManager.xml +++ b/docs/xml/Java.Interop/TypeManager.xml @@ -140,7 +140,7 @@ The Java class name to map. The managed type to register. - Legacy implementations add a mapping only when the Java class name is unregistered. Newer implementations throw ; use [Register] on Java peer types instead. + Adds a mapping only when the Java class name is unregistered. Use [Register] on Java peer types instead. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. From 52927423db19aa026d3b907e216a458b7ed1a050 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 27 Nov 2026 18:00:39 -0600 Subject: [PATCH 2/3] Clarify peer disposal for servicing releases Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- docs/xml/Java.Interop/JniRuntime+JniValueManager.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/xml/Java.Interop/JniRuntime+JniValueManager.xml b/docs/xml/Java.Interop/JniRuntime+JniValueManager.xml index 70d72290f..cb0330c49 100644 --- a/docs/xml/Java.Interop/JniRuntime+JniValueManager.xml +++ b/docs/xml/Java.Interop/JniRuntime+JniValueManager.xml @@ -585,7 +585,7 @@ The non-null managed peer whose mapping is inspected. - Releases the peer reference unless the mapping still points to this managed instance. + In the base implementation, starts disposal when the peer has a valid reference and is not mapped to the same instance. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. From e8b6e37e92cf7bc0cd0f58b1dbf2490aa3359762 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 27 Nov 2026 18:03:18 -0600 Subject: [PATCH 3/3] Clarify the generic invoker exception condition Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- docs/xml/Java.Interop/JniTypeSignatureAttribute.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/xml/Java.Interop/JniTypeSignatureAttribute.xml b/docs/xml/Java.Interop/JniTypeSignatureAttribute.xml index bea152bc5..678a4f916 100644 --- a/docs/xml/Java.Interop/JniTypeSignatureAttribute.xml +++ b/docs/xml/Java.Interop/JniTypeSignatureAttribute.xml @@ -134,7 +134,7 @@ Gets or sets the managed invoker type used for an abstract class or interface. The invoker type, or if no invoker type is specified. - In .NET 10 for Android, the base type manager can use this value to construct a generic invoker. In .NET 11 for Android, the reflection type manager reads this value when it resolves an invoker for an abstract class or interface, but throws if the type is generic. + In .NET 10 for Android, the base type manager can use this value to construct a generic invoker. In .NET 11 for Android, the reflection type manager reads this value when it resolves an invoker for an abstract class or interface, but throws if the type is generic and this value is not .