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.

AndroidJNIHelper.GetConstructorID

static function GetConstructorID(javaClass: IntPtr, signature: string = ""): IntPtr;
static IntPtr GetConstructorID(IntPtr javaClass, string signature = "");
static def GetConstructorID(javaClass as IntPtr, signature as string = "") as IntPtr

Parameters

javaClassRaw JNI Java class object (obtained by calling AndroidJNI.FindClass).
signatureConstructor method signature (e.g. obtained by calling AndroidJNIHelper.GetSignature).

Description

Scans a particular Java class for a constructor method matching a signature.

The signature comparison is done to allow for sub-/base-classes of the class types. If no signature is provided the first constuctor found will be returned.

See Also: AndroidJNIHelper.GetSignature, AndroidJNIHelper.GetMethodID, AndroidJNIHelper.GetFieldID.

static function GetConstructorID(jclass: IntPtr, args: object[]): IntPtr;
static IntPtr GetConstructorID(IntPtr jclass, object[] args);
static def GetConstructorID(jclass as IntPtr, args as object[]) as IntPtr

Parameters

javaClassRaw JNI Java class object (obtained by calling AndroidJNI.FindClass).
argsArray with parameters to be passed to the constructor when invoked.

Description

Get a JNI method ID for a constructor based on calling arguments.

Scans a particular Java class for a constructor method matching a signature based on passed arguments. The signature comparison is done to allow for sub-/base-classes of the class types.