Language

JniEnvironment.Types.DefineClass Method

Definition

Defines a Java class from a caller-owned class-file buffer.

public static Java.Interop.JniObjectReference DefineClass(string name, Java.Interop.JniObjectReference loader, IntPtr buffer, int bufferLength);
static member DefineClass : string * Java.Interop.JniObjectReference * nativeint * int -> Java.Interop.JniObjectReference

Parameters

name
String

The Java binary class name, with slashes between package names.

loader
JniObjectReference

A valid reference to the Java class loader.

buffer
IntPtr

nativeint

The address of class-file bytes that remain valid for this call.

bufferLength
Int32

The number of bytes in buffer.

Returns

A local JNI reference to the defined class, which the caller must release.

Remarks

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.

Applies to