Table of Contents

Interface IJavaType

Namespace
MASES.JCOBridge.C2JBridge.JVMInterop
Assembly
C2JBridge.dll

Generic interface representing a Java type (class or interface) accessible through the JNI bridge. Provides constructor invocation, static method invocation, static field access, and type metadata for the corresponding JVM class.

public interface IJavaType : IDisposable
Inherited Members
Extension Methods

Properties

IsArray

Gets a value indicating whether this IJavaType represents a Java array type.

bool IsArray { get; }

Property Value

bool

true if the underlying Java type is an array (e.g. int[], String[]); otherwise false.

IsPrimitiveConvertible

Gets a value indicating whether this IJavaType is primitive-convertible, meaning it maps to a boxed primitive or to string.

bool IsPrimitiveConvertible { get; }

Property Value

bool

true if the type can be directly converted to or from a .NET primitive or string without wrapping in an IJavaObject; otherwise false.

Remarks

This property returns true for all raw primitive types (e.g. bool, byte, int, …) as well as for string, which is treated as primitive-convertible by the bridge.

IsRawPrimitive

Gets a value indicating whether this IJavaType represents a raw primitive type, such as bool, byte, int, and so on.

bool IsRawPrimitive { get; }

Property Value

bool

true if the underlying Java type is a JVM primitive; otherwise false.

JniClassName

Gets the class name of this Java type in JNI descriptor notation (e.g. "java/lang/String" for java.lang.String, "[I" for int[]).

string JniClassName { get; }

Property Value

string

Name

Gets the fully qualified name of this Java type as used in .NET (e.g. "java.lang.String").

string Name { get; }

Property Value

string

SuperClass

Gets the IJavaType representing the direct superclass of this type.

IJavaType SuperClass { get; }

Property Value

IJavaType

The superclass IJavaType, or null if this type is java.lang.Object or a primitive type that has no superclass.

Methods

GetField(string)

Reads the value of a static field on the underlying JVM class.

object GetField(string fieldName)

Parameters

fieldName string

The name of the Java static field to read.

Returns

object

The field value as a boxed object. Reference types are returned as IJavaObject instances; primitive types are boxed to their .NET equivalents.

Exceptions

InvalidOperationException

Thrown if no static field named fieldName is found on the underlying Java class.

GetField<TReturn>(string)

Reads the value of a static field on the underlying JVM class and casts it to TReturn.

TReturn GetField<TReturn>(string fieldName)

Parameters

fieldName string

The name of the Java static field to read.

Returns

TReturn

The field value cast to TReturn.

Type Parameters

TReturn

The expected field type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, and Enum.

Exceptions

InvalidOperationException

Thrown if no static field named fieldName is found on the underlying Java class.

InvalidCastException

Thrown if the actual field value cannot be cast to TReturn.

Invoke(string)

Invokes a static method on the underlying JVM class with no arguments.

object Invoke(string methodName)

Parameters

methodName string

The name of the Java static method to invoke.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found on the underlying Java class.

Invoke(string, object)

Invokes a static method on the underlying JVM class with 1 argument.

object Invoke(string methodName, object arg0)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument type.

Invoke(string, object, object)

Invokes a static method on the underlying JVM class with 2 arguments.

object Invoke(string methodName, object arg0, object arg1)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

Invoke(string, object, object, object)

Invokes a static method on the underlying JVM class with 3 arguments.

object Invoke(string methodName, object arg0, object arg1, object arg2)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

Invoke(string, object, object, object, object)

Invokes a static method on the underlying JVM class with 4 arguments.

object Invoke(string methodName, object arg0, object arg1, object arg2, object arg3)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

Invoke(string, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 5 arguments.

object Invoke(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

Invoke(string, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 6 arguments.

object Invoke(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

Invoke(string, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 7 arguments.

object Invoke(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

Invoke(string, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 8 arguments.

object Invoke(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

Invoke(string, object, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 9 arguments.

object Invoke(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

arg8 object

The ninth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

Invoke(string, object, object, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 10 arguments.

object Invoke(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

arg8 object

The ninth argument to pass to the method.

arg9 object

The tenth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

Invoke(string, params object[])

Invokes a static method on the underlying JVM class using a variable-length argument list. The bridge resolves the target Java method by matching the runtime types of the supplied arguments.

object Invoke(string methodName, params object[] args)

Parameters

methodName string

The name of the Java static method to invoke.

args object[]

The arguments to pass to the method. Each element must be a type compatible with the corresponding Java parameter: primitive types, IJavaObject instances, or .NET arrays of primitive types.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Remarks

Use this overload when the number of arguments is not known at compile time. For a fixed, known number of arguments (0–10), prefer the strongly-typed overloads to avoid the overhead of array allocation.

Exceptions

MissingMethodException

Thrown if no static method matching methodName with the inferred signature is found.

InvokeWithSignature(string, string)

Invokes a static method on the underlying JVM class using an explicit JNI signature and no arguments.

object InvokeWithSignature(string methodName, string signature)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Remarks

Use this overload when static method overload resolution by argument types alone is ambiguous, or when you want to pin the call to a specific Java method descriptor. The JNI signature format follows the standard Java descriptor notation, e.g. "()V" for a void method with no parameters.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 1 argument.

object InvokeWithSignature(string methodName, string signature, object arg0)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 2 arguments.

object InvokeWithSignature(string methodName, string signature, object arg0, object arg1)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 3 arguments.

object InvokeWithSignature(string methodName, string signature, object arg0, object arg1, object arg2)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 4 arguments.

object InvokeWithSignature(string methodName, string signature, object arg0, object arg1, object arg2, object arg3)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 5 arguments.

object InvokeWithSignature(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 6 arguments.

object InvokeWithSignature(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 7 arguments.

object InvokeWithSignature(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 8 arguments.

object InvokeWithSignature(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 9 arguments.

object InvokeWithSignature(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

arg8 object

The ninth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, object, object, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature and 10 arguments.

object InvokeWithSignature(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

arg8 object

The ninth argument to pass to the method.

arg9 object

The tenth argument to pass to the method.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature(string, string, params object[])

Invokes a static method on the underlying JVM class using an explicit JNI signature and a variable-length argument list.

object InvokeWithSignature(string methodName, string signature, params object[] args)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

args object[]

The arguments to pass to the method. Each element must be compatible with the corresponding Java parameter type declared in signature.

Returns

object

The return value of the method as a boxed object, or null if the method returns void.

Remarks

The explicit signature is resolved at the JNI level before dispatching the call, so this overload is suitable when multiple static overloads share the same name and the bridge cannot unambiguously select the right one from the argument types alone. For a fixed, known number of arguments (0–10), prefer the strongly-typed overloads to avoid the overhead of array allocation.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvokeWithSignature<TReturn>(string, string)

Invokes a static method on the underlying JVM class using an explicit JNI signature, no arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 1 argument, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 2 arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0, object arg1)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 3 arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0, object arg1, object arg2)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 4 arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0, object arg1, object arg2, object arg3)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 5 arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 6 arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 7 arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 8 arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 9 arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

arg8 object

The ninth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, object, object, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class using an explicit JNI signature, 10 arguments, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

arg8 object

The ninth argument to pass to the method.

arg9 object

The tenth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

InvokeWithSignature<TReturn>(string, string, params object[])

Invokes a static method on the underlying JVM class using an explicit JNI signature, a variable-length argument list, and casts the result to TReturn.

TReturn InvokeWithSignature<TReturn>(string methodName, string signature, params object[] args)

Parameters

methodName string

The name of the Java static method to invoke.

signature string

The JNI method descriptor string that uniquely identifies the target method.

args object[]

The arguments to pass to the method. Each element must be compatible with the corresponding Java parameter type declared in signature.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types (int, long, bool, etc.), Enum, and arrays of primitive types.

Remarks

The explicit signature is resolved at the JNI level before dispatching the call, so this overload is suitable when multiple static overloads share the same name and the bridge cannot unambiguously select the right one from the argument types alone. For a fixed, known number of arguments (0–10), prefer the strongly-typed overloads to avoid the overhead of array allocation.

Exceptions

MissingMethodException

Thrown if the method identified by methodName and signature is not found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string)

Invokes a static method on the underlying JVM class with no arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName)

Parameters

methodName string

The name of the Java static method to invoke.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types (int, long, bool, etc.), Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found on the underlying Java class.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object)

Invokes a static method on the underlying JVM class with 1 argument and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument type.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object, object)

Invokes a static method on the underlying JVM class with 2 arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0, object arg1)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object, object, object)

Invokes a static method on the underlying JVM class with 3 arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0, object arg1, object arg2)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object, object, object, object)

Invokes a static method on the underlying JVM class with 4 arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0, object arg1, object arg2, object arg3)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 5 arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 6 arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 7 arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 8 arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 9 arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

arg8 object

The ninth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, object, object, object, object, object, object, object, object, object, object)

Invokes a static method on the underlying JVM class with 10 arguments and casts the result to TReturn.

TReturn Invoke<TReturn>(string methodName, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9)

Parameters

methodName string

The name of the Java static method to invoke.

arg0 object

The first argument to pass to the method.

arg1 object

The second argument to pass to the method.

arg2 object

The third argument to pass to the method.

arg3 object

The fourth argument to pass to the method.

arg4 object

The fifth argument to pass to the method.

arg5 object

The sixth argument to pass to the method.

arg6 object

The seventh argument to pass to the method.

arg7 object

The eighth argument to pass to the method.

arg8 object

The ninth argument to pass to the method.

arg9 object

The tenth argument to pass to the method.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types, Enum, and arrays of primitive types.

Exceptions

MissingMethodException

Thrown if no matching static method is found for the given argument types.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

Invoke<TReturn>(string, params object[])

Invokes a static method on the underlying JVM class using a variable-length argument list and casts the result to TReturn. The bridge resolves the target Java method by matching the runtime types of the supplied arguments.

TReturn Invoke<TReturn>(string methodName, params object[] args)

Parameters

methodName string

The name of the Java static method to invoke.

args object[]

The arguments to pass to the method. Each element must be a type compatible with the corresponding Java parameter: primitive types, IJavaObject instances, or .NET arrays of primitive types.

Returns

TReturn

The return value of the method cast to TReturn.

Type Parameters

TReturn

The expected return type. Supported types: IJavaObject or any derived interface/class, .NET primitive types (int, long, bool, etc.), Enum, and arrays of primitive types.

Remarks

Use this overload when the number of arguments is not known at compile time. For a fixed, known number of arguments (0–10), prefer the strongly-typed overloads to avoid the overhead of array allocation.

Exceptions

MissingMethodException

Thrown if no static method matching methodName with the inferred signature is found.

InvalidCastException

Thrown if the actual return value cannot be cast to TReturn.

New()

Instantiates a new JVM object of this IJavaType using the no-argument constructor.

IJavaObject New()

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no no-argument constructor is found on the underlying Java class.

New(object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 1 argument.

IJavaObject New(object arg0)

Parameters

arg0 object

The first argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument type.

New(object, object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 2 arguments.

IJavaObject New(object arg0, object arg1)

Parameters

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument types.

New(object, object, object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 3 arguments.

IJavaObject New(object arg0, object arg1, object arg2)

Parameters

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument types.

New(object, object, object, object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 4 arguments.

IJavaObject New(object arg0, object arg1, object arg2, object arg3)

Parameters

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument types.

New(object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 5 arguments.

IJavaObject New(object arg0, object arg1, object arg2, object arg3, object arg4)

Parameters

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument types.

New(object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 6 arguments.

IJavaObject New(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5)

Parameters

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument types.

New(object, object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 7 arguments.

IJavaObject New(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)

Parameters

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

arg6 object

The seventh argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument types.

New(object, object, object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 8 arguments.

IJavaObject New(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7)

Parameters

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

arg6 object

The seventh argument to pass to the constructor.

arg7 object

The eighth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument types.

New(object, object, object, object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 9 arguments.

IJavaObject New(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8)

Parameters

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

arg6 object

The seventh argument to pass to the constructor.

arg7 object

The eighth argument to pass to the constructor.

arg8 object

The ninth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument types.

New(object, object, object, object, object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using a constructor that accepts 10 arguments.

IJavaObject New(object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9)

Parameters

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

arg6 object

The seventh argument to pass to the constructor.

arg7 object

The eighth argument to pass to the constructor.

arg8 object

The ninth argument to pass to the constructor.

arg9 object

The tenth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no matching constructor is found for the given argument types.

New(params object[])

Instantiates a new JVM object of this IJavaType using a variable-length argument list. The bridge resolves the target constructor by matching the runtime types of the supplied arguments.

IJavaObject New(params object[] args)

Parameters

args object[]

The arguments to pass to the constructor. Each element must be compatible with the corresponding Java parameter type: primitive types, IJavaObject instances, or .NET arrays of primitive types.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Remarks

Use this overload when the number of constructor arguments is not known at compile time. For a fixed, known number of arguments (0–5), prefer the strongly-typed overloads to avoid the overhead of array allocation.

Exceptions

MissingMethodException

Thrown if no constructor matching the inferred signature is found on the underlying Java class.

NewWithSignature(string)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and no arguments.

IJavaObject NewWithSignature(string signature)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Remarks

Use this overload when multiple constructors share ambiguous argument types and the bridge cannot resolve the correct one automatically. The JNI signature format follows the standard Java descriptor notation, e.g. "()V" for a no-argument constructor.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 1 argument.

IJavaObject NewWithSignature(string signature, object arg0)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 2 arguments.

IJavaObject NewWithSignature(string signature, object arg0, object arg1)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object, object, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 3 arguments.

IJavaObject NewWithSignature(string signature, object arg0, object arg1, object arg2)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object, object, object, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 4 arguments.

IJavaObject NewWithSignature(string signature, object arg0, object arg1, object arg2, object arg3)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 5 arguments.

IJavaObject NewWithSignature(string signature, object arg0, object arg1, object arg2, object arg3, object arg4)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 6 arguments.

IJavaObject NewWithSignature(string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object, object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 7 arguments.

IJavaObject NewWithSignature(string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

arg6 object

The seventh argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object, object, object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 8 arguments.

IJavaObject NewWithSignature(string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

arg6 object

The seventh argument to pass to the constructor.

arg7 object

The eighth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object, object, object, object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 9 arguments.

IJavaObject NewWithSignature(string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

arg6 object

The seventh argument to pass to the constructor.

arg7 object

The eighth argument to pass to the constructor.

arg8 object

The ninth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, object, object, object, object, object, object, object, object, object, object)

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and 10 arguments.

IJavaObject NewWithSignature(string signature, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

arg0 object

The first argument to pass to the constructor.

arg1 object

The second argument to pass to the constructor.

arg2 object

The third argument to pass to the constructor.

arg3 object

The fourth argument to pass to the constructor.

arg4 object

The fifth argument to pass to the constructor.

arg5 object

The sixth argument to pass to the constructor.

arg6 object

The seventh argument to pass to the constructor.

arg7 object

The eighth argument to pass to the constructor.

arg8 object

The ninth argument to pass to the constructor.

arg9 object

The tenth argument to pass to the constructor.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

NewWithSignature(string, params object[])

Instantiates a new JVM object of this IJavaType using the constructor identified by an explicit JNI signature and a variable-length argument list.

IJavaObject NewWithSignature(string signature, params object[] args)

Parameters

signature string

The JNI constructor descriptor string that uniquely identifies the target constructor.

args object[]

The arguments to pass to the constructor. Each element must be compatible with the corresponding Java parameter type declared in signature.

Returns

IJavaObject

A new IJavaObject wrapping the newly created JVM instance.

Remarks

The explicit signature is resolved at the JNI level before dispatching the call, so this overload is suitable when multiple constructors share the same parameter count and the bridge cannot unambiguously select the right one from the argument types alone. For a fixed, known number of arguments (0–5), prefer the strongly-typed overloads to avoid the overhead of array allocation.

Exceptions

MissingMethodException

Thrown if no constructor matching signature is found on the underlying Java class.

SetField(string, object)

Writes a value to a static field on the underlying JVM class.

void SetField(string fieldName, object val)

Parameters

fieldName string

The name of the Java static field to write.

val object

The value to assign. Must be compatible with the Java field's declared type: boxed .NET primitives, IJavaObject instances, or arrays of primitive types.

Exceptions

InvalidOperationException

Thrown if no static field named fieldName is found on the underlying Java class.

InvalidCastException

Thrown if val is not assignable to the Java field's declared type.