AndroidJNI.NewObject 新建对象

static function NewObject (clazz : IntPtr, methodID : IntPtr, args : jvalue[]) : IntPtr


Constructs a new Java object. The method ID indicates which constructor method to invoke. This ID must be obtained by calling GetMethodID() with as the method name and void (V) as the return type.

构造新的 Java 对象。方法 ID指示应调用的构造函数方法。该 ID 必须通过调用 GetMethodID() 获得,且调用时的方法名必须为 <init>,而返回类型必须为 void (V)。

clazz 参数务必不要引用数组类。

参见: Java Native Interface Specification (Oracle)

Page last updated: 2011-4-15