Java.Interop Namespace

Provides managed JNI runtime services, Java object peers, and value marshaling.

Classes

Name Description
AndroidEventHelper

Provides the obsolete weak-listener helper replaced by EventHelper.

BaseExportAttribute

Provides the common base for Java export metadata attributes.

DoNotPackageAttribute

An obsolete assembly attribute for a Java archive packaging exclusion.

EventHelper

Maintains weakly referenced listener implementors for generated event accessors.

ExportAttribute

Used on a method to indicate Java code generator to export a Java method that becomes an Android Callable Wrapper (ACW).

ExportFieldAttribute

Used on a method to indicate Java code generator to export a Java field which will be initialized by the managed method.

ExportParameterAttribute

Within the method that is marked with T:Java.Introp.ExportAttribute , specify the actual Java type of the corresponding parameter or return value.

JavaArray<T>

Provides indexed access to a fixed-length Java array.

JavaBooleanArray

Provides managed and native element access for a Java boolean array.

JavaCharArray

Provides managed and native element access for a Java char array.

JavaDoubleArray

Provides managed and native element access for a Java double array.

JavaException

The Throwable class is the superclass of all errors and exceptions in the Java language.

JavaInt16Array

Provides managed and native element access for a Java short array.

JavaInt32Array

Provides managed and native element access for a Java int array.

JavaInt64Array

Provides managed and native element access for a Java long array.

JavaInterfaceDefaultMethodAttribute

Marks a binding method as a Java default interface method.

JavaLibraryReferenceAttribute

An unsupported assembly attribute that stores a Java library file name.

JavaObject

Class Object is the root of the class hierarchy.

JavaObjectArray<T>

Provides managed element access to a fixed-length Java object array.

JavaObjectExtensions

Provides Java peer casts and legacy collection conversion helpers.

JavaPeerableExtensions

Extension methods on IJavaPeerable.

JavaPeerAliasesAttribute

Attribute applied to generated alias holder types. When multiple .NET types map to the same JNI name (e.g., JavaCollection and JavaCollection<T> both map to "java/util/Collection"), the base JNI name entry points to a plain holder class annotated with this attribute, which lists the indexed TypeMap keys for each alias type.

JavaPeerProxy

Base attribute class for generated proxy types that enable AOT-safe type mapping between Java and .NET types.

JavaPrimitiveArray<T>

Provides managed copying and native buffer access for a Java primitive array.

JavaSByteArray

Provides managed and native element access for a Java byte array.

JavaSingleArray

Provides managed and native element access for a Java float array.

JavaTypeParametersAttribute

Records Java generic type parameter declarations for a managed class, interface, or method.

JniAddNativeMethodRegistrationAttribute

Identifies a static method that supplies native method registrations to the runtime.

JniArrayElements

Controls managed access to a JNI primitive-array element buffer.

JniBooleanArrayElements

Provides typed access to an acquired Java boolean array buffer.

JniCharArrayElements

Provides typed access to an acquired Java char array buffer.

JniConstructorSignatureAttribute

Associates a managed constructor with a JNI constructor signature.

JniDoubleArrayElements

Provides typed access to an acquired Java double array buffer.

JniEnvironment

Provides the current thread's JNI environment and managed JNI operation helpers.

JniEnvironment.Arrays

Provides Java array allocation, copying, element access, and marshaling.

JniEnvironment.Exceptions

Inspects pending Java exceptions and raises exceptions through JNI.

JniEnvironment.InstanceFields

Provides direct JNI lookup and typed access for Java instance fields.

JniEnvironment.InstanceMethods

Provides JNI instance method lookup and virtual and nonvirtual calls.

JniEnvironment.IO

Exposes JNI access to direct Java buffer memory.

JniEnvironment.Monitors

Enters and exits Java object monitors through JNI.

JniEnvironment.Object

Allocates Java objects and invokes their constructors and toString methods.

JniEnvironment.References

JNI Reference-related functionality.

JniEnvironment.StaticFields

Provides direct JNI lookup and typed access for Java static fields.

JniEnvironment.StaticMethods

Provides JNI static method lookup and calls.

JniEnvironment.Strings

Creates Java strings, copies their UTF-16 content, and manages native character access.

JniEnvironment.Types

Provides Java class lookup, type queries, and native method registration.

JniFieldInfo

Stores a JNI field identifier and whether the field is static.

JniInt16ArrayElements

Provides typed access to an acquired Java short array buffer.

JniInt32ArrayElements

Provides typed access to an acquired Java int array buffer.

JniInt64ArrayElements

Provides typed access to an acquired Java long array buffer.

JniMarshal

Provides JNI callback invocation helpers and recursive value comparison.

JniMemberSignatureAttribute

Provides the Java member name and JNI signature for a managed member.

JniMethodInfo

Stores a JNI method identifier and whether the method is static.

JniMethodSignatureAttribute

Associates a managed method with a Java method name and JNI signature.

JniPeerMembers

Holds Java peer type metadata and cached field and method access helpers.

JniPeerMembers.JniInstanceFields

Caches field identifiers and provides typed access to Java instance fields.

JniPeerMembers.JniInstanceMethods

Caches JNI constructors and methods and dispatches calls on Java peers.

JniPeerMembers.JniStaticFields

Caches field identifiers and provides typed access to Java static fields.

JniPeerMembers.JniStaticMethods

Caches JNI static methods and invokes them with runtime lookup fallbacks.

JniRuntime

Coordinates a Java VM, JNI references, managed peers, and type conversion services.

JniRuntime.CreationOptions

Configures JNI pointers and services for a managed Java runtime.

JniRuntime.JniMarshalMemberBuilder

Retains the obsolete marshal-member-builder API and its extension hooks.

JniRuntime.JniObjectReferenceManager

Provides JNI reference creation, deletion, accounting, and diagnostic hooks.

JniRuntime.JniTypeManager

Manages bound Java types.

JniRuntime.JniValueManager

Defines managed peer registration, lifetime control, and JNI value conversion.

JniRuntime.ReflectionJniTypeManager

Resolves JNI types and native registration callbacks using managed reflection.

JniRuntime.ReflectionJniValueManager

Implements peer construction and value conversion using managed reflection.

JniSByteArrayElements

Provides typed access to an acquired Java byte array buffer.

JniSingleArrayElements

Provides typed access to an acquired Java float array buffer.

JniSurfacedPeerInfo

Associates a Java identity hash code with a weak reference to its managed peer.

JniType

Owns a global JNI class reference and provides member lookup and native method registration.

JniTypeSignatureAttribute

Specifies the JNI type name and array information for a managed type.

JniValueMarshaler

Defines managed-to-JNI value conversion and argument-state cleanup.

JniValueMarshaler<T>

Supplies typed conversion and argument-state operations for a managed value type.

JniValueMarshalerAttribute

Specifies the managed type used to marshal a value between managed code and JNI.

Runtime

Exposes Android JNI reference counts and managed peer diagnostics.

TypeManager

Provides legacy Java-to-managed name lookup and explicit type mapping.

Structs

Name Description
JniArgumentValue

Stores one JNI argument in a union of primitive values and an object reference handle.

JniMemberSignature

Stores a Java member name and its JNI signature.

JniNativeMethod

Blittable JNI native method registration for use with raw function pointers. Layout matches JNI's JNINativeMethod struct exactly.

JniNativeMethodRegistration

Describes a Java native method implemented by a managed delegate.

JniNativeMethodRegistrationArguments

Supplies the registration collection and method description to a native registration callback.

JniObjectReference

Stores a JNI object handle and reference type without creating a new JNI reference.

JniRuntime.ReplacementMethodInfo

Describes a source JNI method and its replacement target.

JniTransition

Tracks a JNI transition and defers a pending managed exception until disposal.

JniTypeSignature

Describes a JNI type using its simple reference, array rank, and primitive descriptor state.

JniValueMarshalerState

Retains a JNI argument, its reference or managed peer, and additional marshaler state.

Interfaces

Name Description
IAndroidCallableWrapper

Interface for proxy types that represent Android Callable Wrappers (ACW). ACW types are .NET types that have a corresponding generated Java class which calls back into .NET via JNI native methods.

IJavaPeerable

Support for using Java object instances.

IJniNameProviderAttribute

Exposes a Java name from a managed custom attribute.

Enums

Name Description
ExportParameterKind

Within the method that is marked with T:Java.Introp.ExportAttribute , specify the actual Java type of the corresponding parameter or return value in T:Java.Introp.ExportParameterAttribute.

JniManagedPeerStates

Managed peer states.

JniObjectReferenceOptions

Controls reference copying, source disposal, and managed peer registration.

JniObjectReferenceType

Identifies the kind of a JNI object reference.

JniReleaseArrayElementsMode

Specifies how a copied JNI primitive-array elements buffer is released.

JniVersion

Identifies a version of the Java Native Interface.

Remarks

JniRuntime configures runtime services, and IJavaPeerable exposes the state of a managed Java peer. JniObjectReference stores a JNI handle. Copying that managed value does not create another JNI reference; use its reference-creation methods when a separate JNI reference is needed.