EzHookTool
Toggle table of contents
jvm
Target filter
jvm
Switch theme
Search in API
Skip to content
EzHookTool
core
/
io.github.lingqiqi5211.ezhooktool.core
/
getFieldAs
get
Field
As
fun
<
T
>
Any
.
getFieldAs
(
fieldName
:
String
,
type
:
Class
<
*
>
?
=
null
)
:
T
?
类型安全的字段读取。
val name: String = instance.getFieldAs("userName")
Content copied to clipboard
Parameters
field
Name
字段名
type
可选字段类型,用于进一步约束匹配结果