mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-07 11:10:04 +08:00
Modify simplify ConstructorFinder
This commit is contained in:
@@ -377,10 +377,7 @@ class ConstructorFinder @PublishedApi internal constructor(
|
|||||||
* @param param 构造方法参数
|
* @param param 构造方法参数
|
||||||
* @return [Any] or null
|
* @return [Any] or null
|
||||||
*/
|
*/
|
||||||
private fun baseCall(vararg param: Any?) =
|
private fun baseCall(vararg param: Any?) = (memberInstance as? Constructor<*>?)?.newInstance(*param)
|
||||||
if (param.isNotEmpty())
|
|
||||||
(memberInstance as? Constructor<*>?)?.newInstance(*param)
|
|
||||||
else (memberInstance as? Constructor<*>?)?.newInstance()
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行构造方法创建目标实例 - 不指定目标实例类型
|
* 执行构造方法创建目标实例 - 不指定目标实例类型
|
||||||
|
Reference in New Issue
Block a user