文档

Unity Engine

Unity Engine

GetConstructorID

Scans a particular Java class for a constructor method matching a signature.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AndroidJNIModule

GetConstructorID(IntPtr)

Scans a particular Java class for a constructor method matching a signature.
public static IntPtr GetConstructorID(IntPtr javaClass)

Parameters

javaClass

Raw JNI Java class object (obtained by calling AndroidJNI.FindClass).

Returns

Type

Description

IntPtr

Remarks

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.

GetConstructorID(IntPtr, string)

Scans a particular Java class for a constructor method matching a signature.
public static IntPtr GetConstructorID(IntPtr javaClass, string signature)

Parameters

javaClass

Raw JNI Java class object (obtained by calling AndroidJNI.FindClass).

signature

Constructor method signature (e.g. obtained by calling AndroidJNIHelper.GetSignature).

Returns

Type

Description

IntPtr

Remarks

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.

GetConstructorID(IntPtr, Object[])

Get a JNI method ID for a constructor based on calling arguments.
public static IntPtr GetConstructorID(IntPtr jclass, object[] args)

Parameters

jclass


Array with parameters to be passed to the constructor when invoked.

Returns

Type

Description

IntPtr

Remarks

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.