Language

JniType.DefineClass(String, JniObjectReference, Byte[]) Method

Definition

Defines a Java class from class-file bytes and wraps its class reference.

public static Java.Interop.JniType? DefineClass(string name, Java.Interop.JniObjectReference loader, byte[] classFileData);
static member DefineClass : string * Java.Interop.JniObjectReference * byte[] -> Java.Interop.JniType

Parameters

name
String

The JNI class name passed to the class-definition operation.

loader
JniObjectReference

The class-loader reference passed to the class-definition operation.

classFileData
Byte[]

The Java class-file bytes. A null array returns null without defining a class.

Returns

A wrapper owning a global reference to the defined class, or null if classFileData is null.

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