Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

AndroidJNI.NewObject

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

Description

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