commit e9fb0169d8f8b5f24861fbddf11ec1d6dc625421 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed Jun 25 11:38:33 2025 +0000 Deploy to GitHub pages diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..bde5785 --- /dev/null +++ b/404.html @@ -0,0 +1,34 @@ + + + + + + + + + Yuki Reflection + + + + + +

404

How did we get here?
Take me home
YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
+ + + diff --git a/assets/404.html-6Yl8cQE3.js b/assets/404.html-6Yl8cQE3.js new file mode 100644 index 0000000..7a25b17 --- /dev/null +++ b/assets/404.html-6Yl8cQE3.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-3706649a","path":"/404.html","title":"","lang":"en-US","frontmatter":{"layout":"NotFound"},"headers":[],"git":{},"filePathRelative":null}');export{t as data}; diff --git a/assets/404.html-GYBVbwsB.js b/assets/404.html-GYBVbwsB.js new file mode 100644 index 0000000..6c4f854 --- /dev/null +++ b/assets/404.html-GYBVbwsB.js @@ -0,0 +1 @@ +import{_ as e,o as c,c as t}from"./app-Un_zyw_U.js";const _={};function o(r,n){return c(),t("div")}const a=e(_,[["render",o],["__file","404.html.vue"]]);export{a as default}; diff --git a/assets/BaseFinder.html-72Iq-6f5.js b/assets/BaseFinder.html-72Iq-6f5.js new file mode 100644 index 0000000..ad67a7b --- /dev/null +++ b/assets/BaseFinder.html-72Iq-6f5.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-740d06da","path":"/en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html","title":"BaseFinder - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"BaseFinder.IndexTypeCondition - class","slug":"basefinder-indextypecondition-class","link":"#basefinder-indextypecondition-class","children":[{"level":3,"title":"index - method","slug":"index-method","link":"#index-method","children":[]},{"level":3,"title":"index - method","slug":"index-method-1","link":"#index-method-1","children":[]},{"level":3,"title":"IndexTypeConditionSort - class","slug":"indextypeconditionsort-class","link":"#indextypeconditionsort-class","children":[]}]}],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.md"}');export{e as data}; diff --git a/assets/BaseFinder.html-ALJEe03K.js b/assets/BaseFinder.html-ALJEe03K.js new file mode 100644 index 0000000..329d42d --- /dev/null +++ b/assets/BaseFinder.html-ALJEe03K.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c945cb6e","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html","title":"BaseFinder - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"BaseFinder.IndexTypeCondition - class","slug":"basefinder-indextypecondition-class","link":"#basefinder-indextypecondition-class","children":[{"level":3,"title":"index - method","slug":"index-method","link":"#index-method","children":[]},{"level":3,"title":"index - method","slug":"index-method-1","link":"#index-method-1","children":[]},{"level":3,"title":"IndexTypeConditionSort - class","slug":"indextypeconditionsort-class","link":"#indextypeconditionsort-class","children":[]}]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.md"}');export{e as data}; diff --git a/assets/BaseFinder.html-DcynkNRV.js b/assets/BaseFinder.html-DcynkNRV.js new file mode 100644 index 0000000..8e4c12a --- /dev/null +++ b/assets/BaseFinder.html-DcynkNRV.js @@ -0,0 +1,9 @@ +import{_ as s,o as e,c as n,a}from"./app-Un_zyw_U.js";const o={},t=a(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

BaseFinder - class

abstract class BaseFinder
+

Change Records

v1.0.0 first

Function Illustrate

这是 ClassMember 查找类功能的基本类实现。

BaseFinder.IndexTypeCondition - class

inner class IndexTypeCondition internal constructor(private val type: IndexConfigType)
+

Change Records

v1.0.0 first

Function Illustrate

字节码下标筛选实现类。

index - method

fun index(num: Int)
+

Change Records

v1.0.0 first

Function Illustrate

设置下标。

index 小于零则为倒序,此时可以使用 IndexTypeConditionSort.reverse 方法实现。

可使用 IndexTypeConditionSort.firstIndexTypeConditionSort.last 设置首位和末位筛选条件。

index - method

fun index(): IndexTypeConditionSort
+

Change Records

v1.0.0 first

Function Illustrate

得到下标。

IndexTypeConditionSort - class

inner class IndexTypeConditionSort internal constructor()
+

Change Records

v1.0.0 first

Function Illustrate

字节码下标排序实现类。

first - method

fun first()
+

Change Records

v1.0.0 first

Function Illustrate

设置满足条件的第一个。

last - method

fun last()
+

Change Records

v1.0.0 first

Function Illustrate

设置满足条件的最后一个。

reverse - method

fun reverse(num: Int)
+

Change Records

v1.0.0 first

Function Illustrate

设置倒序下标。

`,51),l=[t];function p(c,r){return e(),n("div",null,l)}const i=s(o,[["render",p],["__file","BaseFinder.html.vue"]]);export{i as default}; diff --git a/assets/BaseFinder.html-bAM0SzKR.js b/assets/BaseFinder.html-bAM0SzKR.js new file mode 100644 index 0000000..87f3e7c --- /dev/null +++ b/assets/BaseFinder.html-bAM0SzKR.js @@ -0,0 +1,9 @@ +import{_ as s,o as e,c as a,a as n}from"./app-Un_zyw_U.js";const o={},p=n(`

BaseFinder - class

abstract class BaseFinder
+

变更记录

v1.0.0 添加

功能描述

这是 ClassMember 查找类功能的基本类实现。

BaseFinder.IndexTypeCondition - class

inner class IndexTypeCondition internal constructor(private val type: IndexConfigType)
+

变更记录

v1.0.0 添加

功能描述

字节码下标筛选实现类。

index - method

fun index(num: Int)
+

变更记录

v1.0.0 添加

功能描述

设置下标。

index 小于零则为倒序,此时可以使用 IndexTypeConditionSort.reverse 方法实现。

可使用 IndexTypeConditionSort.firstIndexTypeConditionSort.last 设置首位和末位筛选条件。

index - method

fun index(): IndexTypeConditionSort
+

变更记录

v1.0.0 添加

功能描述

得到下标。

IndexTypeConditionSort - class

inner class IndexTypeConditionSort internal constructor()
+

变更记录

v1.0.0 添加

功能描述

字节码下标排序实现类。

first - method

fun first()
+

变更记录

v1.0.0 添加

功能描述

设置满足条件的第一个。

last - method

fun last()
+

变更记录

v1.0.0 添加

功能描述

设置满足条件的最后一个。

reverse - method

fun reverse(num: Int)
+

变更记录

v1.0.0 添加

功能描述

设置倒序下标。

`,50),l=[p];function t(c,d){return e(),a("div",null,l)}const i=s(o,[["render",t],["__file","BaseFinder.html.vue"]]);export{i as default}; diff --git a/assets/ComponentTypeFactory.html-986b1Uh7.js b/assets/ComponentTypeFactory.html-986b1Uh7.js new file mode 100644 index 0000000..5822907 --- /dev/null +++ b/assets/ComponentTypeFactory.html-986b1Uh7.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-6c58c435","path":"/zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html","title":"ComponentTypeFactory - kt","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.md"}');export{e as data}; diff --git a/assets/ComponentTypeFactory.html-FeM6EBQs.js b/assets/ComponentTypeFactory.html-FeM6EBQs.js new file mode 100644 index 0000000..f37ab03 --- /dev/null +++ b/assets/ComponentTypeFactory.html-FeM6EBQs.js @@ -0,0 +1 @@ +import{_ as n,r as a,o as r,c,b as o,d as e,e as s,a as i}from"./app-Un_zyw_U.js";const p={},l=i('

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

ComponentTypeFactory - kt

Change Records

v1.0.0 first

Function Illustrate

这是一个预置反射类型的常量类,主要为 Android 相关组件的 Class 内容,跟随版本更新会逐一进行增加。

',6),d={href:"https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"};function h(m,u){const t=a("ExternalLinkIcon");return r(),c("div",null,[l,o("p",null,[e("详情可 "),o("a",d,[e("点击这里"),s(t)]),e(" 进行查看。")])])}const _=n(p,[["render",h],["__file","ComponentTypeFactory.html.vue"]]);export{_ as default}; diff --git a/assets/ComponentTypeFactory.html-MSABhHlb.js b/assets/ComponentTypeFactory.html-MSABhHlb.js new file mode 100644 index 0000000..ad3a01a --- /dev/null +++ b/assets/ComponentTypeFactory.html-MSABhHlb.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-7f47f9f8","path":"/en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html","title":"ComponentTypeFactory - kt","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.md"}');export{e as data}; diff --git a/assets/ComponentTypeFactory.html-Wy4oe3qj.js b/assets/ComponentTypeFactory.html-Wy4oe3qj.js new file mode 100644 index 0000000..6852681 --- /dev/null +++ b/assets/ComponentTypeFactory.html-Wy4oe3qj.js @@ -0,0 +1 @@ +import{_ as n,r as a,o as c,c as r,b as o,d as e,e as s,a as p}from"./app-Un_zyw_U.js";const d={},l=p('

ComponentTypeFactory - kt

变更记录

v1.0.0 添加

功能描述

这是一个预置反射类型的常量类,主要为 Android 相关组件的 Class 内容,跟随版本更新会逐一进行增加。

',5),i={href:"https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"};function m(_,h){const t=a("ExternalLinkIcon");return c(),r("div",null,[l,o("p",null,[e("详情可 "),o("a",i,[e("点击这里"),s(t)]),e(" 进行查看。")])])}const f=n(d,[["render",m],["__file","ComponentTypeFactory.html.vue"]]);export{f as default}; diff --git a/assets/ConstructorFinder.html-HZlOD583.js b/assets/ConstructorFinder.html-HZlOD583.js new file mode 100644 index 0000000..b7e5790 --- /dev/null +++ b/assets/ConstructorFinder.html-HZlOD583.js @@ -0,0 +1,66 @@ +import{_ as s,o as n,c as o,a}from"./app-Un_zyw_U.js";const e={},l=a(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

ConstructorFinder - class

class ConstructorFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
+

Change Records

v1.0.0 first

Function Illustrate

Constructor 查找类。

可通过指定类型查找指定 Constructor 或一组 Constructor

paramCount - field

var paramCount: Int
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数个数。

你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

若参数个数小于零则忽略并使用 param

modifiers - method

fun modifiers(conditions: ModifierConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 标识符筛选条件。

可不设置筛选条件,默认模糊查找并取第一个匹配的 Constructor

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

emptyParam - method

fun emptyParam(): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 空参数、无参数。

param - method

fun param(vararg paramType: Any): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数。

如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

如果 Constructor 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

Pay Attention

无参 Constructor 请使用 emptyParam 设置查找条件。

有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

param - method

fun param(conditions: ObjectsConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数条件。

Pay Attention

无参 Constructor 请使用 emptyParam 设置查找条件。

有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(num: Int): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数个数。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数。

若参数个数小于零则忽略并使用 param

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(numRange: IntRange): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数个数范围。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(conditions: CountConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数个数条件。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

superClass - method

fun superClass(isOnlySuperClass: Boolean)
+

Change Records

v1.0.0 first

Function Illustrate

设置在 classSet 的所有父类中查找当前 Constructor

Notice

若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

RemedyPlan - class

inner class RemedyPlan internal constructor()
+

Change Records

v1.0.0 first

Function Illustrate

Constructor 重查找实现类,可累计失败次数直到查找成功。

constructor - method

inline fun constructor(initiate: ConstructorConditions)
+

Change Records

v1.0.0 first

Function Illustrate

创建需要重新查找的 Constructor

你可以添加多个备选 Constructor,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

Result - class

inner class Result internal constructor()
+

Change Records

v1.0.0 first

Function Illustrate

RemedyPlan 结果实现类。

onFind - method

fun onFind(initiate: MutableList<Constructor<*>>.() -> Unit)
+

Change Records

v1.0.0 first

v1.0.3 modified

initiate 类型由 HashSet 修改为 MutableList

Function Illustrate

当在 RemedyPlan 中找到结果时。

Function Example

你可以方便地对重查找的 Constructor 实现 onFind 方法。

The following example

constructor {
+    // Your code here.
+}.onFind {
+    // Your code here.
+}
+

Result - class

inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
+

Change Records

v1.0.0 first

Function Illustrate

Constructor 查找结果实现类。

result - method

inline fun result(initiate: Result.() -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

创建监听结果事件方法体。

Function Example

你可以使用 lambda 形式创建 Result 类。

The following example

constructor {
+    // Your code here.
+}.result {
+    get().call()
+    all()
+    remedys {}
+    onNoSuchConstructor {}
+}
+

get - method

fun get(): Instance
+

Change Records

v1.0.0 first

Function Illustrate

获得 Constructor 实例处理类。

若有多个 Constructor 结果只会返回第一个。

Pay Attention

若你设置了 remedys 请使用 wait 回调结果方法。

Function Example

你可以通过获得方法所在实例来执行构造方法创建新的实例对象。

The following example

constructor {
+    // Your code here.
+}.get().call()
+

你可以 cast 构造方法为指定类型的实例对象。

The following example

constructor {
+    // Your code here.
+}.get().newInstance<TestClass>()
+

Pay Attention

若构造方法含有参数则后方参数必填。

The following example

constructor {
+    // Your code here.
+}.get().newInstance<TestClass>("param1", "param2")
+

all - method

fun all(): MutableList<Instance>
+

Change Records

v1.0.0 first

v1.0.3 modified

返回值类型由 ArrayList 修改为 MutableList

Function Illustrate

获得 Constructor 实例处理类数组。

返回全部查找条件匹配的多个 Constructor 实例结果。

Function Example

你可以通过此方法来获得当前条件结果中匹配的全部 Constructor

The following example

constructor {
+    // Your code here.
+}.all().forEach { instance ->
+    instance.call(...)
+}
+

give - method

fun give(): Constructor<*>?
+

Change Records

v1.0.0 first

Function Illustrate

得到 Constructor 本身。

若有多个 Constructor 结果只会返回第一个。

在查找条件找不到任何结果的时候将返回 null

giveAll - method

fun giveAll(): MutableList<Constructor<*>>
+

Change Records

v1.0.0 first

v1.0.3 modified

返回值类型由 HashSet 修改为 MutableList

Function Illustrate

得到 Constructor 本身数组。

返回全部查找条件匹配的多个 Constructor 实例。

在查找条件找不到任何结果的时候将返回空的 MutableList

wait - method

fun wait(initiate: Instance.() -> Unit)
+

Change Records

v1.0.0 first

Function Illustrate

获得 Constructor 实例处理类,配合 RemedyPlan 使用。

若有多个 Constructor 结果只会返回第一个。

Pay Attention

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

waitAll - method

fun waitAll(initiate: MutableList<Instance>.() -> Unit)
+

Change Records

v1.0.0 first

v1.0.3 modified

initiate 类型由 ArrayList 修改为 MutableList

Function Illustrate

获得 Constructor 实例处理类数组,配合 RemedyPlan 使用。

返回全部查找条件匹配的多个 Constructor 实例结果。

Pay Attention

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

remedys - method

inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

创建 Constructor 重查找功能。

Function Example

当你遇到一种 Constructor 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchConstructor 捕获异常二次查找 Constructor

若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

The following example

constructor {
+    // Your code here.
+}.remedys {
+    constructor {
+        // Your code here.
+    }
+    constructor {
+        // Your code here.
+    }
+}
+

onNoSuchConstructor - method

inline fun onNoSuchConstructor(result: (Throwable) -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

监听找不到 Constructor 时。

只会返回第一次的错误信息,不会返回 RemedyPlan 的错误信息。

ignored - method

fun ignored(): Result
+

Change Records

v1.0.0 first

Function Illustrate

忽略异常并停止打印任何错误日志。

Notice

此时若要监听异常结果,你需要手动实现 onNoSuchConstructor 方法。

Instance - class

inner class Instance internal constructor(private val constructor: Constructor<*>?)
+

Change Records

v1.0.0 first

Function Illustrate

Constructor 实例处理类。

call - method

fun call(vararg args: Any?): Any?
+

Change Records

v1.0.0 first

Function Illustrate

执行 Constructor 创建目标实例,不指定目标实例类型。

newInstance - method

fun <T> newInstance(vararg args: Any?): T?
+

Change Records

v1.0.0 first

Function Illustrate

执行 Constructor 创建目标实例 ,指定 T 目标实例类型。

`,235),t=[l];function p(c,r){return n(),o("div",null,t)}const i=s(e,[["render",p],["__file","ConstructorFinder.html.vue"]]);export{i as default}; diff --git a/assets/ConstructorFinder.html-SqtdCIul.js b/assets/ConstructorFinder.html-SqtdCIul.js new file mode 100644 index 0000000..85e7179 --- /dev/null +++ b/assets/ConstructorFinder.html-SqtdCIul.js @@ -0,0 +1,66 @@ +import{_ as s,o as n,c as o,a}from"./app-Un_zyw_U.js";const e={},l=a(`

ConstructorFinder - class

class ConstructorFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
+

变更记录

v1.0.0 添加

功能描述

Constructor 查找类。

可通过指定类型查找指定 Constructor 或一组 Constructor

paramCount - field

var paramCount: Int
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数个数。

你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

若参数个数小于零则忽略并使用 param

modifiers - method

fun modifiers(conditions: ModifierConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 标识符筛选条件。

可不设置筛选条件,默认模糊查找并取第一个匹配的 Constructor

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

emptyParam - method

fun emptyParam(): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 空参数、无参数。

param - method

fun param(vararg paramType: Any): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数。

如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

如果 Constructor 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

特别注意

无参 Constructor 请使用 emptyParam 设置查找条件。

有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

param - method

fun param(conditions: ObjectsConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数条件。

特别注意

无参 Constructor 请使用 emptyParam 设置查找条件。

有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(num: Int): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数个数。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数。

若参数个数小于零则忽略并使用 param

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(numRange: IntRange): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数个数范围。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(conditions: CountConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数个数条件。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

superClass - method

fun superClass(isOnlySuperClass: Boolean)
+

变更记录

v1.0.0 添加

功能描述

设置在 classSet 的所有父类中查找当前 Constructor

注意

若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

RemedyPlan - class

inner class RemedyPlan internal constructor()
+

变更记录

v1.0.0 添加

功能描述

Constructor 重查找实现类,可累计失败次数直到查找成功。

constructor - method

inline fun constructor(initiate: ConstructorConditions)
+

变更记录

v1.0.0 添加

功能描述

创建需要重新查找的 Constructor

你可以添加多个备选 Constructor,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

Result - class

inner class Result internal constructor()
+

变更记录

v1.0.0 添加

功能描述

RemedyPlan 结果实现类。

onFind - method

fun onFind(initiate: MutableList<Constructor<*>>.() -> Unit)
+

变更记录

v1.0.0 添加

v1.0.3 修改

initiate 类型由 HashSet 修改为 MutableList

功能描述

当在 RemedyPlan 中找到结果时。

功能示例

你可以方便地对重查找的 Constructor 实现 onFind 方法。

示例如下

constructor {
+    // Your code here.
+}.onFind {
+    // Your code here.
+}
+

Result - class

inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
+

变更记录

v1.0.0 添加

功能描述

Constructor 查找结果实现类。

result - method

inline fun result(initiate: Result.() -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

创建监听结果事件方法体。

功能示例

你可以使用 lambda 形式创建 Result 类。

示例如下

constructor {
+    // Your code here.
+}.result {
+    get().call()
+    all()
+    remedys {}
+    onNoSuchConstructor {}
+}
+

get - method

fun get(): Instance
+

变更记录

v1.0.0 添加

功能描述

获得 Constructor 实例处理类。

若有多个 Constructor 结果只会返回第一个。

特别注意

若你设置了 remedys 请使用 wait 回调结果方法。

功能示例

你可以通过获得方法所在实例来执行构造方法创建新的实例对象。

示例如下

constructor {
+    // Your code here.
+}.get().call()
+

你可以 cast 构造方法为指定类型的实例对象。

示例如下

constructor {
+    // Your code here.
+}.get().newInstance<TestClass>()
+

特别注意

若构造方法含有参数则后方参数必填。

示例如下

constructor {
+    // Your code here.
+}.get().newInstance<TestClass>("param1", "param2")
+

all - method

fun all(): MutableList<Instance>
+

变更记录

v1.0.0 添加

v1.0.3 修改

返回值类型由 ArrayList 修改为 MutableList

功能描述

获得 Constructor 实例处理类数组。

返回全部查找条件匹配的多个 Constructor 实例结果。

功能示例

你可以通过此方法来获得当前条件结果中匹配的全部 Constructor

示例如下

constructor {
+    // Your code here.
+}.all().forEach { instance ->
+    instance.call(...)
+}
+

give - method

fun give(): Constructor<*>?
+

变更记录

v1.0.0 添加

功能描述

得到 Constructor 本身。

若有多个 Constructor 结果只会返回第一个。

在查找条件找不到任何结果的时候将返回 null

giveAll - method

fun giveAll(): MutableList<Constructor<*>>
+

变更记录

v1.0.0 添加

v1.0.3 修改

返回值类型由 HashSet 修改为 MutableList

功能描述

得到 Constructor 本身数组。

返回全部查找条件匹配的多个 Constructor 实例。

在查找条件找不到任何结果的时候将返回空的 MutableList

wait - method

fun wait(initiate: Instance.() -> Unit)
+

变更记录

v1.0.0 添加

功能描述

获得 Constructor 实例处理类,配合 RemedyPlan 使用。

若有多个 Constructor 结果只会返回第一个。

特别注意

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

waitAll - method

fun waitAll(initiate: MutableList<Instance>.() -> Unit)
+

变更记录

v1.0.0 添加

v1.0.3 修改

initiate 类型由 ArrayList 修改为 MutableList

功能描述

获得 Constructor 实例处理类数组,配合 RemedyPlan 使用。

返回全部查找条件匹配的多个 Constructor 实例结果。

特别注意

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

remedys - method

inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

创建 Constructor 重查找功能。

功能示例

当你遇到一种 Constructor 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchConstructor 捕获异常二次查找 Constructor

若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

示例如下

constructor {
+    // Your code here.
+}.remedys {
+    constructor {
+        // Your code here.
+    }
+    constructor {
+        // Your code here.
+    }
+}
+

onNoSuchConstructor - method

inline fun onNoSuchConstructor(result: (Throwable) -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

监听找不到 Constructor 时。

只会返回第一次的错误信息,不会返回 RemedyPlan 的错误信息。

ignored - method

fun ignored(): Result
+

变更记录

v1.0.0 添加

功能描述

忽略异常并停止打印任何错误日志。

注意

此时若要监听异常结果,你需要手动实现 onNoSuchConstructor 方法。

Instance - class

inner class Instance internal constructor(private val constructor: Constructor<*>?)
+

变更记录

v1.0.0 添加

功能描述

Constructor 实例处理类。

call - method

fun call(vararg args: Any?): Any?
+

变更记录

v1.0.0 添加

功能描述

执行 Constructor 创建目标实例,不指定目标实例类型。

newInstance - method

fun <T> newInstance(vararg args: Any?): T?
+

变更记录

v1.0.0 添加

功能描述

执行 Constructor 创建目标实例 ,指定 T 目标实例类型。

`,234),p=[l];function t(c,r){return n(),o("div",null,p)}const i=s(e,[["render",t],["__file","ConstructorFinder.html.vue"]]);export{i as default}; diff --git a/assets/ConstructorFinder.html-WBhuluIb.js b/assets/ConstructorFinder.html-WBhuluIb.js new file mode 100644 index 0000000..be71e75 --- /dev/null +++ b/assets/ConstructorFinder.html-WBhuluIb.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-b3220076","path":"/en/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html","title":"ConstructorFinder - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-2","link":"#paramcount-method-2","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"RemedyPlan - class","slug":"remedyplan-class","link":"#remedyplan-class","children":[{"level":3,"title":"constructor - method","slug":"constructor-method","link":"#constructor-method","children":[]},{"level":3,"title":"Result - class","slug":"result-class","link":"#result-class","children":[]}]},{"level":2,"title":"Result - class","slug":"result-class-1","link":"#result-class-1","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"give - method","slug":"give-method","link":"#give-method","children":[]},{"level":3,"title":"giveAll - method","slug":"giveall-method","link":"#giveall-method","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method","link":"#remedys-method","children":[]},{"level":3,"title":"onNoSuchConstructor - method","slug":"onnosuchconstructor-method","link":"#onnosuchconstructor-method","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]},{"level":3,"title":"Instance - class","slug":"instance-class","link":"#instance-class","children":[]}]}],"git":{"updatedTime":1696172435000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.md"}');export{e as data}; diff --git a/assets/ConstructorFinder.html-_FNxdKVs.js b/assets/ConstructorFinder.html-_FNxdKVs.js new file mode 100644 index 0000000..3e0761e --- /dev/null +++ b/assets/ConstructorFinder.html-_FNxdKVs.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-722cd474","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html","title":"ConstructorFinder - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-2","link":"#paramcount-method-2","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"RemedyPlan - class","slug":"remedyplan-class","link":"#remedyplan-class","children":[{"level":3,"title":"constructor - method","slug":"constructor-method","link":"#constructor-method","children":[]},{"level":3,"title":"Result - class","slug":"result-class","link":"#result-class","children":[]}]},{"level":2,"title":"Result - class","slug":"result-class-1","link":"#result-class-1","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"give - method","slug":"give-method","link":"#give-method","children":[]},{"level":3,"title":"giveAll - method","slug":"giveall-method","link":"#giveall-method","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method","link":"#remedys-method","children":[]},{"level":3,"title":"onNoSuchConstructor - method","slug":"onnosuchconstructor-method","link":"#onnosuchconstructor-method","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]},{"level":3,"title":"Instance - class","slug":"instance-class","link":"#instance-class","children":[]}]}],"git":{"updatedTime":1696172435000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.md"}');export{e as data}; diff --git a/assets/ConstructorRules.html-DYOYWZvf.js b/assets/ConstructorRules.html-DYOYWZvf.js new file mode 100644 index 0000000..df13787 --- /dev/null +++ b/assets/ConstructorRules.html-DYOYWZvf.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-ec153654","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html","title":"ConstructorRules - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.md"}');export{e as data}; diff --git a/assets/ConstructorRules.html-HoOS6Lpr.js b/assets/ConstructorRules.html-HoOS6Lpr.js new file mode 100644 index 0000000..73a4c03 --- /dev/null +++ b/assets/ConstructorRules.html-HoOS6Lpr.js @@ -0,0 +1,9 @@ +import{_ as s,o,c as a,a as n}from"./app-Un_zyw_U.js";const e={},t=n(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

ConstructorRules - class

class ConstructorRules internal constructor(private val rulesData: ConstructorRulesData) : BaseRules
+

Change Records

v1.0.0 first

Function Illustrate

Constructor 查找条件实现类。

paramCount - field

var paramCount: Int
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数个数。

你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

若参数个数小于零则忽略并使用 param

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 标识符筛选条件。

可不设置筛选条件。

emptyParam - method

fun emptyParam()
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 空参数、无参数。

param - method

fun param(vararg paramType: Any)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数。

如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

如果 Constructor 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

Pay Attention

无参 Constructor 请使用 emptyParam 设置查找条件。

有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

param - method

fun param(conditions: ObjectsConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数条件。

Pay Attention

无参 Constructor 请使用 emptyParam 设置查找条件。

有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

paramCount - method

fun paramCount(numRange: IntRange)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数个数范围。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

paramCount - method

fun paramCount(conditions: CountConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Constructor 参数个数条件。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

`,58),r=[t];function c(p,l){return o(),a("div",null,r)}const i=s(e,[["render",c],["__file","ConstructorRules.html.vue"]]);export{i as default}; diff --git a/assets/ConstructorRules.html-b9arB2u-.js b/assets/ConstructorRules.html-b9arB2u-.js new file mode 100644 index 0000000..e1b4e64 --- /dev/null +++ b/assets/ConstructorRules.html-b9arB2u-.js @@ -0,0 +1,9 @@ +import{_ as s,o,c as a,a as n}from"./app-Un_zyw_U.js";const e={},t=n(`

ConstructorRules - class

class ConstructorRules internal constructor(private val rulesData: ConstructorRulesData) : BaseRules
+

变更记录

v1.0.0 添加

功能描述

Constructor 查找条件实现类。

paramCount - field

var paramCount: Int
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数个数。

你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

若参数个数小于零则忽略并使用 param

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 标识符筛选条件。

可不设置筛选条件。

emptyParam - method

fun emptyParam()
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 空参数、无参数。

param - method

fun param(vararg paramType: Any)
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数。

如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

如果 Constructor 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

特别注意

无参 Constructor 请使用 emptyParam 设置查找条件。

有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

param - method

fun param(conditions: ObjectsConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数条件。

特别注意

无参 Constructor 请使用 emptyParam 设置查找条件。

有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

paramCount - method

fun paramCount(numRange: IntRange)
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数个数范围。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

paramCount - method

fun paramCount(conditions: CountConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Constructor 参数个数条件。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

`,57),p=[t];function c(r,l){return o(),a("div",null,p)}const i=s(e,[["render",c],["__file","ConstructorRules.html.vue"]]);export{i as default}; diff --git a/assets/ConstructorRules.html-bV3tMIM8.js b/assets/ConstructorRules.html-bV3tMIM8.js new file mode 100644 index 0000000..8b16b51 --- /dev/null +++ b/assets/ConstructorRules.html-bV3tMIM8.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-cce2b7b6","path":"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html","title":"ConstructorRules - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.md"}');export{e as data}; diff --git a/assets/CountRules.html-ePjFzVT5.js b/assets/CountRules.html-ePjFzVT5.js new file mode 100644 index 0000000..f7a092a --- /dev/null +++ b/assets/CountRules.html-ePjFzVT5.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-3dbf4880","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html","title":"CountRules - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"Int.isZero - i-ext-method","slug":"int-iszero-i-ext-method","link":"#int-iszero-i-ext-method","children":[]},{"level":2,"title":"Int.moreThan - i-ext-method","slug":"int-morethan-i-ext-method","link":"#int-morethan-i-ext-method","children":[]},{"level":2,"title":"Int.lessThan - i-ext-method","slug":"int-lessthan-i-ext-method","link":"#int-lessthan-i-ext-method","children":[]},{"level":2,"title":"Int.inInterval - i-ext-method","slug":"int-ininterval-i-ext-method","link":"#int-ininterval-i-ext-method","children":[]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.md"}');export{e as data}; diff --git a/assets/CountRules.html-oJp6KY1O.js b/assets/CountRules.html-oJp6KY1O.js new file mode 100644 index 0000000..7a15325 --- /dev/null +++ b/assets/CountRules.html-oJp6KY1O.js @@ -0,0 +1,6 @@ +import{_ as s,o as e,c as n,a as o}from"./app-Un_zyw_U.js";const a={},t=o(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

CountRules - class

class CountRules private constructor()
+

Change Records

v1.0.0 first

Function Illustrate

这是一个模糊 ClassMember 数组 (下标) 个数条件实现类。

可对 R8 混淆后的 ClassMember 进行更加详细的定位。

Int.isZero - i-ext-method

fun Int.isZero(): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

是否为 0。

Int.moreThan - i-ext-method

fun Int.moreThan(count: Int): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

大于 count

Int.lessThan - i-ext-method

fun Int.lessThan(count: Int): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

小于 count

Int.inInterval - i-ext-method

fun Int.inInterval(countRange: IntRange): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

countRange 区间 A ≤ this ≤ B。

`,32),l=[t];function c(p,r){return e(),n("div",null,l)}const i=s(a,[["render",c],["__file","CountRules.html.vue"]]);export{i as default}; diff --git a/assets/CountRules.html-qumSB8gY.js b/assets/CountRules.html-qumSB8gY.js new file mode 100644 index 0000000..204a2d7 --- /dev/null +++ b/assets/CountRules.html-qumSB8gY.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-6f96d791","path":"/en/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html","title":"CountRules - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"Int.isZero - i-ext-method","slug":"int-iszero-i-ext-method","link":"#int-iszero-i-ext-method","children":[]},{"level":2,"title":"Int.moreThan - i-ext-method","slug":"int-morethan-i-ext-method","link":"#int-morethan-i-ext-method","children":[]},{"level":2,"title":"Int.lessThan - i-ext-method","slug":"int-lessthan-i-ext-method","link":"#int-lessthan-i-ext-method","children":[]},{"level":2,"title":"Int.inInterval - i-ext-method","slug":"int-ininterval-i-ext-method","link":"#int-ininterval-i-ext-method","children":[]}],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.md"}');export{e as data}; diff --git a/assets/CountRules.html-z8W_vwvZ.js b/assets/CountRules.html-z8W_vwvZ.js new file mode 100644 index 0000000..909bae2 --- /dev/null +++ b/assets/CountRules.html-z8W_vwvZ.js @@ -0,0 +1,6 @@ +import{_ as s,o as n,c as o,a as e}from"./app-Un_zyw_U.js";const a={},t=e(`

CountRules - class

class CountRules private constructor()
+

变更记录

v1.0.0 添加

功能描述

这是一个模糊 ClassMember 数组 (下标) 个数条件实现类。

可对 R8 混淆后的 ClassMember 进行更加详细的定位。

Int.isZero - i-ext-method

fun Int.isZero(): Boolean
+

变更记录

v1.0.0 添加

功能描述

是否为 0。

Int.moreThan - i-ext-method

fun Int.moreThan(count: Int): Boolean
+

变更记录

v1.0.0 添加

功能描述

大于 count

Int.lessThan - i-ext-method

fun Int.lessThan(count: Int): Boolean
+

变更记录

v1.0.0 添加

功能描述

小于 count

Int.inInterval - i-ext-method

fun Int.inInterval(countRange: IntRange): Boolean
+

变更记录

v1.0.0 添加

功能描述

countRange 区间 A ≤ this ≤ B。

`,31),l=[t];function c(p,r){return n(),o("div",null,l)}const i=s(a,[["render",c],["__file","CountRules.html.vue"]]);export{i as default}; diff --git a/assets/CurrentClass.html-ZCLUCXCq.js b/assets/CurrentClass.html-ZCLUCXCq.js new file mode 100644 index 0000000..9ce5f8c --- /dev/null +++ b/assets/CurrentClass.html-ZCLUCXCq.js @@ -0,0 +1,16 @@ +import{_ as s,o as e,c as a,a as n}from"./app-Un_zyw_U.js";const o={},l=n(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

CurrentClass - class

class CurrentClass internal constructor(private val classSet: Class<*>, internal val instance: Any)
+

Change Records

v1.0.0 first

Function Illustrate

当前实例的类操作对象。

name - field

val name: String
+

Change Records

v1.0.0 first

Function Illustrate

获得当前 classSetClass.getName

simpleName - field

val simpleName: String
+

Change Records

v1.0.0 first

Function Illustrate

获得当前 classSetClass.getSimpleName

generic - method

fun generic(): GenericClass?
+

Change Records

v1.0.0 first

Function Illustrate

获得当前实例中的泛型父类。

如果当前实例不存在泛型将返回 null

generic - method

inline fun generic(initiate: GenericClass.() -> Unit): GenericClass?
+

Change Records

v1.0.0 first

Function Illustrate

获得当前实例中的泛型父类。

如果当前实例不存在泛型将返回 null

superClass - method

fun superClass(): SuperClass
+

Change Records

v1.0.0 first

Function Illustrate

调用父类实例。

field - method

inline fun field(initiate: FieldConditions): FieldFinder.Result.Instance
+

Change Records

v1.0.0 first

Function Illustrate

调用当前实例中的变量。

method - method

inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
+

Change Records

v1.0.0 first

Function Illustrate

调用当前实例中的方法。

SuperClass - class

inner class SuperClass internal constructor(private val superClassSet: Class<*>)
+

Change Records

v1.0.0 first

Function Illustrate

当前类的父类实例的类操作对象。

name - field

val name: String
+

Change Records

v1.0.0 first

Function Illustrate

获得当前 classSet 中父类的 Class.getName

simpleName - field

val simpleName: String
+

Change Records

v1.0.0 first

Function Illustrate

获得当前 classSet 中父类的 Class.getSimpleName

generic - method

fun generic(): GenericClass?
+

Change Records

v1.0.0 first

Function Illustrate

获得当前实例父类中的泛型父类。

如果当前实例不存在泛型将返回 null

generic - method

inline fun generic(initiate: GenericClass.() -> Unit): GenericClass?
+

Change Records

v1.0.0 first

Function Illustrate

获得当前实例父类中的泛型父类。

如果当前实例不存在泛型将返回 null

field - method

inline fun field(initiate: FieldConditions): FieldFinder.Result.Instance
+

Change Records

v1.0.0 first

Function Illustrate

调用父类实例中的变量。

method - method

inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
+

Change Records

v1.0.0 first

Function Illustrate

调用父类实例中的方法。

`,95),t=[l];function p(c,r){return e(),a("div",null,t)}const i=s(o,[["render",p],["__file","CurrentClass.html.vue"]]);export{i as default}; diff --git a/assets/CurrentClass.html-aIvFMoGD.js b/assets/CurrentClass.html-aIvFMoGD.js new file mode 100644 index 0000000..786d4b6 --- /dev/null +++ b/assets/CurrentClass.html-aIvFMoGD.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-47f17664","path":"/en/api/public/com/highcapable/yukireflection/bean/CurrentClass.html","title":"CurrentClass - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"simpleName - field","slug":"simplename-field","link":"#simplename-field","children":[]},{"level":2,"title":"generic - method","slug":"generic-method","link":"#generic-method","children":[]},{"level":2,"title":"generic - method","slug":"generic-method-1","link":"#generic-method-1","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"field - method","slug":"field-method","link":"#field-method","children":[]},{"level":2,"title":"method - method","slug":"method-method","link":"#method-method","children":[]},{"level":2,"title":"SuperClass - class","slug":"superclass-class","link":"#superclass-class","children":[{"level":3,"title":"name - field","slug":"name-field-1","link":"#name-field-1","children":[]},{"level":3,"title":"simpleName - field","slug":"simplename-field-1","link":"#simplename-field-1","children":[]},{"level":3,"title":"generic - method","slug":"generic-method-2","link":"#generic-method-2","children":[]},{"level":3,"title":"generic - method","slug":"generic-method-3","link":"#generic-method-3","children":[]},{"level":3,"title":"field - method","slug":"field-method-1","link":"#field-method-1","children":[]},{"level":3,"title":"method - method","slug":"method-method-1","link":"#method-method-1","children":[]}]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/bean/CurrentClass.md"}');export{e as data}; diff --git a/assets/CurrentClass.html-iDLdKTRl.js b/assets/CurrentClass.html-iDLdKTRl.js new file mode 100644 index 0000000..ca23b71 --- /dev/null +++ b/assets/CurrentClass.html-iDLdKTRl.js @@ -0,0 +1,16 @@ +import{_ as s,o as a,c as e,a as n}from"./app-Un_zyw_U.js";const o={},l=n(`

CurrentClass - class

class CurrentClass internal constructor(private val classSet: Class<*>, internal val instance: Any)
+

变更记录

v1.0.0 添加

功能描述

当前实例的类操作对象。

name - field

val name: String
+

变更记录

v1.0.0 添加

功能描述

获得当前 classSetClass.getName

simpleName - field

val simpleName: String
+

变更记录

v1.0.0 添加

功能描述

获得当前 classSetClass.getSimpleName

generic - method

fun generic(): GenericClass?
+

变更记录

v1.0.0 添加

功能描述

获得当前实例中的泛型父类。

如果当前实例不存在泛型将返回 null

generic - method

inline fun generic(initiate: GenericClass.() -> Unit): GenericClass?
+

变更记录

v1.0.0 添加

功能描述

获得当前实例中的泛型父类。

如果当前实例不存在泛型将返回 null

superClass - method

fun superClass(): SuperClass
+

变更记录

v1.0.0 添加

功能描述

调用父类实例。

field - method

inline fun field(initiate: FieldConditions): FieldFinder.Result.Instance
+

变更记录

v1.0.0 添加

功能描述

调用当前实例中的变量。

method - method

inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
+

变更记录

v1.0.0 添加

功能描述

调用当前实例中的方法。

SuperClass - class

inner class SuperClass internal constructor(private val superClassSet: Class<*>)
+

变更记录

v1.0.0 添加

功能描述

当前类的父类实例的类操作对象。

name - field

val name: String
+

变更记录

v1.0.0 添加

功能描述

获得当前 classSet 中父类的 Class.getName

simpleName - field

val simpleName: String
+

变更记录

v1.0.0 添加

功能描述

获得当前 classSet 中父类的 Class.getSimpleName

generic - method

fun generic(): GenericClass?
+

变更记录

v1.0.0 添加

功能描述

获得当前实例父类中的泛型父类。

如果当前实例不存在泛型将返回 null

generic - method

inline fun generic(initiate: GenericClass.() -> Unit): GenericClass?
+

变更记录

v1.0.0 添加

功能描述

获得当前实例父类中的泛型父类。

如果当前实例不存在泛型将返回 null

field - method

inline fun field(initiate: FieldConditions): FieldFinder.Result.Instance
+

变更记录

v1.0.0 添加

功能描述

调用父类实例中的变量。

method - method

inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
+

变更记录

v1.0.0 添加

功能描述

调用父类实例中的方法。

`,94),p=[l];function c(t,r){return a(),e("div",null,p)}const i=s(o,[["render",c],["__file","CurrentClass.html.vue"]]);export{i as default}; diff --git a/assets/CurrentClass.html-sE3zJIrm.js b/assets/CurrentClass.html-sE3zJIrm.js new file mode 100644 index 0000000..9a341cd --- /dev/null +++ b/assets/CurrentClass.html-sE3zJIrm.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-406687ff","path":"/zh-cn/api/public/com/highcapable/yukireflection/bean/CurrentClass.html","title":"CurrentClass - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"simpleName - field","slug":"simplename-field","link":"#simplename-field","children":[]},{"level":2,"title":"generic - method","slug":"generic-method","link":"#generic-method","children":[]},{"level":2,"title":"generic - method","slug":"generic-method-1","link":"#generic-method-1","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"field - method","slug":"field-method","link":"#field-method","children":[]},{"level":2,"title":"method - method","slug":"method-method","link":"#method-method","children":[]},{"level":2,"title":"SuperClass - class","slug":"superclass-class","link":"#superclass-class","children":[{"level":3,"title":"name - field","slug":"name-field-1","link":"#name-field-1","children":[]},{"level":3,"title":"simpleName - field","slug":"simplename-field-1","link":"#simplename-field-1","children":[]},{"level":3,"title":"generic - method","slug":"generic-method-2","link":"#generic-method-2","children":[]},{"level":3,"title":"generic - method","slug":"generic-method-3","link":"#generic-method-3","children":[]},{"level":3,"title":"field - method","slug":"field-method-1","link":"#field-method-1","children":[]},{"level":3,"title":"method - method","slug":"method-method-1","link":"#method-method-1","children":[]}]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/bean/CurrentClass.md"}');export{e as data}; diff --git a/assets/DefinedTypeFactory.html-EYV1yl_b.js b/assets/DefinedTypeFactory.html-EYV1yl_b.js new file mode 100644 index 0000000..de5467e --- /dev/null +++ b/assets/DefinedTypeFactory.html-EYV1yl_b.js @@ -0,0 +1,2 @@ +import{_ as e,o as a,c as s,a as o}from"./app-Un_zyw_U.js";const t={},n=o(`

DefinedTypeFactory - kt

变更记录

v1.0.0 添加

功能描述

这是一个内部类型的定义常量类,主要用于反射 API 相关用法的延伸。

VagueType - field

val VagueType: Class<*>
+

变更记录

v1.0.0 添加

功能描述

得到模糊类型。

`,11),c=[n];function p(d,r){return a(),s("div",null,c)}const i=e(t,[["render",p],["__file","DefinedTypeFactory.html.vue"]]);export{i as default}; diff --git a/assets/DefinedTypeFactory.html-IT5sdpCR.js b/assets/DefinedTypeFactory.html-IT5sdpCR.js new file mode 100644 index 0000000..ed8f6ac --- /dev/null +++ b/assets/DefinedTypeFactory.html-IT5sdpCR.js @@ -0,0 +1,2 @@ +import{_ as e,o as t,c as a,a as o}from"./app-Un_zyw_U.js";const s={},n=o(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

DefinedTypeFactory - kt

Change Records

v1.0.0 first

Function Illustrate

这是一个内部类型的定义常量类,主要用于反射 API 相关用法的延伸。

VagueType - field

val VagueType: Class<*>
+

Change Records

v1.0.0 first

Function Illustrate

得到模糊类型。

`,12),c=[n];function r(l,p){return t(),a("div",null,c)}const d=e(s,[["render",r],["__file","DefinedTypeFactory.html.vue"]]);export{d as default}; diff --git a/assets/DefinedTypeFactory.html-OIQVLnGM.js b/assets/DefinedTypeFactory.html-OIQVLnGM.js new file mode 100644 index 0000000..73b190a --- /dev/null +++ b/assets/DefinedTypeFactory.html-OIQVLnGM.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-30e525ac","path":"/en/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html","title":"DefinedTypeFactory - kt","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"VagueType - field","slug":"vaguetype-field","link":"#vaguetype-field","children":[]}],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.md"}');export{e as data}; diff --git a/assets/DefinedTypeFactory.html-mINnsZd9.js b/assets/DefinedTypeFactory.html-mINnsZd9.js new file mode 100644 index 0000000..11e3934 --- /dev/null +++ b/assets/DefinedTypeFactory.html-mINnsZd9.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-597ac69b","path":"/zh-cn/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html","title":"DefinedTypeFactory - kt","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"VagueType - field","slug":"vaguetype-field","link":"#vaguetype-field","children":[]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.md"}');export{e as data}; diff --git a/assets/DexClassFinder.html-CuqfiW90.js b/assets/DexClassFinder.html-CuqfiW90.js new file mode 100644 index 0000000..79c4e67 --- /dev/null +++ b/assets/DexClassFinder.html-CuqfiW90.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-6d6cd473","path":"/en/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html","title":"DexClassFinder - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"companion object - object","slug":"companion-object-object","link":"#companion-object-object","children":[{"level":3,"title":"clearCache - method","slug":"clearcache-method","link":"#clearcache-method","children":[]}]},{"level":2,"title":"fullName - field","slug":"fullname-field","link":"#fullname-field","children":[]},{"level":2,"title":"simpleName - field","slug":"simplename-field","link":"#simplename-field","children":[]},{"level":2,"title":"singleName - field","slug":"singlename-field","link":"#singlename-field","children":[]},{"level":2,"title":"from - method","slug":"from-method","link":"#from-method","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"fullName - method","slug":"fullname-method","link":"#fullname-method","children":[]},{"level":2,"title":"simpleName - method","slug":"simplename-method","link":"#simplename-method","children":[]},{"level":2,"title":"singleName - method","slug":"singlename-method","link":"#singlename-method","children":[]},{"level":2,"title":"fullName - method","slug":"fullname-method-1","link":"#fullname-method-1","children":[]},{"level":2,"title":"simpleName - method","slug":"simplename-method-1","link":"#simplename-method-1","children":[]},{"level":2,"title":"singleName - method","slug":"singlename-method-1","link":"#singlename-method-1","children":[]},{"level":2,"title":"extends - method","slug":"extends-method","link":"#extends-method","children":[]},{"level":2,"title":"extends - method","slug":"extends-method-1","link":"#extends-method-1","children":[]},{"level":2,"title":"implements - method","slug":"implements-method","link":"#implements-method","children":[]},{"level":2,"title":"implements - method","slug":"implements-method-1","link":"#implements-method-1","children":[]},{"level":2,"title":"anonymous - method","slug":"anonymous-method","link":"#anonymous-method","children":[]},{"level":2,"title":"noExtends - method","slug":"noextends-method","link":"#noextends-method","children":[]},{"level":2,"title":"noImplements - method","slug":"noimplements-method","link":"#noimplements-method","children":[]},{"level":2,"title":"noSuper - method","slug":"nosuper-method","link":"#nosuper-method","children":[]},{"level":2,"title":"enclosing - method","slug":"enclosing-method","link":"#enclosing-method","children":[]},{"level":2,"title":"enclosing - method","slug":"enclosing-method-1","link":"#enclosing-method-1","children":[]},{"level":2,"title":"FromPackageRules - class","slug":"frompackagerules-class","link":"#frompackagerules-class","children":[{"level":3,"title":"absolute - method","slug":"absolute-method","link":"#absolute-method","children":[]}]},{"level":2,"title":"ClassNameRules - class","slug":"classnamerules-class","link":"#classnamerules-class","children":[{"level":3,"title":"optional - method","slug":"optional-method","link":"#optional-method","children":[]}]},{"level":2,"title":"member - method","slug":"member-method","link":"#member-method","children":[]},{"level":2,"title":"field - method","slug":"field-method","link":"#field-method","children":[]},{"level":2,"title":"method - method","slug":"method-method","link":"#method-method","children":[]},{"level":2,"title":"constructor - method","slug":"constructor-method","link":"#constructor-method","children":[]},{"level":2,"title":"Result - class","slug":"result-class","link":"#result-class","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"all - method","slug":"all-method-1","link":"#all-method-1","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"onNoClassDefFoundError - method","slug":"onnoclassdeffounderror-method","link":"#onnoclassdeffounderror-method","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]}]}],"git":{"updatedTime":1696178135000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.md"}');export{e as data}; diff --git a/assets/DexClassFinder.html-UYJDQWR2.js b/assets/DexClassFinder.html-UYJDQWR2.js new file mode 100644 index 0000000..50e7af9 --- /dev/null +++ b/assets/DexClassFinder.html-UYJDQWR2.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-2d13d624","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html","title":"DexClassFinder - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"companion object - object","slug":"companion-object-object","link":"#companion-object-object","children":[{"level":3,"title":"clearCache - method","slug":"clearcache-method","link":"#clearcache-method","children":[]}]},{"level":2,"title":"fullName - field","slug":"fullname-field","link":"#fullname-field","children":[]},{"level":2,"title":"simpleName - field","slug":"simplename-field","link":"#simplename-field","children":[]},{"level":2,"title":"singleName - field","slug":"singlename-field","link":"#singlename-field","children":[]},{"level":2,"title":"from - method","slug":"from-method","link":"#from-method","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"fullName - method","slug":"fullname-method","link":"#fullname-method","children":[]},{"level":2,"title":"simpleName - method","slug":"simplename-method","link":"#simplename-method","children":[]},{"level":2,"title":"singleName - method","slug":"singlename-method","link":"#singlename-method","children":[]},{"level":2,"title":"fullName - method","slug":"fullname-method-1","link":"#fullname-method-1","children":[]},{"level":2,"title":"simpleName - method","slug":"simplename-method-1","link":"#simplename-method-1","children":[]},{"level":2,"title":"singleName - method","slug":"singlename-method-1","link":"#singlename-method-1","children":[]},{"level":2,"title":"extends - method","slug":"extends-method","link":"#extends-method","children":[]},{"level":2,"title":"extends - method","slug":"extends-method-1","link":"#extends-method-1","children":[]},{"level":2,"title":"implements - method","slug":"implements-method","link":"#implements-method","children":[]},{"level":2,"title":"implements - method","slug":"implements-method-1","link":"#implements-method-1","children":[]},{"level":2,"title":"anonymous - method","slug":"anonymous-method","link":"#anonymous-method","children":[]},{"level":2,"title":"noExtends - method","slug":"noextends-method","link":"#noextends-method","children":[]},{"level":2,"title":"noImplements - method","slug":"noimplements-method","link":"#noimplements-method","children":[]},{"level":2,"title":"noSuper - method","slug":"nosuper-method","link":"#nosuper-method","children":[]},{"level":2,"title":"enclosing - method","slug":"enclosing-method","link":"#enclosing-method","children":[]},{"level":2,"title":"enclosing - method","slug":"enclosing-method-1","link":"#enclosing-method-1","children":[]},{"level":2,"title":"FromPackageRules - class","slug":"frompackagerules-class","link":"#frompackagerules-class","children":[{"level":3,"title":"absolute - method","slug":"absolute-method","link":"#absolute-method","children":[]}]},{"level":2,"title":"ClassNameRules - class","slug":"classnamerules-class","link":"#classnamerules-class","children":[{"level":3,"title":"optional - method","slug":"optional-method","link":"#optional-method","children":[]}]},{"level":2,"title":"member - method","slug":"member-method","link":"#member-method","children":[]},{"level":2,"title":"field - method","slug":"field-method","link":"#field-method","children":[]},{"level":2,"title":"method - method","slug":"method-method","link":"#method-method","children":[]},{"level":2,"title":"constructor - method","slug":"constructor-method","link":"#constructor-method","children":[]},{"level":2,"title":"Result - class","slug":"result-class","link":"#result-class","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"all - method","slug":"all-method-1","link":"#all-method-1","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"onNoClassDefFoundError - method","slug":"onnoclassdeffounderror-method","link":"#onnoclassdeffounderror-method","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]}]}],"git":{"updatedTime":1696178135000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.md"}');export{e as data}; diff --git a/assets/DexClassFinder.html-oDUXm983.js b/assets/DexClassFinder.html-oDUXm983.js new file mode 100644 index 0000000..e27e7b6 --- /dev/null +++ b/assets/DexClassFinder.html-oDUXm983.js @@ -0,0 +1,46 @@ +import{_ as s,o as e,c as a,a as o}from"./app-Un_zyw_U.js";const n={},l=o(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

DexClassFinder - class

class DexClassFinder internal constructor(
+    private val context: Context?,
+    internal var name: String,
+    internal var async: Boolean,
+    override val loaderSet: ClassLoader?
+) : ClassBaseFinder
+

Change Records

v1.0.0 first

Function Illustrate

Class 查找类。

可使用 BaseDexClassLoader 通过指定条件查找指定 Class 或一组 Class

Notice

此功能尚在试验阶段,性能与稳定性可能仍然存在问题,使用过程遇到问题请向我们报告并帮助我们改进。

companion object - object

Change Records

v1.0.0 first

clearCache - method

fun clearCache(context: Context, versionName: String?, versionCode: Long?)
+

Change Records

v1.0.0 first

Function Illustrate

清除当前 DexClassFinderClass 缓存。

适用于全部通过 ClassLoader.searchClass 获取的 DexClassFinder

fullName - field

var fullName: String
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 完整名称。

只会查找匹配到的 Class.getName

例如 com.demo.Test 需要填写 com.demo.Test

simpleName - field

var simpleName: String
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 简单名称。

只会查找匹配到的 Class.getSimpleName

例如 com.demo.Test 只需要填写 Test

对于匿名类例如 com.demo.Test$InnerTest 会为空,此时你可以使用 singleName

singleName - field

var singleName: String
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 独立名称。

设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

例如 com.demo.Test 只需要填写 Test

对于匿名类例如 com.demo.Test$InnerTest 只需要填写 Test$InnerTest

from - method

fun from(vararg name: String): FromPackageRules
+

Change Records

v1.0.0 first

Function Illustrate

设置在指定包名范围查找当前 Class

设置后仅会在当前 name 开头匹配的包名路径下进行查找,可提升查找速度。

例如 ↓

com.demo.test

com.demo.test.demo

Notice

建议设置此参数指定查找范围,否则 Class 过多时将会非常慢。

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 标识符筛选条件。

可不设置筛选条件。

fullName - method

fun fullName(value: String): ClassNameRules
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 完整名称。

只会查找匹配到的 Class.getName

例如 com.demo.Test 需要填写 com.demo.Test

simpleName - method

fun simpleName(value: String): ClassNameRules
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 简单名称。

只会查找匹配到的 Class.getSimpleName

例如 com.demo.Test 只需要填写 Test

对于匿名类例如 com.demo.Test$InnerTest 会为空,此时你可以使用 singleName

singleName - method

fun singleName(value: String): ClassNameRules
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 独立名称。

设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

例如 com.demo.Test 只需要填写 Test

对于匿名类例如 com.demo.Test$InnerTest 只需要填写 Test$InnerTest

fullName - method

fun fullName(conditions: NameConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 完整名称条件。

只会查找匹配到的 Class.getName

simpleName - method

fun simpleName(conditions: NameConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 简单名称条件。

只会查找匹配到的 Class.getSimpleName

singleName - method

fun singleName(conditions: NameConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 独立名称条件。

设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

extends - method

inline fun <reified T> extends()
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 继承的父类。

extends - method

fun extends(vararg name: String)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 继承的父类。

会同时查找 name 中所有匹配的父类。

implements - method

inline fun <reified T> implements()
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 实现的接口类。

implements - method

fun implements(vararg name: String)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 实现的接口类。

会同时查找 name 中所有匹配的接口类。

anonymous - method

fun anonymous()
+

Change Records

v1.0.0 first

Function Illustrate

标识 Class 为匿名类。

例如 com.demo.Test$1com.demo.Test$InnerTest

标识后你可以使用 enclosing 来进一步指定匿名类的 (封闭类) 主类。

noExtends - method

fun noExtends()
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 没有任何继承。

此时 Class 只应该继承于 Any

Notice

设置此条件后 extends 将失效。

noImplements - method

fun noImplements()
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 没有任何接口。

Notice

设置此条件后 implements 将失效。

noSuper - method

fun noSuper()
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 没有任何继承与接口。

此时 Class 只应该继承于 Any

Notice

设置此条件后 extendsimplements 将失效。

enclosing - method

inline fun <reified T> enclosing()
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 匿名类的 (封闭类) 主类。

enclosing - method

fun enclosing(vararg name: String)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 匿名类的 (封闭类) 主类。

会同时查找 name 中所有匹配的 (封闭类) 主类。

FromPackageRules - class

inner class FromPackageRules internal constructor(private val packages: MutableList<ClassRulesData.PackageRulesData>)
+

Change Records

v1.0.0 first

Function Illustrate

包名范围名称过滤匹配条件实现类。

absolute - method

fun absolute()
+

Change Records

v1.0.0 first

Function Illustrate

设置包名绝对匹配。

例如有如下包名 ↓

com.demo.test.a

com.demo.test.a.b

com.demo.test.active

若包名条件为 com.demo.test.a 则绝对匹配仅能匹配到第一个。

相反地,不设置以上示例会全部匹配。

ClassNameRules - class

inner class ClassNameRules internal constructor(private val name: ClassRulesData.NameRulesData)
+

Change Records

v1.0.0 first

Function Illustrate

类名匹配条件实现类。

optional - method

fun optional()
+

Change Records

v1.0.0 first

Function Illustrate

设置类名可选。

例如有如下类名 ↓

com.demo.Test fullName / Test simpleName

defpackage.a fullName / a simpleName

这两个类名都是同一个类,但是在有些版本中被混淆有些版本没有。

此时可设置类名为 com.demo.Test fullName / Test simpleName

这样就可在完全匹配类名情况下使用类名而忽略其它查找条件,否则忽略此条件继续使用其它查找条件。

member - method

inline fun member(initiate: MemberRules.() -> Unit): MemberRulesResult
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 满足的 Member 条件。

field - method

inline fun field(initiate: FieldRules.() -> Unit): MemberRulesResult
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 满足的 Field 条件。

method - method

inline fun method(initiate: MethodRules.() -> Unit): MemberRulesResult
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 满足的 Method 条件。

constructor - method

inline fun constructor(initiate: ConstructorRules.() -> Unit): MemberRulesResult
+

Change Records

v1.0.0 first

Function Illustrate

设置 Class 满足的 Constructor 条件。

Result - class

inner class Result internal constructor(internal var isNotFound: Boolean, internal var throwable: Throwable?) : BaseResult
+

Change Records

v1.0.0 first

Function Illustrate

Class 查找结果实现类。

result - method

inline fun result(initiate: Result.() -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

创建监听结果事件方法体。

get - method

fun get(): Class<*>?
+

Change Records

v1.0.0 first

Function Illustrate

得到 Class 本身。

若有多个 Class 结果只会返回第一个。

在查找条件找不到任何结果的时候将返回 null

若你设置了 async 请使用 wait 方法。

all - method

fun all(): MutableList<Class<*>>
+

Change Records

v1.0.0 first

v1.0.3 modified

返回值类型由 HashSet 修改为 MutableList

Function Illustrate

得到 Class 本身数组。

返回全部查找条件匹配的多个 Class 实例。

在查找条件找不到任何结果的时候将返回空的 MutableList

若你设置了 async 请使用 waitAll 方法。

all - method

fun all(result: (Class<*>) -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

得到 Class 本身数组 (依次遍历)。

回调全部查找条件匹配的多个 Class 实例。

在查找条件找不到任何结果的时候将不会执行。

若你设置了 async 请使用 waitAll 方法。

wait - method

fun wait(result: (Class<*>?) -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

得到 Class 本身 (异步)。

若有多个 Class 结果只会回调第一个。

在查找条件找不到任何结果的时候将回调 null。

你需要设置 async 后此方法才会被回调,否则请使用 get 方法。

waitAll - method

fun waitAll(result: (MutableList<Class<*>>) -> Unit): Result
+

Change Records

v1.0.0 first

v1.0.3 modified

result 类型由 HashSet 修改为 MutableList

Function Illustrate

得到 Class 本身数组 (异步)。

回调全部查找条件匹配的多个 Class 实例。

在查找条件找不到任何结果的时候将回调空的 MutableList

你需要设置 async 后此方法才会被回调,否则请使用 all 方法。

onNoClassDefFoundError - method

fun onNoClassDefFoundError(result: (Throwable) -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

监听找不到 Class 时。

ignored - method

fun ignored(): Result
+

Change Records

v1.0.0 first

Function Illustrate

忽略异常并停止打印任何错误日志。

此时若要监听异常结果,你需要手动实现 onNoClassDefFoundError 方法。

`,314),t=[l];function p(c,r){return e(),a("div",null,t)}const i=s(n,[["render",p],["__file","DexClassFinder.html.vue"]]);export{i as default}; diff --git a/assets/DexClassFinder.html-tnGJIsCX.js b/assets/DexClassFinder.html-tnGJIsCX.js new file mode 100644 index 0000000..8f46d7c --- /dev/null +++ b/assets/DexClassFinder.html-tnGJIsCX.js @@ -0,0 +1,46 @@ +import{_ as s,o as e,c as a,a as o}from"./app-Un_zyw_U.js";const n={},l=o(`

DexClassFinder - class

class DexClassFinder internal constructor(
+    private val context: Context?,
+    internal var name: String,
+    internal var async: Boolean,
+    override val loaderSet: ClassLoader?
+) : ClassBaseFinder
+

变更记录

v1.0.0 添加

功能描述

Class 查找类。

可使用 BaseDexClassLoader 通过指定条件查找指定 Class 或一组 Class

注意

此功能尚在试验阶段,性能与稳定性可能仍然存在问题,使用过程遇到问题请向我们报告并帮助我们改进。

companion object - object

变更记录

v1.0.0 添加

clearCache - method

fun clearCache(context: Context, versionName: String?, versionCode: Long?)
+

变更记录

v1.0.0 添加

功能描述

清除当前 DexClassFinderClass 缓存。

适用于全部通过 ClassLoader.searchClass 获取的 DexClassFinder

fullName - field

var fullName: String
+

变更记录

v1.0.0 添加

功能描述

设置 Class 完整名称。

只会查找匹配到的 Class.getName

例如 com.demo.Test 需要填写 com.demo.Test

simpleName - field

var simpleName: String
+

变更记录

v1.0.0 添加

功能描述

设置 Class 简单名称。

只会查找匹配到的 Class.getSimpleName

例如 com.demo.Test 只需要填写 Test

对于匿名类例如 com.demo.Test$InnerTest 会为空,此时你可以使用 singleName

singleName - field

var singleName: String
+

变更记录

v1.0.0 添加

功能描述

设置 Class 独立名称。

设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

例如 com.demo.Test 只需要填写 Test

对于匿名类例如 com.demo.Test$InnerTest 只需要填写 Test$InnerTest

from - method

fun from(vararg name: String): FromPackageRules
+

变更记录

v1.0.0 添加

功能描述

设置在指定包名范围查找当前 Class

设置后仅会在当前 name 开头匹配的包名路径下进行查找,可提升查找速度。

例如 ↓

com.demo.test

com.demo.test.demo

注意

建议设置此参数指定查找范围,否则 Class 过多时将会非常慢。

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Class 标识符筛选条件。

可不设置筛选条件。

fullName - method

fun fullName(value: String): ClassNameRules
+

变更记录

v1.0.0 添加

功能描述

设置 Class 完整名称。

只会查找匹配到的 Class.getName

例如 com.demo.Test 需要填写 com.demo.Test

simpleName - method

fun simpleName(value: String): ClassNameRules
+

变更记录

v1.0.0 添加

功能描述

设置 Class 简单名称。

只会查找匹配到的 Class.getSimpleName

例如 com.demo.Test 只需要填写 Test

对于匿名类例如 com.demo.Test$InnerTest 会为空,此时你可以使用 singleName

singleName - method

fun singleName(value: String): ClassNameRules
+

变更记录

v1.0.0 添加

功能描述

设置 Class 独立名称。

设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

例如 com.demo.Test 只需要填写 Test

对于匿名类例如 com.demo.Test$InnerTest 只需要填写 Test$InnerTest

fullName - method

fun fullName(conditions: NameConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Class 完整名称条件。

只会查找匹配到的 Class.getName

simpleName - method

fun simpleName(conditions: NameConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Class 简单名称条件。

只会查找匹配到的 Class.getSimpleName

singleName - method

fun singleName(conditions: NameConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Class 独立名称条件。

设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

extends - method

inline fun <reified T> extends()
+

变更记录

v1.0.0 添加

功能描述

设置 Class 继承的父类。

extends - method

fun extends(vararg name: String)
+

变更记录

v1.0.0 添加

功能描述

设置 Class 继承的父类。

会同时查找 name 中所有匹配的父类。

implements - method

inline fun <reified T> implements()
+

变更记录

v1.0.0 添加

功能描述

设置 Class 实现的接口类。

implements - method

fun implements(vararg name: String)
+

变更记录

v1.0.0 添加

功能描述

设置 Class 实现的接口类。

会同时查找 name 中所有匹配的接口类。

anonymous - method

fun anonymous()
+

变更记录

v1.0.0 添加

功能描述

标识 Class 为匿名类。

例如 com.demo.Test$1com.demo.Test$InnerTest

标识后你可以使用 enclosing 来进一步指定匿名类的 (封闭类) 主类。

noExtends - method

fun noExtends()
+

变更记录

v1.0.0 添加

功能描述

设置 Class 没有任何继承。

此时 Class 只应该继承于 Any

注意

设置此条件后 extends 将失效。

noImplements - method

fun noImplements()
+

变更记录

v1.0.0 添加

功能描述

设置 Class 没有任何接口。

注意

设置此条件后 implements 将失效。

noSuper - method

fun noSuper()
+

变更记录

v1.0.0 添加

功能描述

设置 Class 没有任何继承与接口。

此时 Class 只应该继承于 Any

注意

设置此条件后 extendsimplements 将失效。

enclosing - method

inline fun <reified T> enclosing()
+

变更记录

v1.0.0 添加

功能描述

设置 Class 匿名类的 (封闭类) 主类。

enclosing - method

fun enclosing(vararg name: String)
+

变更记录

v1.0.0 添加

功能描述

设置 Class 匿名类的 (封闭类) 主类。

会同时查找 name 中所有匹配的 (封闭类) 主类。

FromPackageRules - class

inner class FromPackageRules internal constructor(private val packages: MutableList<ClassRulesData.PackageRulesData>)
+

变更记录

v1.0.0 添加

功能描述

包名范围名称过滤匹配条件实现类。

absolute - method

fun absolute()
+

变更记录

v1.0.0 添加

功能描述

设置包名绝对匹配。

例如有如下包名 ↓

com.demo.test.a

com.demo.test.a.b

com.demo.test.active

若包名条件为 com.demo.test.a 则绝对匹配仅能匹配到第一个。

相反地,不设置以上示例会全部匹配。

ClassNameRules - class

inner class ClassNameRules internal constructor(private val name: ClassRulesData.NameRulesData)
+

变更记录

v1.0.0 添加

功能描述

类名匹配条件实现类。

optional - method

fun optional()
+

变更记录

v1.0.0 添加

功能描述

设置类名可选。

例如有如下类名 ↓

com.demo.Test fullName / Test simpleName

defpackage.a fullName / a simpleName

这两个类名都是同一个类,但是在有些版本中被混淆有些版本没有。

此时可设置类名为 com.demo.Test fullName / Test simpleName

这样就可在完全匹配类名情况下使用类名而忽略其它查找条件,否则忽略此条件继续使用其它查找条件。

member - method

inline fun member(initiate: MemberRules.() -> Unit): MemberRulesResult
+

变更记录

v1.0.0 添加

功能描述

设置 Class 满足的 Member 条件。

field - method

inline fun field(initiate: FieldRules.() -> Unit): MemberRulesResult
+

变更记录

v1.0.0 添加

功能描述

设置 Class 满足的 Field 条件。

method - method

inline fun method(initiate: MethodRules.() -> Unit): MemberRulesResult
+

变更记录

v1.0.0 添加

功能描述

设置 Class 满足的 Method 条件。

constructor - method

inline fun constructor(initiate: ConstructorRules.() -> Unit): MemberRulesResult
+

变更记录

v1.0.0 添加

功能描述

设置 Class 满足的 Constructor 条件。

Result - class

inner class Result internal constructor(internal var isNotFound: Boolean, internal var throwable: Throwable?) : BaseResult
+

变更记录

v1.0.0 添加

功能描述

Class 查找结果实现类。

result - method

inline fun result(initiate: Result.() -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

创建监听结果事件方法体。

get - method

fun get(): Class<*>?
+

变更记录

v1.0.0 添加

功能描述

得到 Class 本身。

若有多个 Class 结果只会返回第一个。

在查找条件找不到任何结果的时候将返回 null

若你设置了 async 请使用 wait 方法。

all - method

fun all(): MutableList<Class<*>>
+

变更记录

v1.0.0 添加

v1.0.3 修改

返回值类型由 HashSet 修改为 MutableList

功能描述

得到 Class 本身数组。

返回全部查找条件匹配的多个 Class 实例。

在查找条件找不到任何结果的时候将返回空的 MutableList

若你设置了 async 请使用 waitAll 方法。

all - method

fun all(result: (Class<*>) -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

得到 Class 本身数组 (依次遍历)。

回调全部查找条件匹配的多个 Class 实例。

在查找条件找不到任何结果的时候将不会执行。

若你设置了 async 请使用 waitAll 方法。

wait - method

fun wait(result: (Class<*>?) -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

得到 Class 本身 (异步)。

若有多个 Class 结果只会回调第一个。

在查找条件找不到任何结果的时候将回调 null。

你需要设置 async 后此方法才会被回调,否则请使用 get 方法。

waitAll - method

fun waitAll(result: (MutableList<Class<*>>) -> Unit): Result
+

变更记录

v1.0.0 添加

v1.0.3 修改

result 类型由 HashSet 修改为 MutableList

功能描述

得到 Class 本身数组 (异步)。

回调全部查找条件匹配的多个 Class 实例。

在查找条件找不到任何结果的时候将回调空的 MutableList

你需要设置 async 后此方法才会被回调,否则请使用 all 方法。

onNoClassDefFoundError - method

fun onNoClassDefFoundError(result: (Throwable) -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

监听找不到 Class 时。

ignored - method

fun ignored(): Result
+

变更记录

v1.0.0 添加

功能描述

忽略异常并停止打印任何错误日志。

此时若要监听异常结果,你需要手动实现 onNoClassDefFoundError 方法。

`,313),p=[l];function c(t,d){return e(),a("div",null,p)}const i=s(n,[["render",c],["__file","DexClassFinder.html.vue"]]);export{i as default}; diff --git a/assets/FieldFinder.html-CaQR3qZR.js b/assets/FieldFinder.html-CaQR3qZR.js new file mode 100644 index 0000000..71c6005 --- /dev/null +++ b/assets/FieldFinder.html-CaQR3qZR.js @@ -0,0 +1,84 @@ +import{_ as s,o as n,c as e,a}from"./app-Un_zyw_U.js";const o={},l=a(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

FieldFinder - class

class FieldFinder internal constructor(override val classSet: Class<*>?) : MemberBaseFinder
+

Change Records

v1.0.0 first

Function Illustrate

Field 查找类。

可通过指定类型查找指定 Field 或一组 Field

name - field

var name: String
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 名称。

Pay Attention

若不填写名称则必须存在一个其它条件。

type - field

var type: Any?
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 类型。

可不填写类型。

modifiers - method

fun modifiers(conditions: ModifierConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 标识符筛选条件。

可不设置筛选条件。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

order - method

fun order(): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

顺序筛选字节码的下标。

name - method

fun name(value: String): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 名称。

Pay Attention

若不填写名称则必须存在一个其它条件。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

name - method

fun name(conditions: NameConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 名称条件。

Pay Attention

若不填写名称则必须存在一个其它条件。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

type - method

fun type(value: Any): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 类型。

可不填写类型。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

type - method

fun type(conditions: ObjectConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 类型条件。

可不填写类型。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

superClass - method

fun superClass(isOnlySuperClass: Boolean)
+

Change Records

v1.0.0 first

Function Illustrate

设置在 classSet 的所有父类中查找当前 Field

Notice

若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

RemedyPlan - class

inner class RemedyPlan internal constructor()
+

Change Records

v1.0.0 first

Function Illustrate

Field 重查找实现类,可累计失败次数直到查找成功。

field - method

inline fun field(initiate: FieldConditions): Result
+

Change Records

v1.0.0 first

Function Illustrate

创建需要重新查找的 Field

你可以添加多个备选 Field,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

Result - class

inner class Result internal constructor()
+

Change Records

v1.0.0 first

Function Illustrate

RemedyPlan 结果实现类。

onFind - method

fun onFind(initiate: MutableList<Field>.() -> Unit)
+

Change Records

v1.0.0 first

v1.0.3 modified

initiate 类型由 HashSet 修改为 MutableList

Function Illustrate

当在 RemedyPlan 中找到结果时。

Function Example

你可以方便地对重查找的 Field 实现 onFind 方法。

The following example

field {
+    // Your code here.
+}.onFind {
+    // Your code here.
+}
+

Result - class

inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
+

Change Records

v1.0.0 first

Function Illustrate

Field 查找结果实现类。

result - method

inline fun result(initiate: Result.() -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

创建监听结果事件方法体。

Function Example

你可以使用 lambda 形式创建 Result 类。

The following example

field {
+    // Your code here.
+}.result {
+    get(instance).set("something")
+    get(instance).string()
+    get(instance).cast<CustomClass>()
+    get().boolean()
+    all(instance)
+    give()
+    giveAll()
+    onNoSuchField {}
+}
+

get - method

fun get(instance: Any?): Instance
+

Change Records

v1.0.0 first

Function Illustrate

获得 Field 实例处理类。

若有多个 Field 结果只会返回第一个。

Function Example

你可以轻松地得到 Field 的实例以及使用它进行设置实例。

The following example

field {
+    // Your code here.
+}.get(instance).set("something")
+

如果你取到的是静态 Field,可以不需要设置实例。

The following example

field {
+    // Your code here.
+}.get().set("something")
+

all - method

fun all(instance: Any?): MutableList<Instance>
+

Change Records

v1.0.0 first

v1.0.3 modified

返回值类型由 ArrayList 修改为 MutableList

Function Illustrate

获得 Field 实例处理类数组。

返回全部查找条件匹配的多个 Field 实例结果。

Function Example

你可以通过此方法来获得当前条件结果中匹配的全部 Field,其 Field 所在实例用法与 get 相同。

The following example

field {
+    // Your code here.
+}.all(instance).forEach { instance ->
+    instance.self
+}
+

give - method

fun give(): Field?
+

Change Records

v1.0.0 first

Function Illustrate

得到 Field 本身。

若有多个 Field 结果只会返回第一个。

在查找条件找不到任何结果的时候将返回 null

giveAll - method

fun giveAll(): MutableList<Field>
+

Change Records

v1.0.0 first

v1.0.3 modified

返回值类型由 HashSet 修改为 MutableList

Function Illustrate

得到 Field 本身数组。

返回全部查找条件匹配的多个 Field 实例。

在查找条件找不到任何结果的时候将返回空的 MutableList

wait - method

fun wait(instance: Any?, initiate: Instance.() -> Unit)
+

Change Records

v1.0.0 first

Function Illustrate

获得 Field 实例处理类,配合 RemedyPlan 使用。

若有多个 Field 结果只会返回第一个。

Pay Attention

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

waitAll - method

fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
+

Change Records

v1.0.0 first

v1.0.3 modified

initiate 类型由 ArrayList 修改为 MutableList

Function Illustrate

获得 Field 实例处理类数组,配合 RemedyPlan 使用。

返回全部查找条件匹配的多个 Field 实例结果。

Pay Attention

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

remedys - method

inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

创建 Field 重查找功能。

Function Example

当你遇到一种 Field 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchField 捕获异常二次查找 Field

若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

The following example

field {
+    // Your code here.
+}.remedys {
+    field {
+        // Your code here.
+    }
+    field {
+        // Your code here.
+    }
+}
+

onNoSuchField - method

fun onNoSuchField(result: (Throwable) -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

监听找不到 Field 时。

ignored - method

fun ignored(): Result
+

Change Records

v1.0.0 first

Function Illustrate

忽略异常并停止打印任何错误日志。

Notice

此时若要监听异常结果,你需要手动实现 onNoSuchField 方法。

Instance - class

inner class Instance internal constructor(private val instance: Any?, private val field: Field?)
+

Change Records

v1.0.0 first

Function Illustrate

Field 实例变量处理类。

current - method

fun current(ignored: Boolean): CurrentClass?
+
inline fun current(ignored: Boolean, initiate: CurrentClass.() -> Unit): Any?
+

Change Records

v1.0.0 first

Function Illustrate

获得当前 Field 自身 self 实例的类操作对象 CurrentClass

cast - method

fun <T> cast(): T?
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field 实例。

byte - method

fun byte(): Byte?
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Byte 实例。

int - method

fun int(): Int
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Int 实例。

long - method

fun long(): Long
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Long 实例。

short - method

fun short(): Short
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Short 实例。

double - method

fun double(): Double
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Double 实例。

float - method

fun float(): Float
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Float 实例。

string - method

fun string(): String
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field String 实例。

char - method

fun char(): Char
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Char 实例。

boolean - method

fun boolean(): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Boolean 实例。

any - method

fun any(): Any?
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Any 实例。

array - method

inline fun <reified T> array(): Array<T>
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field Array 实例。

list - method

inline fun <reified T> list(): List<T>
+

Change Records

v1.0.0 first

Function Illustrate

得到当前 Field List 实例。

set - method

fun set(any: Any?)
+

Change Records

v1.0.0 first

Function Illustrate

设置当前 Field 实例。

setTrue - method

fun setTrue()
+

Change Records

v1.0.0 first

Function Illustrate

设置当前 Field 实例为 true

Pay Attention

请确保实例对象类型为 Boolean

setFalse - method

fun setFalse()
+

Change Records

v1.0.0 first

Function Illustrate

设置当前 Field 实例为 false

Pay Attention

请确保实例对象类型为 Boolean

setNull - method

fun setNull()
+

Change Records

v1.0.0 first

Function Illustrate

设置当前 Field 实例为 null

`,324),t=[l];function p(c,r){return n(),e("div",null,t)}const i=s(o,[["render",p],["__file","FieldFinder.html.vue"]]);export{i as default}; diff --git a/assets/FieldFinder.html-SCPPTVS5.js b/assets/FieldFinder.html-SCPPTVS5.js new file mode 100644 index 0000000..a375830 --- /dev/null +++ b/assets/FieldFinder.html-SCPPTVS5.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-4b907076","path":"/en/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html","title":"FieldFinder - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"type - field","slug":"type-field","link":"#type-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"order - method","slug":"order-method","link":"#order-method","children":[]},{"level":2,"title":"name - method","slug":"name-method","link":"#name-method","children":[]},{"level":2,"title":"name - method","slug":"name-method-1","link":"#name-method-1","children":[]},{"level":2,"title":"type - method","slug":"type-method","link":"#type-method","children":[]},{"level":2,"title":"type - method","slug":"type-method-1","link":"#type-method-1","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"RemedyPlan - class","slug":"remedyplan-class","link":"#remedyplan-class","children":[{"level":3,"title":"field - method","slug":"field-method","link":"#field-method","children":[]},{"level":3,"title":"Result - class","slug":"result-class","link":"#result-class","children":[]}]},{"level":2,"title":"Result - class","slug":"result-class-1","link":"#result-class-1","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"give - method","slug":"give-method","link":"#give-method","children":[]},{"level":3,"title":"giveAll - method","slug":"giveall-method","link":"#giveall-method","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method","link":"#remedys-method","children":[]},{"level":3,"title":"onNoSuchField - method","slug":"onnosuchfield-method","link":"#onnosuchfield-method","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]},{"level":3,"title":"Instance - class","slug":"instance-class","link":"#instance-class","children":[]}]}],"git":{"updatedTime":1696172435000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.md"}');export{e as data}; diff --git a/assets/FieldFinder.html-_oWPO7Eh.js b/assets/FieldFinder.html-_oWPO7Eh.js new file mode 100644 index 0000000..43d0dd5 --- /dev/null +++ b/assets/FieldFinder.html-_oWPO7Eh.js @@ -0,0 +1,84 @@ +import{_ as s,o as a,c as n,a as e}from"./app-Un_zyw_U.js";const o={},l=e(`

FieldFinder - class

class FieldFinder internal constructor(override val classSet: Class<*>?) : MemberBaseFinder
+

变更记录

v1.0.0 添加

功能描述

Field 查找类。

可通过指定类型查找指定 Field 或一组 Field

name - field

var name: String
+

变更记录

v1.0.0 添加

功能描述

设置 Field 名称。

特别注意

若不填写名称则必须存在一个其它条件。

type - field

var type: Any?
+

变更记录

v1.0.0 添加

功能描述

设置 Field 类型。

可不填写类型。

modifiers - method

fun modifiers(conditions: ModifierConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Field 标识符筛选条件。

可不设置筛选条件。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

order - method

fun order(): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

顺序筛选字节码的下标。

name - method

fun name(value: String): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Field 名称。

特别注意

若不填写名称则必须存在一个其它条件。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

name - method

fun name(conditions: NameConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Field 名称条件。

特别注意

若不填写名称则必须存在一个其它条件。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

type - method

fun type(value: Any): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Field 类型。

可不填写类型。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

type - method

fun type(conditions: ObjectConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Field 类型条件。

可不填写类型。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

superClass - method

fun superClass(isOnlySuperClass: Boolean)
+

变更记录

v1.0.0 添加

功能描述

设置在 classSet 的所有父类中查找当前 Field

注意

若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

RemedyPlan - class

inner class RemedyPlan internal constructor()
+

变更记录

v1.0.0 添加

功能描述

Field 重查找实现类,可累计失败次数直到查找成功。

field - method

inline fun field(initiate: FieldConditions): Result
+

变更记录

v1.0.0 添加

功能描述

创建需要重新查找的 Field

你可以添加多个备选 Field,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

Result - class

inner class Result internal constructor()
+

变更记录

v1.0.0 添加

功能描述

RemedyPlan 结果实现类。

onFind - method

fun onFind(initiate: MutableList<Field>.() -> Unit)
+

变更记录

v1.0.0 添加

v1.0.3 修改

initiate 类型由 HashSet 修改为 MutableList

功能描述

当在 RemedyPlan 中找到结果时。

功能示例

你可以方便地对重查找的 Field 实现 onFind 方法。

示例如下

field {
+    // Your code here.
+}.onFind {
+    // Your code here.
+}
+

Result - class

inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
+

变更记录

v1.0.0 添加

功能描述

Field 查找结果实现类。

result - method

inline fun result(initiate: Result.() -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

创建监听结果事件方法体。

功能示例

你可以使用 lambda 形式创建 Result 类。

示例如下

field {
+    // Your code here.
+}.result {
+    get(instance).set("something")
+    get(instance).string()
+    get(instance).cast<CustomClass>()
+    get().boolean()
+    all(instance)
+    give()
+    giveAll()
+    onNoSuchField {}
+}
+

get - method

fun get(instance: Any?): Instance
+

变更记录

v1.0.0 添加

功能描述

获得 Field 实例处理类。

若有多个 Field 结果只会返回第一个。

功能示例

你可以轻松地得到 Field 的实例以及使用它进行设置实例。

示例如下

field {
+    // Your code here.
+}.get(instance).set("something")
+

如果你取到的是静态 Field,可以不需要设置实例。

示例如下

field {
+    // Your code here.
+}.get().set("something")
+

all - method

fun all(instance: Any?): MutableList<Instance>
+

变更记录

v1.0.0 添加

v1.0.3 修改

返回值类型由 ArrayList 修改为 MutableList

功能描述

获得 Field 实例处理类数组。

返回全部查找条件匹配的多个 Field 实例结果。

功能示例

你可以通过此方法来获得当前条件结果中匹配的全部 Field,其 Field 所在实例用法与 get 相同。

示例如下

field {
+    // Your code here.
+}.all(instance).forEach { instance ->
+    instance.self
+}
+

give - method

fun give(): Field?
+

变更记录

v1.0.0 添加

功能描述

得到 Field 本身。

若有多个 Field 结果只会返回第一个。

在查找条件找不到任何结果的时候将返回 null

giveAll - method

fun giveAll(): MutableList<Field>
+

变更记录

v1.0.0 添加

v1.0.3 修改

返回值类型由 HashSet 修改为 MutableList

功能描述

得到 Field 本身数组。

返回全部查找条件匹配的多个 Field 实例。

在查找条件找不到任何结果的时候将返回空的 MutableList

wait - method

fun wait(instance: Any?, initiate: Instance.() -> Unit)
+

变更记录

v1.0.0 添加

功能描述

获得 Field 实例处理类,配合 RemedyPlan 使用。

若有多个 Field 结果只会返回第一个。

特别注意

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

waitAll - method

fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
+

变更记录

v1.0.0 添加

v1.0.3 修改

initiate 类型由 ArrayList 修改为 MutableList

功能描述

获得 Field 实例处理类数组,配合 RemedyPlan 使用。

返回全部查找条件匹配的多个 Field 实例结果。

特别注意

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

remedys - method

inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

创建 Field 重查找功能。

功能示例

当你遇到一种 Field 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchField 捕获异常二次查找 Field

若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

示例如下

field {
+    // Your code here.
+}.remedys {
+    field {
+        // Your code here.
+    }
+    field {
+        // Your code here.
+    }
+}
+

onNoSuchField - method

fun onNoSuchField(result: (Throwable) -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

监听找不到 Field 时。

ignored - method

fun ignored(): Result
+

变更记录

v1.0.0 添加

功能描述

忽略异常并停止打印任何错误日志。

注意

此时若要监听异常结果,你需要手动实现 onNoSuchField 方法。

Instance - class

inner class Instance internal constructor(private val instance: Any?, private val field: Field?)
+

变更记录

v1.0.0 添加

功能描述

Field 实例变量处理类。

current - method

fun current(ignored: Boolean): CurrentClass?
+
inline fun current(ignored: Boolean, initiate: CurrentClass.() -> Unit): Any?
+

变更记录

v1.0.0 添加

功能描述

获得当前 Field 自身 self 实例的类操作对象 CurrentClass

cast - method

fun <T> cast(): T?
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field 实例。

byte - method

fun byte(): Byte?
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Byte 实例。

int - method

fun int(): Int
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Int 实例。

long - method

fun long(): Long
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Long 实例。

short - method

fun short(): Short
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Short 实例。

double - method

fun double(): Double
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Double 实例。

float - method

fun float(): Float
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Float 实例。

string - method

fun string(): String
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field String 实例。

char - method

fun char(): Char
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Char 实例。

boolean - method

fun boolean(): Boolean
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Boolean 实例。

any - method

fun any(): Any?
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Any 实例。

array - method

inline fun <reified T> array(): Array<T>
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field Array 实例。

list - method

inline fun <reified T> list(): List<T>
+

变更记录

v1.0.0 添加

功能描述

得到当前 Field List 实例。

set - method

fun set(any: Any?)
+

变更记录

v1.0.0 添加

功能描述

设置当前 Field 实例。

setTrue - method

fun setTrue()
+

变更记录

v1.0.0 添加

功能描述

设置当前 Field 实例为 true

特别注意

请确保实例对象类型为 Boolean

setFalse - method

fun setFalse()
+

变更记录

v1.0.0 添加

功能描述

设置当前 Field 实例为 false

特别注意

请确保实例对象类型为 Boolean

setNull - method

fun setNull()
+

变更记录

v1.0.0 添加

功能描述

设置当前 Field 实例为 null

`,323),p=[l];function t(c,d){return a(),n("div",null,p)}const i=s(o,[["render",t],["__file","FieldFinder.html.vue"]]);export{i as default}; diff --git a/assets/FieldFinder.html-zKtt89hV.js b/assets/FieldFinder.html-zKtt89hV.js new file mode 100644 index 0000000..323f215 --- /dev/null +++ b/assets/FieldFinder.html-zKtt89hV.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-293ae898","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html","title":"FieldFinder - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"type - field","slug":"type-field","link":"#type-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"order - method","slug":"order-method","link":"#order-method","children":[]},{"level":2,"title":"name - method","slug":"name-method","link":"#name-method","children":[]},{"level":2,"title":"name - method","slug":"name-method-1","link":"#name-method-1","children":[]},{"level":2,"title":"type - method","slug":"type-method","link":"#type-method","children":[]},{"level":2,"title":"type - method","slug":"type-method-1","link":"#type-method-1","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"RemedyPlan - class","slug":"remedyplan-class","link":"#remedyplan-class","children":[{"level":3,"title":"field - method","slug":"field-method","link":"#field-method","children":[]},{"level":3,"title":"Result - class","slug":"result-class","link":"#result-class","children":[]}]},{"level":2,"title":"Result - class","slug":"result-class-1","link":"#result-class-1","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"give - method","slug":"give-method","link":"#give-method","children":[]},{"level":3,"title":"giveAll - method","slug":"giveall-method","link":"#giveall-method","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method","link":"#remedys-method","children":[]},{"level":3,"title":"onNoSuchField - method","slug":"onnosuchfield-method","link":"#onnosuchfield-method","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]},{"level":3,"title":"Instance - class","slug":"instance-class","link":"#instance-class","children":[]}]}],"git":{"updatedTime":1696172435000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.md"}');export{e as data}; diff --git a/assets/FieldRules.html-IMr78QcL.js b/assets/FieldRules.html-IMr78QcL.js new file mode 100644 index 0000000..32e69a7 --- /dev/null +++ b/assets/FieldRules.html-IMr78QcL.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-30993156","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html","title":"FieldRules - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"type - field","slug":"type-field","link":"#type-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"name - method","slug":"name-method","link":"#name-method","children":[]},{"level":2,"title":"type - method","slug":"type-method","link":"#type-method","children":[]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.md"}');export{e as data}; diff --git a/assets/FieldRules.html-J5ZPIA8O.js b/assets/FieldRules.html-J5ZPIA8O.js new file mode 100644 index 0000000..d91006d --- /dev/null +++ b/assets/FieldRules.html-J5ZPIA8O.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-82a85036","path":"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html","title":"FieldRules - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"type - field","slug":"type-field","link":"#type-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"name - method","slug":"name-method","link":"#name-method","children":[]},{"level":2,"title":"type - method","slug":"type-method","link":"#type-method","children":[]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.md"}');export{e as data}; diff --git a/assets/FieldRules.html-m_-yonQY.js b/assets/FieldRules.html-m_-yonQY.js new file mode 100644 index 0000000..0451d8e --- /dev/null +++ b/assets/FieldRules.html-m_-yonQY.js @@ -0,0 +1,7 @@ +import{_ as s,o as e,c as a,a as o}from"./app-Un_zyw_U.js";const n={},l=o(`

FieldRules - class

class FieldRules internal constructor(private val rulesData: FieldRulesData) : BaseRules
+

变更记录

v1.0.0 添加

功能描述

Field 查找条件实现类。

name - field

var name: String
+

变更记录

v1.0.0 添加

功能描述

设置 Field 名称。

type - field

var type: Any?
+

变更记录

v1.0.0 添加

功能描述

设置 Field 类型。

可不填写类型。

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Field 标识符筛选条件。

可不设置筛选条件。

name - method

fun name(conditions: NameConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Field 名称条件。

type - method

fun type(conditions: ObjectConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Field 类型条件。

可不填写类型。

`,39),p=[l];function c(t,d){return e(),a("div",null,p)}const i=s(n,[["render",c],["__file","FieldRules.html.vue"]]);export{i as default}; diff --git a/assets/FieldRules.html-tbZ9y4HH.js b/assets/FieldRules.html-tbZ9y4HH.js new file mode 100644 index 0000000..34577f7 --- /dev/null +++ b/assets/FieldRules.html-tbZ9y4HH.js @@ -0,0 +1,7 @@ +import{_ as s,o as e,c as a,a as o}from"./app-Un_zyw_U.js";const n={},l=o(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

FieldRules - class

class FieldRules internal constructor(private val rulesData: FieldRulesData) : BaseRules
+

Change Records

v1.0.0 first

Function Illustrate

Field 查找条件实现类。

name - field

var name: String
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 名称。

type - field

var type: Any?
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 类型。

可不填写类型。

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 标识符筛选条件。

可不设置筛选条件。

name - method

fun name(conditions: NameConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 名称条件。

type - method

fun type(conditions: ObjectConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Field 类型条件。

可不填写类型。

`,40),t=[l];function c(p,r){return e(),a("div",null,t)}const i=s(n,[["render",c],["__file","FieldRules.html.vue"]]);export{i as default}; diff --git a/assets/GenericClass.html--Lql8mDe.js b/assets/GenericClass.html--Lql8mDe.js new file mode 100644 index 0000000..6c0b167 --- /dev/null +++ b/assets/GenericClass.html--Lql8mDe.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-38df33ac","path":"/en/api/public/com/highcapable/yukireflection/bean/GenericClass.html","title":"GenericClass - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"argument - method","slug":"argument-method","link":"#argument-method","children":[]}],"git":{"updatedTime":1696093225000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/bean/GenericClass.md"}');export{e as data}; diff --git a/assets/GenericClass.html-TJqKXlog.js b/assets/GenericClass.html-TJqKXlog.js new file mode 100644 index 0000000..0ed2ef0 --- /dev/null +++ b/assets/GenericClass.html-TJqKXlog.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c5831246","path":"/zh-cn/api/public/com/highcapable/yukireflection/bean/GenericClass.html","title":"GenericClass - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"argument - method","slug":"argument-method","link":"#argument-method","children":[]}],"git":{"updatedTime":1696093225000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/bean/GenericClass.md"}');export{e as data}; diff --git a/assets/GenericClass.html-VZQ2Br0U.js b/assets/GenericClass.html-VZQ2Br0U.js new file mode 100644 index 0000000..9186975 --- /dev/null +++ b/assets/GenericClass.html-VZQ2Br0U.js @@ -0,0 +1,4 @@ +import{_ as s,o as a,c as n,a as e}from"./app-Un_zyw_U.js";const o={},l=e(`

GenericClass - class

class GenericClass internal constructor(private val type: ParameterizedType)
+

变更记录

v1.0.0 添加

功能描述

当前 Class 的泛型父类操作对象。

argument - method

fun argument(index: Int): Class<*>?
+
inline fun <reified T> argument(index: Int): Class<T>?
+

变更记录

v1.0.0 添加

v1.0.3 修改

方法的返回值可为 null

功能描述

获得泛型参数数组下标的 Class 实例。

注意

在运行时局部变量的泛型会被擦除,获取不到时将会返回 null

`,16),p=[l];function c(t,r){return a(),n("div",null,p)}const i=s(o,[["render",c],["__file","GenericClass.html.vue"]]);export{i as default}; diff --git a/assets/GenericClass.html-hROzteRj.js b/assets/GenericClass.html-hROzteRj.js new file mode 100644 index 0000000..d9158e4 --- /dev/null +++ b/assets/GenericClass.html-hROzteRj.js @@ -0,0 +1,4 @@ +import{_ as s,o as a,c as n,a as e}from"./app-Un_zyw_U.js";const o={},l=e(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

GenericClass - class

class GenericClass internal constructor(private val type: ParameterizedType)
+

Change Records

v1.0.0 first

Function Illustrate

当前 Class 的泛型父类操作对象。

argument - method

fun argument(index: Int): Class<*>?
+
inline fun <reified T> argument(index: Int): Class<T>?
+

Change Records

v1.0.0 first

v1.0.3 modified

方法的返回值可为 null

Function Illustrate

获得泛型参数数组下标的 Class 实例。

Notice

在运行时局部变量的泛型会被擦除,获取不到时将会返回 null

`,17),t=[l];function c(p,r){return a(),n("div",null,t)}const d=s(o,[["render",c],["__file","GenericClass.html.vue"]]);export{d as default}; diff --git a/assets/GraphicsTypeFactory.html-DXquzZdf.js b/assets/GraphicsTypeFactory.html-DXquzZdf.js new file mode 100644 index 0000000..0f0cdb4 --- /dev/null +++ b/assets/GraphicsTypeFactory.html-DXquzZdf.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-5a1019d6","path":"/en/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html","title":"GraphicsTypeFactory - kt","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.md"}');export{e as data}; diff --git a/assets/GraphicsTypeFactory.html-DptpdaTU.js b/assets/GraphicsTypeFactory.html-DptpdaTU.js new file mode 100644 index 0000000..c105662 --- /dev/null +++ b/assets/GraphicsTypeFactory.html-DptpdaTU.js @@ -0,0 +1 @@ +import{_ as a,r,o as c,c as n,b as t,d as e,e as s,a as i}from"./app-Un_zyw_U.js";const p={},l=i('

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

GraphicsTypeFactory - kt

Change Records

v1.0.0 first

Function Illustrate

这是一个预置反射类型的常量类,主要为 Android 相关 GraphicsClass 内容,跟随版本更新会逐一进行增加。

',6),d={href:"https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"};function h(u,f){const o=r("ExternalLinkIcon");return c(),n("div",null,[l,t("p",null,[e("详情可 "),t("a",d,[e("点击这里"),s(o)]),e(" 进行查看。")])])}const g=a(p,[["render",h],["__file","GraphicsTypeFactory.html.vue"]]);export{g as default}; diff --git a/assets/GraphicsTypeFactory.html-LLClnUt2.js b/assets/GraphicsTypeFactory.html-LLClnUt2.js new file mode 100644 index 0000000..95b543d --- /dev/null +++ b/assets/GraphicsTypeFactory.html-LLClnUt2.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-25cdee85","path":"/zh-cn/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html","title":"GraphicsTypeFactory - kt","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.md"}');export{e as data}; diff --git a/assets/GraphicsTypeFactory.html-xL-hvwWg.js b/assets/GraphicsTypeFactory.html-xL-hvwWg.js new file mode 100644 index 0000000..33e95a0 --- /dev/null +++ b/assets/GraphicsTypeFactory.html-xL-hvwWg.js @@ -0,0 +1 @@ +import{_ as c,r as t,o as r,c as n,b as o,d as e,e as s,a as p}from"./app-Un_zyw_U.js";const i={},d=p('

GraphicsTypeFactory - kt

变更记录

v1.0.0 添加

功能描述

这是一个预置反射类型的常量类,主要为 Android 相关 GraphicsClass 内容,跟随版本更新会逐一进行增加。

',5),l={href:"https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"};function h(_,y){const a=t("ExternalLinkIcon");return r(),n("div",null,[d,o("p",null,[e("详情可 "),o("a",l,[e("点击这里"),s(a)]),e(" 进行查看。")])])}const k=c(i,[["render",h],["__file","GraphicsTypeFactory.html.vue"]]);export{k as default}; diff --git a/assets/MemberRules.html-1gLEBvW8.js b/assets/MemberRules.html-1gLEBvW8.js new file mode 100644 index 0000000..3eda97f --- /dev/null +++ b/assets/MemberRules.html-1gLEBvW8.js @@ -0,0 +1,3 @@ +import{_ as s,o as e,c as a,a as o}from"./app-Un_zyw_U.js";const n={},l=o(`

MemberRules - class

class MemberRules internal constructor(private val rulesData: MemberRulesData) : BaseRules
+

变更记录

v1.0.0 添加

功能描述

Member 查找条件实现类。

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Member 标识符筛选条件。

可不设置筛选条件。

`,13),c=[l];function r(t,p){return e(),a("div",null,c)}const i=s(n,[["render",r],["__file","MemberRules.html.vue"]]);export{i as default}; diff --git a/assets/MemberRules.html-cNDASndV.js b/assets/MemberRules.html-cNDASndV.js new file mode 100644 index 0000000..10f1486 --- /dev/null +++ b/assets/MemberRules.html-cNDASndV.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-3daa8d42","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html","title":"MemberRules - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.md"}');export{e as data}; diff --git a/assets/MemberRules.html-s0L0dO7U.js b/assets/MemberRules.html-s0L0dO7U.js new file mode 100644 index 0000000..c740552 --- /dev/null +++ b/assets/MemberRules.html-s0L0dO7U.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-71ecb893","path":"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html","title":"MemberRules - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.md"}');export{e as data}; diff --git a/assets/MemberRules.html-wPy0xHct.js b/assets/MemberRules.html-wPy0xHct.js new file mode 100644 index 0000000..ad58281 --- /dev/null +++ b/assets/MemberRules.html-wPy0xHct.js @@ -0,0 +1,3 @@ +import{_ as s,o as e,c as o,a}from"./app-Un_zyw_U.js";const n={},t=a(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

MemberRules - class

class MemberRules internal constructor(private val rulesData: MemberRulesData) : BaseRules
+

Change Records

v1.0.0 first

Function Illustrate

Member 查找条件实现类。

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Member 标识符筛选条件。

可不设置筛选条件。

`,14),l=[t];function r(c,p){return e(),o("div",null,l)}const d=s(n,[["render",r],["__file","MemberRules.html.vue"]]);export{d as default}; diff --git a/assets/MemberRulesResult.html-2SlL_c8V.js b/assets/MemberRulesResult.html-2SlL_c8V.js new file mode 100644 index 0000000..400b544 --- /dev/null +++ b/assets/MemberRulesResult.html-2SlL_c8V.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-4f47dfda","path":"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html","title":"MemberRulesResult - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"none - method","slug":"none-method","link":"#none-method","children":[]},{"level":2,"title":"count - method","slug":"count-method","link":"#count-method","children":[]},{"level":2,"title":"count - method","slug":"count-method-1","link":"#count-method-1","children":[]},{"level":2,"title":"count - method","slug":"count-method-2","link":"#count-method-2","children":[]}],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.md"}');export{e as data}; diff --git a/assets/MemberRulesResult.html-4XM5SrCj.js b/assets/MemberRulesResult.html-4XM5SrCj.js new file mode 100644 index 0000000..0ef0f95 --- /dev/null +++ b/assets/MemberRulesResult.html-4XM5SrCj.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-503f5f8b","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html","title":"MemberRulesResult - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"none - method","slug":"none-method","link":"#none-method","children":[]},{"level":2,"title":"count - method","slug":"count-method","link":"#count-method","children":[]},{"level":2,"title":"count - method","slug":"count-method-1","link":"#count-method-1","children":[]},{"level":2,"title":"count - method","slug":"count-method-2","link":"#count-method-2","children":[]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.md"}');export{e as data}; diff --git a/assets/MemberRulesResult.html-N7SQp4D9.js b/assets/MemberRulesResult.html-N7SQp4D9.js new file mode 100644 index 0000000..e66a5a6 --- /dev/null +++ b/assets/MemberRulesResult.html-N7SQp4D9.js @@ -0,0 +1,6 @@ +import{_ as s,o as e,c as o,a}from"./app-Un_zyw_U.js";const n={},l=a(`

MemberRulesResult - class

class MemberRulesResult internal constructor(private val rulesData: MemberRulesData)
+

变更记录

v1.0.0 添加

功能描述

当前 Member 查找条件结果实现类。

none - method

fun none(): MemberRulesResult
+

变更记录

v1.0.0 添加

功能描述

设置当前 Member 在查找条件中个数为 0

count - method

fun count(num: Int): MemberRulesResult
+

变更记录

v1.0.0 添加

功能描述

设置当前 Member 在查找条件中需要全部匹配的个数。

count - method

fun count(numRange: IntRange): MemberRulesResult
+

变更记录

v1.0.0 添加

功能描述

设置当前 Member 在查找条件中需要全部匹配的个数范围。

count - method

fun count(conditions: CountConditions): MemberRulesResult
+

变更记录

v1.0.0 添加

功能描述

设置当前 Member 在查找条件中需要全部匹配的个数条件。

`,30),t=[l];function c(p,r){return e(),o("div",null,t)}const i=s(n,[["render",c],["__file","MemberRulesResult.html.vue"]]);export{i as default}; diff --git a/assets/MemberRulesResult.html-rcTdNW24.js b/assets/MemberRulesResult.html-rcTdNW24.js new file mode 100644 index 0000000..6b88891 --- /dev/null +++ b/assets/MemberRulesResult.html-rcTdNW24.js @@ -0,0 +1,6 @@ +import{_ as s,o as e,c as o,a as n}from"./app-Un_zyw_U.js";const a={},t=n(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

MemberRulesResult - class

class MemberRulesResult internal constructor(private val rulesData: MemberRulesData)
+

Change Records

v1.0.0 first

Function Illustrate

当前 Member 查找条件结果实现类。

none - method

fun none(): MemberRulesResult
+

Change Records

v1.0.0 first

Function Illustrate

设置当前 Member 在查找条件中个数为 0

count - method

fun count(num: Int): MemberRulesResult
+

Change Records

v1.0.0 first

Function Illustrate

设置当前 Member 在查找条件中需要全部匹配的个数。

count - method

fun count(numRange: IntRange): MemberRulesResult
+

Change Records

v1.0.0 first

Function Illustrate

设置当前 Member 在查找条件中需要全部匹配的个数范围。

count - method

fun count(conditions: CountConditions): MemberRulesResult
+

Change Records

v1.0.0 first

Function Illustrate

设置当前 Member 在查找条件中需要全部匹配的个数条件。

`,31),l=[t];function c(r,p){return e(),o("div",null,l)}const i=s(a,[["render",c],["__file","MemberRulesResult.html.vue"]]);export{i as default}; diff --git a/assets/MethodFinder.html-9zE4fEos.js b/assets/MethodFinder.html-9zE4fEos.js new file mode 100644 index 0000000..7613b1f --- /dev/null +++ b/assets/MethodFinder.html-9zE4fEos.js @@ -0,0 +1,81 @@ +import{_ as s,o as a,c as n,a as o}from"./app-Un_zyw_U.js";const e={},l=o(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

MethodFinder - class

class MethodFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
+

Change Records

v1.0.0 first

Function Illustrate

Method 查找类。

可通过指定类型查找指定 Method 或一组 Method

name - field

var name: String
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 名称。

Pay Attention

若不填写名称则必须存在一个其它条件。

paramCount - field

var paramCount: Int
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数个数。

你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

若参数个数小于零则忽略并使用 param

returnType - field

var returnType: Any?
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 返回值,可不填写返回值。

modifiers - method

fun modifiers(conditions: ModifierConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 标识符筛选条件。

可不设置筛选条件。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

emptyParam - method

fun emptyParam(): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 空参数、无参数。

param - method

fun param(vararg paramType: Any): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数。

如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

如果 Method 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

Pay Attention

无参 Method 请使用 emptyParam 设置查找条件。

有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

param - method

fun param(conditions: ObjectsConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数条件。

Pay Attention

无参 Method 请使用 emptyParam 设置查找条件。

有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

order - method

fun order(): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

顺序筛选字节码的下标。

name - method

fun name(value: String): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 名称。

Pay Attention

若不填写名称则必须存在一个其它条件。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

name - method

fun name(conditions: NameConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 名称条件。

Pay Attention

若不填写名称则必须存在一个其它条件。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(num: Int): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数个数。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数。

若参数个数小于零则忽略并使用 param

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(numRange: IntRange): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数个数范围。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(conditions: CountConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数个数条件。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

returnType - method

fun returnType(value: Any): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 返回值。

可不填写返回值。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

returnType - method

fun returnType(conditions: ObjectConditions): IndexTypeCondition
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 返回值条件。

可不填写返回值。

Pay Attention

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

superClass - method

fun superClass(isOnlySuperClass: Boolean)
+

Change Records

v1.0.0 first

Function Illustrate

设置在 classSet 的所有父类中查找当前 Method

Notice

若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

RemedyPlan - class

inner class RemedyPlan internal constructor()
+

Change Records

v1.0.0 first

Function Illustrate

Method 重查找实现类,可累计失败次数直到查找成功。

method - method

inline fun method(initiate: MethodConditions): Result
+

Change Records

v1.0.0 first

Function Illustrate

创建需要重新查找的 Method

你可以添加多个备选 Method,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

Result - class

inner class Result internal constructor()
+

Change Records

v1.0.0 first

Function Illustrate

RemedyPlan 结果实现类。

onFind - method

fun onFind(initiate: MutableList<Method>.() -> Unit)
+

Change Records

v1.0.0 first

v1.0.3 修改

initiate 类型由 HashSet 修改为 MutableList

Function Illustrate

当在 RemedyPlan 中找到结果时。

Function Example

你可以方便地对重查找的 Method 实现 onFind 方法。

The following example

method {
+    // Your code here.
+}.onFind {
+    // Your code here.
+}
+

Result - class

inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
+

Change Records

v1.0.0 first

Function Illustrate

Method 查找结果实现类。

result - method

inline fun result(initiate: Result.() -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

创建监听结果事件方法体。

Function Example

你可以使用 lambda 形式创建 Result 类。

The following example

method {
+    // Your code here.
+}.result {
+    get(instance).call()
+    all(instance)
+    remedys {}
+    onNoSuchMethod {}
+}
+

get - method

fun get(instance: Any?): Instance
+

Change Records

v1.0.0 first

Function Illustrate

获得 Method 实例处理类。

若有多个 Method 结果只会返回第一个。

Pay Attention

若你设置了 remedys 请使用 wait 回调结果方法。

Function Example

你可以通过获得方法所在实例来执行 Method

The following example

method {
+    // Your code here.
+}.get(instance).call()
+

若当前为静态方法,你可以不设置实例。

The following example

method {
+    // Your code here.
+}.get().call()
+

all - method

fun all(instance: Any?): MutableList<Instance>
+

Change Records

v1.0.0 first

v1.0.3 修改

返回值类型由 ArrayList 修改为 MutableList

Function Illustrate

获得 Method 实例处理类数组。

返回全部查找条件匹配的多个 Method 实例结果。

Function Example

你可以通过此方法来获得当前条件结果中匹配的全部 Method,其方法所在实例用法与 get 相同。

The following example

method {
+    // Your code here.
+}.all(instance).forEach { instance ->
+    instance.call(...)
+}
+

give - method

fun give(): Method?
+

Change Records

v1.0.0 first

Function Illustrate

得到 Method 本身。

若有多个 Method 结果只会返回第一个。

在查找条件找不到任何结果的时候将返回 null

giveAll - method

fun giveAll(): MutableList<Method>
+

Change Records

v1.0.0 first

v1.0.3 修改

返回值类型由 HashSet 修改为 MutableList

Function Illustrate

得到 Method 本身数组。

返回全部查找条件匹配的多个 Method 实例。

在查找条件找不到任何结果的时候将返回空的 MutableList

wait - method

fun wait(instance: Any?, initiate: Instance.() -> Unit)
+

Change Records

v1.0.0 first

Function Illustrate

获得 Method 实例处理类,配合 RemedyPlan 使用。

若有多个 Method 结果只会返回第一个。

Pay Attention

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

waitAll - method

fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
+

Change Records

v1.0.0 first

v1.0.3 修改

initiate 类型由 ArrayList 修改为 MutableList

Function Illustrate

获得 Method 实例处理类数组,配合 RemedyPlan 使用。

返回全部查找条件匹配的多个 Method 实例结果。

Pay Attention

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

remedys - method

inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

创建 Method 重查找功能。

Function Example

当你遇到一种 Method 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchMethod 捕获异常二次查找 Method

若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

The following example

method {
+    // Your code here.
+}.remedys {
+    method {
+        // Your code here.
+    }
+    method {
+        // Your code here.
+    }
+}
+

onNoSuchMethod - method

inline fun onNoSuchMethod(result: (Throwable) -> Unit): Result
+

Change Records

v1.0.0 first

Function Illustrate

监听找不到 Method 时。

只会返回第一次的错误信息,不会返回 RemedyPlan 的错误信息。

ignored - method

fun ignored(): Result
+

Change Records

v1.0.0 first

Function Illustrate

忽略异常并停止打印任何错误日志。

Notice

此时若要监听异常结果,你需要手动实现 onNoSuchMethod 方法。

Instance - class

inner class Instance internal constructor(private val instance: Any?, private val method: Method?)
+

Change Records

v1.0.0 first

Function Illustrate

Method 实例处理类。

call - method

fun call(vararg args: Any?): Any?
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,不指定返回值类型。

invoke - method

fun <T> invoke(vararg args: Any?): T?
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 T 返回值类型。

byte - method

fun byte(vararg args: Any?): Byte?
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 Byte 返回值类型。

int - method

fun int(vararg args: Any?): Int
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 Int 返回值类型。

long - method

fun long(vararg args: Any?): Long
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 Long 返回值类型。

short - method

fun short(vararg args: Any?): Short
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 Short 返回值类型。

double - method

fun double(vararg args: Any?): Double
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 Double 返回值类型。

float - method

fun float(vararg args: Any?): Float
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 Float 返回值类型。

string - method

fun string(vararg args: Any?): String
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 String 返回值类型。

char - method

fun char(vararg args: Any?): Char
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 Char 返回值类型。

boolean - method

fun boolean(vararg args: Any?): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 Boolean 返回值类型。

array - method

inline fun <reified T> array(vararg args: Any?): Array<T>
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 Array 返回值类型。

list - method

inline fun <reified T> list(vararg args: Any?): List<T>
+

Change Records

v1.0.0 first

Function Illustrate

执行 Method,指定 List 返回值类型。

`,347),t=[l];function p(c,r){return a(),n("div",null,t)}const i=s(e,[["render",p],["__file","MethodFinder.html.vue"]]);export{i as default}; diff --git a/assets/MethodFinder.html-F3Nq1ta1.js b/assets/MethodFinder.html-F3Nq1ta1.js new file mode 100644 index 0000000..e352bcf --- /dev/null +++ b/assets/MethodFinder.html-F3Nq1ta1.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-155c9f97","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html","title":"MethodFinder - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"returnType - field","slug":"returntype-field","link":"#returntype-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"order - method","slug":"order-method","link":"#order-method","children":[]},{"level":2,"title":"name - method","slug":"name-method","link":"#name-method","children":[]},{"level":2,"title":"name - method","slug":"name-method-1","link":"#name-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-2","link":"#paramcount-method-2","children":[]},{"level":2,"title":"returnType - method","slug":"returntype-method","link":"#returntype-method","children":[]},{"level":2,"title":"returnType - method","slug":"returntype-method-1","link":"#returntype-method-1","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"RemedyPlan - class","slug":"remedyplan-class","link":"#remedyplan-class","children":[{"level":3,"title":"method - method","slug":"method-method","link":"#method-method","children":[]},{"level":3,"title":"Result - class","slug":"result-class","link":"#result-class","children":[]}]},{"level":2,"title":"Result - class","slug":"result-class-1","link":"#result-class-1","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"give - method","slug":"give-method","link":"#give-method","children":[]},{"level":3,"title":"giveAll - method","slug":"giveall-method","link":"#giveall-method","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method","link":"#remedys-method","children":[]},{"level":3,"title":"onNoSuchMethod - method","slug":"onnosuchmethod-method","link":"#onnosuchmethod-method","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]},{"level":3,"title":"Instance - class","slug":"instance-class","link":"#instance-class","children":[]},{"level":3,"title":"array - method","slug":"array-method","link":"#array-method","children":[]},{"level":3,"title":"list - method","slug":"list-method","link":"#list-method","children":[]}]}],"git":{"updatedTime":1696172435000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.md"}');export{e as data}; diff --git a/assets/MethodFinder.html-dHpCygp2.js b/assets/MethodFinder.html-dHpCygp2.js new file mode 100644 index 0000000..154681c --- /dev/null +++ b/assets/MethodFinder.html-dHpCygp2.js @@ -0,0 +1,81 @@ +import{_ as s,o as a,c as o,a as n}from"./app-Un_zyw_U.js";const e={},l=n(`

MethodFinder - class

class MethodFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
+

变更记录

v1.0.0 添加

功能描述

Method 查找类。

可通过指定类型查找指定 Method 或一组 Method

name - field

var name: String
+

变更记录

v1.0.0 添加

功能描述

设置 Method 名称。

特别注意

若不填写名称则必须存在一个其它条件。

paramCount - field

var paramCount: Int
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数个数。

你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

若参数个数小于零则忽略并使用 param

returnType - field

var returnType: Any?
+

变更记录

v1.0.0 添加

功能描述

设置 Method 返回值,可不填写返回值。

modifiers - method

fun modifiers(conditions: ModifierConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 标识符筛选条件。

可不设置筛选条件。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

emptyParam - method

fun emptyParam(): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 空参数、无参数。

param - method

fun param(vararg paramType: Any): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数。

如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

如果 Method 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

特别注意

无参 Method 请使用 emptyParam 设置查找条件。

有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

param - method

fun param(conditions: ObjectsConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数条件。

特别注意

无参 Method 请使用 emptyParam 设置查找条件。

有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

order - method

fun order(): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

顺序筛选字节码的下标。

name - method

fun name(value: String): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 名称。

特别注意

若不填写名称则必须存在一个其它条件。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

name - method

fun name(conditions: NameConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 名称条件。

特别注意

若不填写名称则必须存在一个其它条件。

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(num: Int): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数个数。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数。

若参数个数小于零则忽略并使用 param

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(numRange: IntRange): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数个数范围。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

paramCount - method

fun paramCount(conditions: CountConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数个数条件。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

returnType - method

fun returnType(value: Any): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 返回值。

可不填写返回值。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

returnType - method

fun returnType(conditions: ObjectConditions): IndexTypeCondition
+

变更记录

v1.0.0 添加

功能描述

设置 Method 返回值条件。

可不填写返回值。

特别注意

存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

superClass - method

fun superClass(isOnlySuperClass: Boolean)
+

变更记录

v1.0.0 添加

功能描述

设置在 classSet 的所有父类中查找当前 Method

注意

若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

RemedyPlan - class

inner class RemedyPlan internal constructor()
+

变更记录

v1.0.0 添加

功能描述

Method 重查找实现类,可累计失败次数直到查找成功。

method - method

inline fun method(initiate: MethodConditions): Result
+

变更记录

v1.0.0 添加

功能描述

创建需要重新查找的 Method

你可以添加多个备选 Method,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

Result - class

inner class Result internal constructor()
+

变更记录

v1.0.0 添加

功能描述

RemedyPlan 结果实现类。

onFind - method

fun onFind(initiate: MutableList<Method>.() -> Unit)
+

变更记录

v1.0.0 添加

v1.0.3 修改

initiate 类型由 HashSet 修改为 MutableList

功能描述

当在 RemedyPlan 中找到结果时。

功能示例

你可以方便地对重查找的 Method 实现 onFind 方法。

示例如下

method {
+    // Your code here.
+}.onFind {
+    // Your code here.
+}
+

Result - class

inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
+

变更记录

v1.0.0 添加

功能描述

Method 查找结果实现类。

result - method

inline fun result(initiate: Result.() -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

创建监听结果事件方法体。

功能示例

你可以使用 lambda 形式创建 Result 类。

示例如下

method {
+    // Your code here.
+}.result {
+    get(instance).call()
+    all(instance)
+    remedys {}
+    onNoSuchMethod {}
+}
+

get - method

fun get(instance: Any?): Instance
+

变更记录

v1.0.0 添加

功能描述

获得 Method 实例处理类。

若有多个 Method 结果只会返回第一个。

特别注意

若你设置了 remedys 请使用 wait 回调结果方法。

功能示例

你可以通过获得方法所在实例来执行 Method

示例如下

method {
+    // Your code here.
+}.get(instance).call()
+

若当前为静态方法,你可以不设置实例。

示例如下

method {
+    // Your code here.
+}.get().call()
+

all - method

fun all(instance: Any?): MutableList<Instance>
+

变更记录

v1.0.0 添加

v1.0.3 修改

返回值类型由 ArrayList 修改为 MutableList

功能描述

获得 Method 实例处理类数组。

返回全部查找条件匹配的多个 Method 实例结果。

功能示例

你可以通过此方法来获得当前条件结果中匹配的全部 Method,其方法所在实例用法与 get 相同。

示例如下

method {
+    // Your code here.
+}.all(instance).forEach { instance ->
+    instance.call(...)
+}
+

give - method

fun give(): Method?
+

变更记录

v1.0.0 添加

功能描述

得到 Method 本身。

若有多个 Method 结果只会返回第一个。

在查找条件找不到任何结果的时候将返回 null

giveAll - method

fun giveAll(): MutableList<Method>
+

变更记录

v1.0.0 添加

v1.0.3 修改

返回值类型由 HashSet 修改为 MutableList

功能描述

得到 Method 本身数组。

返回全部查找条件匹配的多个 Method 实例。

在查找条件找不到任何结果的时候将返回空的 MutableList

wait - method

fun wait(instance: Any?, initiate: Instance.() -> Unit)
+

变更记录

v1.0.0 添加

功能描述

获得 Method 实例处理类,配合 RemedyPlan 使用。

若有多个 Method 结果只会返回第一个。

特别注意

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

waitAll - method

fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
+

变更记录

v1.0.0 添加

v1.0.3 修改

initiate 类型由 ArrayList 修改为 MutableList

功能描述

获得 Method 实例处理类数组,配合 RemedyPlan 使用。

返回全部查找条件匹配的多个 Method 实例结果。

特别注意

若你设置了 remedys 必须使用此方法才能获得结果。

若你没有设置 remedys 此方法将不会被回调。

remedys - method

inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

创建 Method 重查找功能。

功能示例

当你遇到一种 Method 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchMethod 捕获异常二次查找 Method

若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

示例如下

method {
+    // Your code here.
+}.remedys {
+    method {
+        // Your code here.
+    }
+    method {
+        // Your code here.
+    }
+}
+

onNoSuchMethod - method

inline fun onNoSuchMethod(result: (Throwable) -> Unit): Result
+

变更记录

v1.0.0 添加

功能描述

监听找不到 Method 时。

只会返回第一次的错误信息,不会返回 RemedyPlan 的错误信息。

ignored - method

fun ignored(): Result
+

变更记录

v1.0.0 添加

功能描述

忽略异常并停止打印任何错误日志。

注意

此时若要监听异常结果,你需要手动实现 onNoSuchMethod 方法。

Instance - class

inner class Instance internal constructor(private val instance: Any?, private val method: Method?)
+

变更记录

v1.0.0 添加

功能描述

Method 实例处理类。

call - method

fun call(vararg args: Any?): Any?
+

变更记录

v1.0.0 添加

功能描述

执行 Method,不指定返回值类型。

invoke - method

fun <T> invoke(vararg args: Any?): T?
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 T 返回值类型。

byte - method

fun byte(vararg args: Any?): Byte?
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 Byte 返回值类型。

int - method

fun int(vararg args: Any?): Int
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 Int 返回值类型。

long - method

fun long(vararg args: Any?): Long
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 Long 返回值类型。

short - method

fun short(vararg args: Any?): Short
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 Short 返回值类型。

double - method

fun double(vararg args: Any?): Double
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 Double 返回值类型。

float - method

fun float(vararg args: Any?): Float
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 Float 返回值类型。

string - method

fun string(vararg args: Any?): String
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 String 返回值类型。

char - method

fun char(vararg args: Any?): Char
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 Char 返回值类型。

boolean - method

fun boolean(vararg args: Any?): Boolean
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 Boolean 返回值类型。

array - method

inline fun <reified T> array(vararg args: Any?): Array<T>
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 Array 返回值类型。

list - method

inline fun <reified T> list(vararg args: Any?): List<T>
+

变更记录

v1.0.0 添加

功能描述

执行 Method,指定 List 返回值类型。

`,346),p=[l];function t(c,r){return a(),o("div",null,p)}const i=s(e,[["render",t],["__file","MethodFinder.html.vue"]]);export{i as default}; diff --git a/assets/MethodFinder.html-rrxJN8Pm.js b/assets/MethodFinder.html-rrxJN8Pm.js new file mode 100644 index 0000000..29a4ed1 --- /dev/null +++ b/assets/MethodFinder.html-rrxJN8Pm.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-012ee5a6","path":"/en/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html","title":"MethodFinder - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"returnType - field","slug":"returntype-field","link":"#returntype-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"order - method","slug":"order-method","link":"#order-method","children":[]},{"level":2,"title":"name - method","slug":"name-method","link":"#name-method","children":[]},{"level":2,"title":"name - method","slug":"name-method-1","link":"#name-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-2","link":"#paramcount-method-2","children":[]},{"level":2,"title":"returnType - method","slug":"returntype-method","link":"#returntype-method","children":[]},{"level":2,"title":"returnType - method","slug":"returntype-method-1","link":"#returntype-method-1","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"RemedyPlan - class","slug":"remedyplan-class","link":"#remedyplan-class","children":[{"level":3,"title":"method - method","slug":"method-method","link":"#method-method","children":[]},{"level":3,"title":"Result - class","slug":"result-class","link":"#result-class","children":[]}]},{"level":2,"title":"Result - class","slug":"result-class-1","link":"#result-class-1","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"give - method","slug":"give-method","link":"#give-method","children":[]},{"level":3,"title":"giveAll - method","slug":"giveall-method","link":"#giveall-method","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method","link":"#remedys-method","children":[]},{"level":3,"title":"onNoSuchMethod - method","slug":"onnosuchmethod-method","link":"#onnosuchmethod-method","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]},{"level":3,"title":"Instance - class","slug":"instance-class","link":"#instance-class","children":[]},{"level":3,"title":"array - method","slug":"array-method","link":"#array-method","children":[]},{"level":3,"title":"list - method","slug":"list-method","link":"#list-method","children":[]}]}],"git":{"updatedTime":1696172435000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.md"}');export{e as data}; diff --git a/assets/MethodRules.html-0hkKQ1Lm.js b/assets/MethodRules.html-0hkKQ1Lm.js new file mode 100644 index 0000000..9910b68 --- /dev/null +++ b/assets/MethodRules.html-0hkKQ1Lm.js @@ -0,0 +1,13 @@ +import{_ as s,o as a,c as e,a as o}from"./app-Un_zyw_U.js";const n={},t=o(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

MethodRules - class

class MethodRules internal constructor(private val rulesData: MethodRulesData) : BaseRules
+

Change Records

v1.0.0 first

Function Illustrate

Method 查找条件实现类。

name - field

var name: String
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 名称。

paramCount - field

var paramCount: Int
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数个数。

你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

若参数个数小于零则忽略并使用 param

returnType - field

var returnType: Any?
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 返回值。

可不填写返回值。

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 标识符筛选条件。

可不设置筛选条件。

emptyParam - method

fun emptyParam()
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 空参数、无参数。

param - method

fun param(vararg paramType: Any)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数。

如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

如果 Method 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

Pay Attention

无参 Method 请使用 emptyParam 设置查找条件。

有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

param - method

fun param(conditions: ObjectsConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数条件。

Pay Attention

无参 Method 请使用 emptyParam 设置查找条件。

有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

name - method

fun name(conditions: NameConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 名称条件。

paramCount - method

fun paramCount(numRange: IntRange)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数个数范围。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

paramCount - method

fun paramCount(conditions: CountConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 参数个数条件。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

returnType - method

fun returnType(conditions: ObjectConditions)
+

Change Records

v1.0.0 first

Function Illustrate

设置 Method 返回值条件。

可不填写返回值。

`,84),p=[t];function c(l,r){return a(),e("div",null,p)}const i=s(n,[["render",c],["__file","MethodRules.html.vue"]]);export{i as default}; diff --git a/assets/MethodRules.html-SViWQxO9.js b/assets/MethodRules.html-SViWQxO9.js new file mode 100644 index 0000000..153990a --- /dev/null +++ b/assets/MethodRules.html-SViWQxO9.js @@ -0,0 +1,13 @@ +import{_ as s,o as a,c as o,a as e}from"./app-Un_zyw_U.js";const n={},p=e(`

MethodRules - class

class MethodRules internal constructor(private val rulesData: MethodRulesData) : BaseRules
+

变更记录

v1.0.0 添加

功能描述

Method 查找条件实现类。

name - field

var name: String
+

变更记录

v1.0.0 添加

功能描述

设置 Method 名称。

paramCount - field

var paramCount: Int
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数个数。

你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

若参数个数小于零则忽略并使用 param

returnType - field

var returnType: Any?
+

变更记录

v1.0.0 添加

功能描述

设置 Method 返回值。

可不填写返回值。

modifiers - method

fun modifiers(conditions: ModifierConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Method 标识符筛选条件。

可不设置筛选条件。

emptyParam - method

fun emptyParam()
+

变更记录

v1.0.0 添加

功能描述

设置 Method 空参数、无参数。

param - method

fun param(vararg paramType: Any)
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数。

如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

如果 Method 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

特别注意

无参 Method 请使用 emptyParam 设置查找条件。

有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

param - method

fun param(conditions: ObjectsConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数条件。

特别注意

无参 Method 请使用 emptyParam 设置查找条件。

有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

name - method

fun name(conditions: NameConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Method 名称条件。

paramCount - method

fun paramCount(numRange: IntRange)
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数个数范围。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

paramCount - method

fun paramCount(conditions: CountConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Method 参数个数条件。

你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

returnType - method

fun returnType(conditions: ObjectConditions)
+

变更记录

v1.0.0 添加

功能描述

设置 Method 返回值条件。

可不填写返回值。

`,83),t=[p];function c(l,d){return a(),o("div",null,t)}const i=s(n,[["render",c],["__file","MethodRules.html.vue"]]);export{i as default}; diff --git a/assets/MethodRules.html-aSRU9IHr.js b/assets/MethodRules.html-aSRU9IHr.js new file mode 100644 index 0000000..eacc210 --- /dev/null +++ b/assets/MethodRules.html-aSRU9IHr.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-2a3be6c9","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html","title":"MethodRules - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"returnType - field","slug":"returntype-field","link":"#returntype-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"name - method","slug":"name-method","link":"#name-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]},{"level":2,"title":"returnType - method","slug":"returntype-method","link":"#returntype-method","children":[]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.md"}');export{e as data}; diff --git a/assets/MethodRules.html-wOHbNM4H.js b/assets/MethodRules.html-wOHbNM4H.js new file mode 100644 index 0000000..e41e5e7 --- /dev/null +++ b/assets/MethodRules.html-wOHbNM4H.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-5e7e121a","path":"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html","title":"MethodRules - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"name - field","slug":"name-field","link":"#name-field","children":[]},{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"returnType - field","slug":"returntype-field","link":"#returntype-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"name - method","slug":"name-method","link":"#name-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]},{"level":2,"title":"returnType - method","slug":"returntype-method","link":"#returntype-method","children":[]}],"git":{"updatedTime":1695808915000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.md"}');export{e as data}; diff --git a/assets/ModifierRules.html-4vu7ZiXc.js b/assets/ModifierRules.html-4vu7ZiXc.js new file mode 100644 index 0000000..452a3fa --- /dev/null +++ b/assets/ModifierRules.html-4vu7ZiXc.js @@ -0,0 +1,14 @@ +import{_ as e,o as s,c as a,a as o}from"./app-Un_zyw_U.js";const n={},c=o(`

ModifierRules - class

class ModifierRules private constructor()
+

变更记录

v1.0.0 添加

功能描述

这是一个 ClassMember 描述符条件实现类。

可对 R8 混淆后的 ClassMember 进行更加详细的定位。

isPublic - i-ext-field

val isPublic: Boolean
+

变更记录

v1.0.0 添加

功能描述

ClassMember 类型是否包含 public

isPrivate - i-ext-field

val isPrivate: Boolean
+

变更记录

v1.0.0 添加

功能描述

ClassMember 类型是否包含 private

isProtected - i-ext-field

val isProtected: Boolean
+

变更记录

v1.0.0 添加

功能描述

ClassMember 类型是否包含 protected

isStatic - i-ext-field

val isStatic: Boolean
+

变更记录

v1.0.0 添加

功能描述

ClassMember 类型是否包含 static

对于任意的静态 ClassMember 可添加此描述进行确定。

注意

Kotlin → Jvm 后的 object 类中的方法并不是静态的。

isFinal - i-ext-field

val isFinal: Boolean
+

变更记录

v1.0.0 添加

功能描述

ClassMember 类型是否包含 final

注意

Kotlin → Jvm 后没有 open 符号标识的 ClassMember 和没有任何关联的 ClassMember 都将为 final

isSynchronized - i-ext-field

val isSynchronized: Boolean
+

变更记录

v1.0.0 添加

功能描述

ClassMember 类型是否包含 synchronized

isVolatile - i-ext-field

val isVolatile: Boolean
+

变更记录

v1.0.0 添加

功能描述

Field 类型是否包含 volatile

isTransient - i-ext-field

val isTransient: Boolean
+

变更记录

v1.0.0 添加

功能描述

Field 类型是否包含 transient

isNative - i-ext-field

val isNative: Boolean
+

变更记录

v1.0.0 添加

功能描述

Method 类型是否包含 native

对于任意 JNI 对接的 Method 可添加此描述进行确定。

isInterface - i-ext-field

val isInterface: Boolean
+

变更记录

v1.0.0 添加

功能描述

Class 类型是否包含 interface

isAbstract - i-ext-field

val isAbstract: Boolean
+

变更记录

v1.0.0 添加

功能描述

ClassMember 类型是否包含 abstract

对于任意的抽象 ClassMember 可添加此描述进行确定。

isStrict - i-ext-field

val isStrict: Boolean
+

变更记录

v1.0.0 添加

功能描述

ClassMember 类型是否包含 strictfp

`,84),l=[c];function t(d,i){return s(),a("div",null,l)}const r=e(n,[["render",t],["__file","ModifierRules.html.vue"]]);export{r as default}; diff --git a/assets/ModifierRules.html-EHCxf6eb.js b/assets/ModifierRules.html-EHCxf6eb.js new file mode 100644 index 0000000..27d6994 --- /dev/null +++ b/assets/ModifierRules.html-EHCxf6eb.js @@ -0,0 +1,14 @@ +import{_ as e,o as s,c as a,a as o}from"./app-Un_zyw_U.js";const n={},t=o(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

ModifierRules - class

class ModifierRules private constructor()
+

Change Records

v1.0.0 first

Function Illustrate

这是一个 ClassMember 描述符条件实现类。

可对 R8 混淆后的 ClassMember 进行更加详细的定位。

isPublic - i-ext-field

val isPublic: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

ClassMember 类型是否包含 public

isPrivate - i-ext-field

val isPrivate: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

ClassMember 类型是否包含 private

isProtected - i-ext-field

val isProtected: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

ClassMember 类型是否包含 protected

isStatic - i-ext-field

val isStatic: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

ClassMember 类型是否包含 static

对于任意的静态 ClassMember 可添加此描述进行确定。

Notice

Kotlin → Jvm 后的 object 类中的方法并不是静态的。

isFinal - i-ext-field

val isFinal: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

ClassMember 类型是否包含 final

Notice

Kotlin → Jvm 后没有 open 符号标识的 ClassMember 和没有任何关联的 ClassMember 都将为 final

isSynchronized - i-ext-field

val isSynchronized: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

ClassMember 类型是否包含 synchronized

isVolatile - i-ext-field

val isVolatile: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

Field 类型是否包含 volatile

isTransient - i-ext-field

val isTransient: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

Field 类型是否包含 transient

isNative - i-ext-field

val isNative: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

Method 类型是否包含 native

对于任意 JNI 对接的 Method 可添加此描述进行确定。

isInterface - i-ext-field

val isInterface: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

Class 类型是否包含 interface

isAbstract - i-ext-field

val isAbstract: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

ClassMember 类型是否包含 abstract

对于任意的抽象 ClassMember 可添加此描述进行确定。

isStrict - i-ext-field

val isStrict: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

ClassMember 类型是否包含 strictfp

`,85),c=[t];function l(i,d){return s(),a("div",null,c)}const p=e(n,[["render",l],["__file","ModifierRules.html.vue"]]);export{p as default}; diff --git a/assets/ModifierRules.html-n9h96LhZ.js b/assets/ModifierRules.html-n9h96LhZ.js new file mode 100644 index 0000000..6944961 --- /dev/null +++ b/assets/ModifierRules.html-n9h96LhZ.js @@ -0,0 +1 @@ +const i=JSON.parse('{"key":"v-56071599","path":"/en/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html","title":"ModifierRules - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"isPublic - i-ext-field","slug":"ispublic-i-ext-field","link":"#ispublic-i-ext-field","children":[]},{"level":2,"title":"isPrivate - i-ext-field","slug":"isprivate-i-ext-field","link":"#isprivate-i-ext-field","children":[]},{"level":2,"title":"isProtected - i-ext-field","slug":"isprotected-i-ext-field","link":"#isprotected-i-ext-field","children":[]},{"level":2,"title":"isStatic - i-ext-field","slug":"isstatic-i-ext-field","link":"#isstatic-i-ext-field","children":[]},{"level":2,"title":"isFinal - i-ext-field","slug":"isfinal-i-ext-field","link":"#isfinal-i-ext-field","children":[]},{"level":2,"title":"isSynchronized - i-ext-field","slug":"issynchronized-i-ext-field","link":"#issynchronized-i-ext-field","children":[]},{"level":2,"title":"isVolatile - i-ext-field","slug":"isvolatile-i-ext-field","link":"#isvolatile-i-ext-field","children":[]},{"level":2,"title":"isTransient - i-ext-field","slug":"istransient-i-ext-field","link":"#istransient-i-ext-field","children":[]},{"level":2,"title":"isNative - i-ext-field","slug":"isnative-i-ext-field","link":"#isnative-i-ext-field","children":[]},{"level":2,"title":"isInterface - i-ext-field","slug":"isinterface-i-ext-field","link":"#isinterface-i-ext-field","children":[]},{"level":2,"title":"isAbstract - i-ext-field","slug":"isabstract-i-ext-field","link":"#isabstract-i-ext-field","children":[]},{"level":2,"title":"isStrict - i-ext-field","slug":"isstrict-i-ext-field","link":"#isstrict-i-ext-field","children":[]}],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.md"}');export{i as data}; diff --git a/assets/ModifierRules.html-w8NPlak8.js b/assets/ModifierRules.html-w8NPlak8.js new file mode 100644 index 0000000..6b3d9a9 --- /dev/null +++ b/assets/ModifierRules.html-w8NPlak8.js @@ -0,0 +1 @@ +const i=JSON.parse('{"key":"v-701721ec","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html","title":"ModifierRules - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"isPublic - i-ext-field","slug":"ispublic-i-ext-field","link":"#ispublic-i-ext-field","children":[]},{"level":2,"title":"isPrivate - i-ext-field","slug":"isprivate-i-ext-field","link":"#isprivate-i-ext-field","children":[]},{"level":2,"title":"isProtected - i-ext-field","slug":"isprotected-i-ext-field","link":"#isprotected-i-ext-field","children":[]},{"level":2,"title":"isStatic - i-ext-field","slug":"isstatic-i-ext-field","link":"#isstatic-i-ext-field","children":[]},{"level":2,"title":"isFinal - i-ext-field","slug":"isfinal-i-ext-field","link":"#isfinal-i-ext-field","children":[]},{"level":2,"title":"isSynchronized - i-ext-field","slug":"issynchronized-i-ext-field","link":"#issynchronized-i-ext-field","children":[]},{"level":2,"title":"isVolatile - i-ext-field","slug":"isvolatile-i-ext-field","link":"#isvolatile-i-ext-field","children":[]},{"level":2,"title":"isTransient - i-ext-field","slug":"istransient-i-ext-field","link":"#istransient-i-ext-field","children":[]},{"level":2,"title":"isNative - i-ext-field","slug":"isnative-i-ext-field","link":"#isnative-i-ext-field","children":[]},{"level":2,"title":"isInterface - i-ext-field","slug":"isinterface-i-ext-field","link":"#isinterface-i-ext-field","children":[]},{"level":2,"title":"isAbstract - i-ext-field","slug":"isabstract-i-ext-field","link":"#isabstract-i-ext-field","children":[]},{"level":2,"title":"isStrict - i-ext-field","slug":"isstrict-i-ext-field","link":"#isstrict-i-ext-field","children":[]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.md"}');export{i as data}; diff --git a/assets/NameRules.html-6iq8oL-B.js b/assets/NameRules.html-6iq8oL-B.js new file mode 100644 index 0000000..874fcd0 --- /dev/null +++ b/assets/NameRules.html-6iq8oL-B.js @@ -0,0 +1,9 @@ +import{_ as s,o as e,c as n,a}from"./app-Un_zyw_U.js";const o={},t=a(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

NameRules - class

class NameRules private constructor()
+

Change Records

v1.0.0 first

Function Illustrate

这是一个模糊 ClassMember 名称条件实现类。

可对 R8 混淆后的 ClassMember 进行更加详细的定位。

String.isSynthetic - i-ext-method

fun String.isSynthetic(index: Int): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

是否为匿名类的主类调用对象。

String.isOnlySymbols - i-ext-method

fun String.isOnlySymbols(): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

是否只有符号。

String.isOnlyLetters - i-ext-method

fun String.isOnlyLetters(): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

是否只有字母。

String.isOnlyNumbers - i-ext-method

fun String.isOnlyNumbers(): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

是否只有数字。

String.isOnlyLettersNumbers - i-ext-method

fun String.isOnlyLettersNumbers(): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

是否只有字母或数字。

String.isOnlyLowercase - i-ext-method

fun String.isOnlyLowercase(): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

是否只有小写字母。

在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。

String.isOnlyUppercase - i-ext-method

fun String.isOnlyUppercase(): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

是否只有大写字母。

在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。

`,52),l=[t];function r(p,c){return e(),n("div",null,l)}const d=s(o,[["render",r],["__file","NameRules.html.vue"]]);export{d as default}; diff --git a/assets/NameRules.html-9btOATID.js b/assets/NameRules.html-9btOATID.js new file mode 100644 index 0000000..70efcb9 --- /dev/null +++ b/assets/NameRules.html-9btOATID.js @@ -0,0 +1,9 @@ +import{_ as s,o as e,c as n,a}from"./app-Un_zyw_U.js";const o={},l=a(`

NameRules - class

class NameRules private constructor()
+

变更记录

v1.0.0 添加

功能描述

这是一个模糊 ClassMember 名称条件实现类。

可对 R8 混淆后的 ClassMember 进行更加详细的定位。

String.isSynthetic - i-ext-method

fun String.isSynthetic(index: Int): Boolean
+

变更记录

v1.0.0 添加

功能描述

是否为匿名类的主类调用对象。

String.isOnlySymbols - i-ext-method

fun String.isOnlySymbols(): Boolean
+

变更记录

v1.0.0 添加

功能描述

是否只有符号。

String.isOnlyLetters - i-ext-method

fun String.isOnlyLetters(): Boolean
+

变更记录

v1.0.0 添加

功能描述

是否只有字母。

String.isOnlyNumbers - i-ext-method

fun String.isOnlyNumbers(): Boolean
+

变更记录

v1.0.0 添加

功能描述

是否只有数字。

String.isOnlyLettersNumbers - i-ext-method

fun String.isOnlyLettersNumbers(): Boolean
+

变更记录

v1.0.0 添加

功能描述

是否只有字母或数字。

String.isOnlyLowercase - i-ext-method

fun String.isOnlyLowercase(): Boolean
+

变更记录

v1.0.0 添加

功能描述

是否只有小写字母。

在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。

String.isOnlyUppercase - i-ext-method

fun String.isOnlyUppercase(): Boolean
+

变更记录

v1.0.0 添加

功能描述

是否只有大写字母。

在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。

`,51),t=[l];function p(r,c){return e(),n("div",null,t)}const d=s(o,[["render",p],["__file","NameRules.html.vue"]]);export{d as default}; diff --git a/assets/NameRules.html-FTNuImB7.js b/assets/NameRules.html-FTNuImB7.js new file mode 100644 index 0000000..51070f4 --- /dev/null +++ b/assets/NameRules.html-FTNuImB7.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-264e7384","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html","title":"NameRules - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"String.isSynthetic - i-ext-method","slug":"string-issynthetic-i-ext-method","link":"#string-issynthetic-i-ext-method","children":[]},{"level":2,"title":"String.isOnlySymbols - i-ext-method","slug":"string-isonlysymbols-i-ext-method","link":"#string-isonlysymbols-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyLetters - i-ext-method","slug":"string-isonlyletters-i-ext-method","link":"#string-isonlyletters-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyNumbers - i-ext-method","slug":"string-isonlynumbers-i-ext-method","link":"#string-isonlynumbers-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyLettersNumbers - i-ext-method","slug":"string-isonlylettersnumbers-i-ext-method","link":"#string-isonlylettersnumbers-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyLowercase - i-ext-method","slug":"string-isonlylowercase-i-ext-method","link":"#string-isonlylowercase-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyUppercase - i-ext-method","slug":"string-isonlyuppercase-i-ext-method","link":"#string-isonlyuppercase-i-ext-method","children":[]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.md"}');export{e as data}; diff --git a/assets/NameRules.html-jW6PpEoY.js b/assets/NameRules.html-jW6PpEoY.js new file mode 100644 index 0000000..c837a19 --- /dev/null +++ b/assets/NameRules.html-jW6PpEoY.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-4ea9e766","path":"/en/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html","title":"NameRules - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"String.isSynthetic - i-ext-method","slug":"string-issynthetic-i-ext-method","link":"#string-issynthetic-i-ext-method","children":[]},{"level":2,"title":"String.isOnlySymbols - i-ext-method","slug":"string-isonlysymbols-i-ext-method","link":"#string-isonlysymbols-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyLetters - i-ext-method","slug":"string-isonlyletters-i-ext-method","link":"#string-isonlyletters-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyNumbers - i-ext-method","slug":"string-isonlynumbers-i-ext-method","link":"#string-isonlynumbers-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyLettersNumbers - i-ext-method","slug":"string-isonlylettersnumbers-i-ext-method","link":"#string-isonlylettersnumbers-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyLowercase - i-ext-method","slug":"string-isonlylowercase-i-ext-method","link":"#string-isonlylowercase-i-ext-method","children":[]},{"level":2,"title":"String.isOnlyUppercase - i-ext-method","slug":"string-isonlyuppercase-i-ext-method","link":"#string-isonlyuppercase-i-ext-method","children":[]}],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.md"}');export{e as data}; diff --git a/assets/ObjectRules.html-EZNQwBuT.js b/assets/ObjectRules.html-EZNQwBuT.js new file mode 100644 index 0000000..e872b1e --- /dev/null +++ b/assets/ObjectRules.html-EZNQwBuT.js @@ -0,0 +1,2 @@ +import{_ as s,o as e,c as o,a}from"./app-Un_zyw_U.js";const n={},t=a(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

ObjectRules - class

class ObjectRules private constructor(private val instance: Any)
+

Change Records

v1.0.0 first

Function Illustrate

这是一个任意对象条件实现类。

可对 R8 混淆后的 ClassMember 进行更加详细的定位。

`,8),c=[t];function l(r,p){return e(),o("div",null,c)}const d=s(n,[["render",l],["__file","ObjectRules.html.vue"]]);export{d as default}; diff --git a/assets/ObjectRules.html-Nqx6ijx7.js b/assets/ObjectRules.html-Nqx6ijx7.js new file mode 100644 index 0000000..76e0e74 --- /dev/null +++ b/assets/ObjectRules.html-Nqx6ijx7.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-b0f7c49c","path":"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html","title":"ObjectRules - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.md"}');export{e as data}; diff --git a/assets/ObjectRules.html-eckIsmZq.js b/assets/ObjectRules.html-eckIsmZq.js new file mode 100644 index 0000000..475d111 --- /dev/null +++ b/assets/ObjectRules.html-eckIsmZq.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-3045c7fe","path":"/en/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html","title":"ObjectRules - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.md"}');export{e as data}; diff --git a/assets/ObjectRules.html-qlYFsawY.js b/assets/ObjectRules.html-qlYFsawY.js new file mode 100644 index 0000000..70fbf84 --- /dev/null +++ b/assets/ObjectRules.html-qlYFsawY.js @@ -0,0 +1,2 @@ +import{_ as s,o as e,c as a,a as o}from"./app-Un_zyw_U.js";const c={},n=o(`

ObjectRules - class

class ObjectRules private constructor(private val instance: Any)
+

变更记录

v1.0.0 添加

功能描述

这是一个任意对象条件实现类。

可对 R8 混淆后的 ClassMember 进行更加详细的定位。

`,7),l=[n];function t(p,r){return e(),a("div",null,l)}const i=s(c,[["render",t],["__file","ObjectRules.html.vue"]]);export{i as default}; diff --git a/assets/ReflectionFactory.html-4bon6h3y.js b/assets/ReflectionFactory.html-4bon6h3y.js new file mode 100644 index 0000000..a768b13 --- /dev/null +++ b/assets/ReflectionFactory.html-4bon6h3y.js @@ -0,0 +1,99 @@ +import{_ as s,o as a,c as n,a as l}from"./app-Un_zyw_U.js";const o={},e=l(`

ReflectionFactory - kt

变更记录

v1.0.0 添加

功能描述

这是自定义 MemberClass 相关功能的查找匹配以及 invoke 的封装类。

LazyClass - class

open class LazyClass<T> internal constructor(
+    private val instance: Any,
+    private val initialize: Boolean,
+    private val loader: ClassLoaderInitializer?
+)
+

变更记录

v1.0.3 新增

功能描述

懒装载 Class 实例。

ClassLoader.listOfClasses - ext-method

fun ClassLoader.listOfClasses(): List<String>
+

变更记录

v1.0.0 添加

功能描述

写出当前 ClassLoader 下所有 Class 名称数组。

注意

此方法在 Class 数量过多时会非常耗时。

若要按指定规则查找一个 Class,请使用 ClassLoader.searchClass 方法。

ClassLoader.searchClass - ext-method

inline fun ClassLoader.searchClass(context: Context?, name: String, async: Boolean, initiate: ClassConditions): DexClassFinder.Result
+

变更记录

v1.0.0 添加

功能描述

通过当前 ClassLoader 按指定条件查找并得到 Dex 中的 Class

特别注意

此方法在 Class 数量过多及查找条件复杂时会非常耗时。

建议启用 async 或设置 name 参数,name 参数将在当前 APP 不同版本中自动进行本地缓存以提升效率。

如果使用了 asyncname 参数,则必须填写 context 参数。

此功能尚在试验阶段,性能与稳定性可能仍然存在问题,使用过程遇到问题请向我们报告并帮助我们改进。

Class.hasExtends - ext-field

val Class<*>.hasExtends: Boolean
+

变更记录

v1.0.0 添加

功能描述

当前 Class 是否有继承关系,父类是 Any 将被认为没有继承关系。

Class?.extends - ext-method

infix fun Class<*>?.extends(other: Class<*>?): Boolean
+

变更记录

v1.0.0 添加

功能描述

当前 Class 是否继承于 other

如果当前 Class 就是 other 也会返回 true

如果当前 Classnullothernull 会返回 false

功能示例

你可以使用此方法来判断两个 Class 是否存在继承关系。

示例如下

// 假设下面这两个 Class 就是你需要判断的 Class
+val classA: Class<*>?
+val classB: Class<*>?
+// 判断 A 是否继承于 B
+if (classA extends classB) {
+    // Your code here.
+}
+

Class?.notExtends - ext-method

infix fun Class<*>?.notExtends(other: Class<*>?): Boolean
+

变更记录

v1.0.0 添加

功能描述

当前 Class 是否不继承于 other

此方法相当于 extends 的反向判断。

功能示例

你可以使用此方法来判断两个 Class 是否不存在继承关系。

示例如下

// 假设下面这两个 Class 就是你需要判断的 Class
+val classA: Class<*>?
+val classB: Class<*>?
+// 判断 A 是否不继承于 B
+if (classA notExtends classB) {
+    // Your code here.
+}
+

Class?.implements - ext-method

infix fun Class<*>?.implements(other: Class<*>?): Boolean
+

变更记录

v1.0.0 添加

功能描述

当前 Class 是否实现了 other 接口类。

如果当前 Classnullothernull 会返回 false

功能示例

你可以使用此方法来判断两个 Class 是否存在依赖关系。

示例如下

// 假设下面这两个 Class 就是你需要判断的 Class
+val classA: Class<*>?
+val classB: Class<*>?
+// 判断 A 是否实现了 B 接口类
+if (classA implements classB) {
+    // Your code here.
+}
+

Class?.notImplements - ext-method

infix fun Class<*>?.notImplements(other: Class<*>?): Boolean
+

变更记录

v1.0.0 添加

功能描述

当前 Class 是否未实现 other 接口类。

此方法相当于 implements 的反向判断。

功能示例

你可以使用此方法来判断两个 Class 是否不存在依赖关系。

示例如下

// 假设下面这两个 Class 就是你需要判断的 Class
+val classA: Class<*>?
+val classB: Class<*>?
+// 判断 A 是否未实现 B 接口类
+if (classA notImplements classB) {
+    // Your code here.
+}
+

Class.toJavaPrimitiveType - ext-method

fun Class<*>.toJavaPrimitiveType(): Class<*>
+

变更记录

v1.0.0 添加

功能描述

自动转换当前 Class 为 Java 原始类型 (Primitive Type)。

如果当前 Class 为 Java 或 Kotlin 基本类型将自动执行类型转换。

当前能够自动转换的基本类型如下。

String.toClass - ext-method

fun String.toClass(loader: ClassLoader?, initialize: Boolean): Class<*>
+
inline fun <reified T> String.toClass(loader: ClassLoader?, initialize: Boolean): Class<T>
+

变更记录

v1.0.0 添加

功能描述

通过字符串类名转换为 loader 中的实体类。

功能示例

你可以直接填写你要查找的目标 Class,必须在默认 ClassLoader 下存在。

示例如下

"com.example.demo.DemoClass".toClass()
+

你还可以自定义 Class 所在的 ClassLoader

示例如下

val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
+"com.example.demo.DemoClass".toClass(customClassLoader)
+

你还可以指定 Class 的目标类型。

示例如下

// 指定的 DemoClass 必须存在或为可访问的 stub
+"com.example.demo.DemoClass".toClass<DemoClass>()
+

你还可以设置在获取到这个 Class 时是否自动执行其默认的静态方法块,默认情况下不会执行。

示例如下

// 获取并执行 DemoClass 默认的静态方法块
+"com.example.demo.DemoClass".toClass(initialize = true)
+

默认的静态方法块在 Java 中使用如下方式定义。

示例如下

public class DemoClass {
+
+    static {
+        // 这里是静态方法块的内容
+    }
+
+    public DemoClass() {
+        // ...
+    }
+}
+

String.toClassOrNull - ext-method

fun String.toClassOrNull(loader: ClassLoader?, initialize: Boolean): Class<*>?
+
inline fun <reified T> String.toClassOrNull(loader: ClassLoader?, initialize: Boolean): Class<T>?
+

变更记录

v1.0.0 添加

功能描述

通过字符串类名转换为 loader 中的实体类。

找不到 Class 会返回 null,不会抛出异常。

功能示例

用法请参考 String.toClass 方法。

classOf - method

inline fun <reified T> classOf(loader: ClassLoader?, initialize: Boolean): Class<T>
+

变更记录

v1.0.0 添加

功能描述

通过 T 得到其 Class 实例并转换为实体类。

功能示例

我们要获取一个 Class 在 Kotlin 下不通过反射时应该这样做。

示例如下

DemoClass::class.java
+

现在,你可以直接 cast 一个实例并获取它的 Class 对象,必须在当前 ClassLoader 下存在。

示例如下

classOf<DemoClass>()
+

若目标存在的 Classstub,通过这种方式,你还可以自定义 Class 所在的 ClassLoader

示例如下

val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
+classOf<DemoClass>(customClassLoader)
+

lazyClass - method

fun lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
+
inline fun <reified T> lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<T>
+
fun lazyClass(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
+

变更记录

v1.0.3 新增

功能描述

懒装载 Class

lazyClassOrNull - method

fun lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
+
inline fun <reified T> lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<T>
+
fun lazyClassOrNull(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
+

变更记录

v1.0.3 新增

功能描述

懒装载 Class

String.hasClass - ext-method

fun String.hasClass(loader: ClassLoader?): Boolean
+

变更记录

v1.0.0 添加

功能描述

通过字符串类名使用指定的 ClassLoader 查找是否存在。

功能示例

你可以轻松的使用此方法判断字符串中的类是否存在,效果等同于直接使用 Class.forName

示例如下

if("com.example.demo.DemoClass".hasClass()) {
+    // Your code here.
+}
+

填入方法中的 loader 参数可判断指定的 ClassLoader 中的 Class 是否存在。

示例如下

val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
+if("com.example.demo.DemoClass".hasClass(customClassLoader)) {
+    // Your code here.
+}
+

Class.hasField - ext-method

inline fun Class<*>.hasField(initiate: FieldConditions): Boolean
+

变更记录

v1.0.0 添加

功能描述

查找变量是否存在。

Class.hasMethod - ext-method

inline fun Class<*>.hasMethod(initiate: MethodConditions): Boolean
+

变更记录

v1.0.0 添加

功能描述

查找方法是否存在。

Class.hasConstructor - ext-method

inline fun Class<*>.hasConstructor(initiate: ConstructorConditions): Boolean
+

变更记录

v1.0.0 添加

功能描述

查找构造方法是否存在。

Member.hasModifiers - ext-method

inline fun Member.hasModifiers(conditions: ModifierConditions): Boolean
+

变更记录

v1.0.0 添加

功能描述

查找 Member 中匹配的描述符。

Class.hasModifiers - ext-method

inline fun Class<*>.hasModifiers(conditions: ModifierConditions): Boolean
+

变更记录

v1.0.0 添加

功能描述

查找 Class 中匹配的描述符。

Class.field - ext-method

inline fun Class<*>.field(initiate: FieldConditions): FieldFinder.Result
+

变更记录

v1.0.0 添加

功能描述

查找并得到变量。

Class.method - ext-method

inline fun Class<*>.method(initiate: MethodConditions): MethodFinder.Result
+

变更记录

v1.0.0 添加

功能描述

查找并得到方法。

Class.constructor - ext-method

inline fun Class<*>.constructor(initiate: ConstructorConditions): ConstructorFinder.Result
+

变更记录

v1.0.0 添加

功能描述

查找并得到构造方法。

Class.generic - ext-method

fun Class<*>.generic(): GenericClass?
+

变更记录

v1.0.0 添加

功能描述

获得当前 Class 的泛型父类。

如果当前实例不存在泛型将返回 null

Class.generic - ext-method

inline fun Class<*>.generic(initiate: GenericClass.() -> Unit): GenericClass?
+

变更记录

v1.0.0 添加

功能描述

获得当前 Class 的泛型父类。

如果当前实例不存在泛型将返回 null

Any.current - ext-method

inline fun <reified T : Any> T.current(ignored: Boolean): CurrentClass
+
inline fun <reified T : Any> T.current(ignored: Boolean, initiate: CurrentClass.() -> Unit): T
+

变更记录

v1.0.0 添加

功能描述

获得当前实例的类操作对象。

Class.buildOf - ext-method

inline fun Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): Any?
+
inline fun <T> Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): T?
+

变更记录

v1.0.0 添加

功能描述

通过构造方法创建新实例,指定类型 T 或任意类型 Any

Class.allMethods - ext-method

inline fun Class<*>.allMethods(isAccessible: Boolean, result: (index: Int, method: Method) -> Unit)
+

变更记录

v1.0.0 添加

功能描述

遍历当前类中的所有方法。

Class.allConstructors - ext-method

inline fun Class<*>.allConstructors(isAccessible: Boolean, result: (index: Int, constructor: Constructor<*>) -> Unit)
+

变更记录

v1.0.0 添加

功能描述

遍历当前类中的所有构造方法。

Class.allFields - ext-method

inline fun Class<*>.allFields(isAccessible: Boolean, result: (index: Int, field: Field) -> Unit)
+

变更记录

v1.0.0 添加

功能描述

遍历当前类中的所有变量。

`,257),p=[e];function t(c,r){return a(),n("div",null,p)}const i=s(o,[["render",t],["__file","ReflectionFactory.html.vue"]]);export{i as default}; diff --git a/assets/ReflectionFactory.html-NQiaTVE5.js b/assets/ReflectionFactory.html-NQiaTVE5.js new file mode 100644 index 0000000..532b797 --- /dev/null +++ b/assets/ReflectionFactory.html-NQiaTVE5.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-728f231c","path":"/en/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html","title":"ReflectionFactory - kt","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"LazyClass - class","slug":"lazyclass-class","link":"#lazyclass-class","children":[]},{"level":2,"title":"ClassLoader.listOfClasses - ext-method","slug":"classloader-listofclasses-ext-method","link":"#classloader-listofclasses-ext-method","children":[]},{"level":2,"title":"ClassLoader.searchClass - ext-method","slug":"classloader-searchclass-ext-method","link":"#classloader-searchclass-ext-method","children":[]},{"level":2,"title":"Class.hasExtends - ext-field","slug":"class-hasextends-ext-field","link":"#class-hasextends-ext-field","children":[]},{"level":2,"title":"Class?.extends - ext-method","slug":"class-extends-ext-method","link":"#class-extends-ext-method","children":[]},{"level":2,"title":"Class?.notExtends - ext-method","slug":"class-notextends-ext-method","link":"#class-notextends-ext-method","children":[]},{"level":2,"title":"Class?.implements - ext-method","slug":"class-implements-ext-method","link":"#class-implements-ext-method","children":[]},{"level":2,"title":"Class?.notImplements - ext-method","slug":"class-notimplements-ext-method","link":"#class-notimplements-ext-method","children":[]},{"level":2,"title":"Class.toJavaPrimitiveType - ext-method","slug":"class-tojavaprimitivetype-ext-method","link":"#class-tojavaprimitivetype-ext-method","children":[]},{"level":2,"title":"String.toClass - ext-method","slug":"string-toclass-ext-method","link":"#string-toclass-ext-method","children":[]},{"level":2,"title":"String.toClassOrNull - ext-method","slug":"string-toclassornull-ext-method","link":"#string-toclassornull-ext-method","children":[]},{"level":2,"title":"classOf - method","slug":"classof-method","link":"#classof-method","children":[]},{"level":2,"title":"lazyClass - method","slug":"lazyclass-method","link":"#lazyclass-method","children":[]},{"level":2,"title":"lazyClassOrNull - method","slug":"lazyclassornull-method","link":"#lazyclassornull-method","children":[]},{"level":2,"title":"String.hasClass - ext-method","slug":"string-hasclass-ext-method","link":"#string-hasclass-ext-method","children":[]},{"level":2,"title":"Class.hasField - ext-method","slug":"class-hasfield-ext-method","link":"#class-hasfield-ext-method","children":[]},{"level":2,"title":"Class.hasMethod - ext-method","slug":"class-hasmethod-ext-method","link":"#class-hasmethod-ext-method","children":[]},{"level":2,"title":"Class.hasConstructor - ext-method","slug":"class-hasconstructor-ext-method","link":"#class-hasconstructor-ext-method","children":[]},{"level":2,"title":"Member.hasModifiers - ext-method","slug":"member-hasmodifiers-ext-method","link":"#member-hasmodifiers-ext-method","children":[]},{"level":2,"title":"Class.hasModifiers - ext-method","slug":"class-hasmodifiers-ext-method","link":"#class-hasmodifiers-ext-method","children":[]},{"level":2,"title":"Class.field - ext-method","slug":"class-field-ext-method","link":"#class-field-ext-method","children":[]},{"level":2,"title":"Class.method - ext-method","slug":"class-method-ext-method","link":"#class-method-ext-method","children":[]},{"level":2,"title":"Class.constructor - ext-method","slug":"class-constructor-ext-method","link":"#class-constructor-ext-method","children":[]},{"level":2,"title":"Class.generic - ext-method","slug":"class-generic-ext-method","link":"#class-generic-ext-method","children":[]},{"level":2,"title":"Class.generic - ext-method","slug":"class-generic-ext-method-1","link":"#class-generic-ext-method-1","children":[]},{"level":2,"title":"Any.current - ext-method","slug":"any-current-ext-method","link":"#any-current-ext-method","children":[]},{"level":2,"title":"Class.buildOf - ext-method","slug":"class-buildof-ext-method","link":"#class-buildof-ext-method","children":[]},{"level":2,"title":"Class.allMethods - ext-method","slug":"class-allmethods-ext-method","link":"#class-allmethods-ext-method","children":[]},{"level":2,"title":"Class.allConstructors - ext-method","slug":"class-allconstructors-ext-method","link":"#class-allconstructors-ext-method","children":[]},{"level":2,"title":"Class.allFields - ext-method","slug":"class-allfields-ext-method","link":"#class-allfields-ext-method","children":[]}],"git":{"updatedTime":1696530015000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.md"}');export{e as data}; diff --git a/assets/ReflectionFactory.html-e_EIy99E.js b/assets/ReflectionFactory.html-e_EIy99E.js new file mode 100644 index 0000000..d15e692 --- /dev/null +++ b/assets/ReflectionFactory.html-e_EIy99E.js @@ -0,0 +1,99 @@ +import{_ as s,o as a,c as n,a as l}from"./app-Un_zyw_U.js";const o={},e=l(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

ReflectionFactory - kt

Change Records

v1.0.0 first

Function Illustrate

这是自定义 MemberClass 相关功能的查找匹配以及 invoke 的封装类。

LazyClass - class

open class LazyClass<T> internal constructor(
+    private val instance: Any,
+    private val initialize: Boolean,
+    private val loader: ClassLoaderInitializer?
+)
+

Change Records

v1.2.0 added

Function Illustrate

懒装载 Class 实例。

ClassLoader.listOfClasses - ext-method

fun ClassLoader.listOfClasses(): List<String>
+

Change Records

v1.0.0 first

Function Illustrate

写出当前 ClassLoader 下所有 Class 名称数组。

Notice

此方法在 Class 数量过多时会非常耗时。

若要按指定规则查找一个 Class,请使用 ClassLoader.searchClass 方法。

ClassLoader.searchClass - ext-method

inline fun ClassLoader.searchClass(context: Context?, name: String, async: Boolean, initiate: ClassConditions): DexClassFinder.Result
+

Change Records

v1.0.0 first

Function Illustrate

通过当前 ClassLoader 按指定条件查找并得到 Dex 中的 Class

Pay Attention

此方法在 Class 数量过多及查找条件复杂时会非常耗时。

建议启用 async 或设置 name 参数,name 参数将在当前 APP 不同版本中自动进行本地缓存以提升效率。

如果使用了 asyncname 参数,则必须填写 context 参数。

此功能尚在试验阶段,性能与稳定性可能仍然存在问题,使用过程遇到问题请向我们报告并帮助我们改进。

Class.hasExtends - ext-field

val Class<*>.hasExtends: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

当前 Class 是否有继承关系,父类是 Any 将被认为没有继承关系。

Class?.extends - ext-method

infix fun Class<*>?.extends(other: Class<*>?): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

当前 Class 是否继承于 other

如果当前 Class 就是 other 也会返回 true

如果当前 Classnullothernull 会返回 false

Function Example

你可以使用此方法来判断两个 Class 是否存在继承关系。

The following example

// 假设下面这两个 Class 就是你需要判断的 Class
+val classA: Class<*>?
+val classB: Class<*>?
+// 判断 A 是否继承于 B
+if (classA extends classB) {
+    // Your code here.
+}
+

Class?.notExtends - ext-method

infix fun Class<*>?.notExtends(other: Class<*>?): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

当前 Class 是否不继承于 other

此方法相当于 extends 的反向判断。

Function Example

你可以使用此方法来判断两个 Class 是否不存在继承关系。

The following example

// 假设下面这两个 Class 就是你需要判断的 Class
+val classA: Class<*>?
+val classB: Class<*>?
+// 判断 A 是否不继承于 B
+if (classA notExtends classB) {
+    // Your code here.
+}
+

Class?.implements - ext-method

infix fun Class<*>?.implements(other: Class<*>?): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

当前 Class 是否实现了 other 接口类。

如果当前 Classnullothernull 会返回 false

Function Example

你可以使用此方法来判断两个 Class 是否存在依赖关系。

The following example

// 假设下面这两个 Class 就是你需要判断的 Class
+val classA: Class<*>?
+val classB: Class<*>?
+// 判断 A 是否实现了 B 接口类
+if (classA implements classB) {
+    // Your code here.
+}
+

Class?.notImplements - ext-method

infix fun Class<*>?.notImplements(other: Class<*>?): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

当前 Class 是否未实现 other 接口类。

此方法相当于 implements 的反向判断。

Function Example

你可以使用此方法来判断两个 Class 是否不存在依赖关系。

The following example

// 假设下面这两个 Class 就是你需要判断的 Class
+val classA: Class<*>?
+val classB: Class<*>?
+// 判断 A 是否未实现 B 接口类
+if (classA notImplements classB) {
+    // Your code here.
+}
+

Class.toJavaPrimitiveType - ext-method

fun Class<*>.toJavaPrimitiveType(): Class<*>
+

Change Records

v1.0.0 first

Function Illustrate

自动转换当前 Class 为 Java 原始类型 (Primitive Type)。

如果当前 Class 为 Java 或 Kotlin 基本类型将自动执行类型转换。

当前能够自动转换的基本类型如下。

String.toClass - ext-method

fun String.toClass(loader: ClassLoader?, initialize: Boolean): Class<*>
+
inline fun <reified T> String.toClass(loader: ClassLoader?, initialize: Boolean): Class<T>
+

Change Records

v1.0.0 first

Function Illustrate

通过字符串类名转换为 loader 中的实体类。

Function Example

你可以直接填写你要查找的目标 Class,必须在默认 ClassLoader 下存在。

The following example

"com.example.demo.DemoClass".toClass()
+

你还可以自定义 Class 所在的 ClassLoader

The following example

val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
+"com.example.demo.DemoClass".toClass(customClassLoader)
+

你还可以指定 Class 的目标类型。

The following example

// 指定的 DemoClass 必须存在或为可访问的 stub
+"com.example.demo.DemoClass".toClass<DemoClass>()
+

你还可以设置在获取到这个 Class 时是否自动执行其默认的静态方法块,默认情况下不会执行。

The following example

// 获取并执行 DemoClass 默认的静态方法块
+"com.example.demo.DemoClass".toClass(initialize = true)
+

默认的静态方法块在 Java 中使用如下方式定义。

The following example

public class DemoClass {
+
+    static {
+        // 这里是静态方法块的内容
+    }
+
+    public DemoClass() {
+        // ...
+    }
+}
+

String.toClassOrNull - ext-method

fun String.toClassOrNull(loader: ClassLoader?, initialize: Boolean): Class<*>?
+
inline fun <reified T> String.toClassOrNull(loader: ClassLoader?, initialize: Boolean): Class<T>?
+

Change Records

v1.0.0 first

Function Illustrate

通过字符串类名转换为 loader 中的实体类。

找不到 Class 会返回 null,不会抛出异常。

Function Example

用法请参考 String.toClass 方法。

classOf - method

inline fun <reified T> classOf(loader: ClassLoader?, initialize: Boolean): Class<T>
+

Change Records

v1.0.0 first

Function Illustrate

通过 T 得到其 Class 实例并转换为实体类。

Function Example

我们要获取一个 Class 在 Kotlin 下不通过反射时应该这样做。

The following example

DemoClass::class.java
+

现在,你可以直接 cast 一个实例并获取它的 Class 对象,必须在当前 ClassLoader 下存在。

The following example

classOf<DemoClass>()
+

若目标存在的 Classstub,通过这种方式,你还可以自定义 Class 所在的 ClassLoader

The following example

val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
+classOf<DemoClass>(customClassLoader)
+

lazyClass - method

fun lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
+
inline fun <reified T> lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<T>
+
fun lazyClass(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
+

Change Records

v1.0.3 added

Function Illustrate

懒装载 Class

lazyClassOrNull - method

fun lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
+
inline fun <reified T> lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<T>
+
fun lazyClassOrNull(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
+

Change Records

v1.0.3 added

Function Illustrate

懒装载 Class

String.hasClass - ext-method

fun String.hasClass(loader: ClassLoader?): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

通过字符串类名使用指定的 ClassLoader 查找是否存在。

Function Example

你可以轻松的使用此方法判断字符串中的类是否存在,效果等同于直接使用 Class.forName

The following example

if("com.example.demo.DemoClass".hasClass()) {
+    // Your code here.
+}
+

填入方法中的 loader 参数可判断指定的 ClassLoader 中的 Class 是否存在。

The following example

val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
+if("com.example.demo.DemoClass".hasClass(customClassLoader)) {
+    // Your code here.
+}
+

Class.hasField - ext-method

inline fun Class<*>.hasField(initiate: FieldConditions): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

查找变量是否存在。

Class.hasMethod - ext-method

inline fun Class<*>.hasMethod(initiate: MethodConditions): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

查找方法是否存在。

Class.hasConstructor - ext-method

inline fun Class<*>.hasConstructor(initiate: ConstructorConditions): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

查找构造方法是否存在。

Member.hasModifiers - ext-method

inline fun Member.hasModifiers(conditions: ModifierConditions): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

查找 Member 中匹配的描述符。

Class.hasModifiers - ext-method

inline fun Class<*>.hasModifiers(conditions: ModifierConditions): Boolean
+

Change Records

v1.0.0 first

Function Illustrate

查找 Class 中匹配的描述符。

Class.field - ext-method

inline fun Class<*>.field(initiate: FieldConditions): FieldFinder.Result
+

Change Records

v1.0.0 first

Function Illustrate

查找并得到变量。

Class.method - ext-method

inline fun Class<*>.method(initiate: MethodConditions): MethodFinder.Result
+

Change Records

v1.0.0 first

Function Illustrate

查找并得到方法。

Class.constructor - ext-method

inline fun Class<*>.constructor(initiate: ConstructorConditions): ConstructorFinder.Result
+

Change Records

v1.0.0 first

Function Illustrate

查找并得到构造方法。

Class.generic - ext-method

fun Class<*>.generic(): GenericClass?
+

Change Records

v1.0.0 first

Function Illustrate

获得当前 Class 的泛型父类。

如果当前实例不存在泛型将返回 null

Class.generic - ext-method

inline fun Class<*>.generic(initiate: GenericClass.() -> Unit): GenericClass?
+

Change Records

v1.0.0 first

Function Illustrate

获得当前 Class 的泛型父类。

如果当前实例不存在泛型将返回 null

Any.current - ext-method

inline fun <reified T : Any> T.current(ignored: Boolean): CurrentClass
+
inline fun <reified T : Any> T.current(ignored: Boolean, initiate: CurrentClass.() -> Unit): T
+

Change Records

v1.0.0 first

Function Illustrate

获得当前实例的类操作对象。

Class.buildOf - ext-method

inline fun Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): Any?
+
inline fun <T> Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): T?
+

Change Records

v1.0.0 first

Function Illustrate

通过构造方法创建新实例,指定类型 T 或任意类型 Any

Class.allMethods - ext-method

inline fun Class<*>.allMethods(isAccessible: Boolean, result: (index: Int, method: Method) -> Unit)
+

Change Records

v1.0.0 first

Function Illustrate

遍历当前类中的所有方法。

Class.allConstructors - ext-method

inline fun Class<*>.allConstructors(isAccessible: Boolean, result: (index: Int, constructor: Constructor<*>) -> Unit)
+

Change Records

v1.0.0 first

Function Illustrate

遍历当前类中的所有构造方法。

Class.allFields - ext-method

inline fun Class<*>.allFields(isAccessible: Boolean, result: (index: Int, field: Field) -> Unit)
+

Change Records

v1.0.0 first

Function Illustrate

遍历当前类中的所有变量。

`,258),p=[e];function t(c,r){return a(),n("div",null,p)}const i=s(o,[["render",t],["__file","ReflectionFactory.html.vue"]]);export{i as default}; diff --git a/assets/ReflectionFactory.html-fNUb_WhR.js b/assets/ReflectionFactory.html-fNUb_WhR.js new file mode 100644 index 0000000..690e339 --- /dev/null +++ b/assets/ReflectionFactory.html-fNUb_WhR.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-b3841eba","path":"/zh-cn/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html","title":"ReflectionFactory - kt","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"LazyClass - class","slug":"lazyclass-class","link":"#lazyclass-class","children":[]},{"level":2,"title":"ClassLoader.listOfClasses - ext-method","slug":"classloader-listofclasses-ext-method","link":"#classloader-listofclasses-ext-method","children":[]},{"level":2,"title":"ClassLoader.searchClass - ext-method","slug":"classloader-searchclass-ext-method","link":"#classloader-searchclass-ext-method","children":[]},{"level":2,"title":"Class.hasExtends - ext-field","slug":"class-hasextends-ext-field","link":"#class-hasextends-ext-field","children":[]},{"level":2,"title":"Class?.extends - ext-method","slug":"class-extends-ext-method","link":"#class-extends-ext-method","children":[]},{"level":2,"title":"Class?.notExtends - ext-method","slug":"class-notextends-ext-method","link":"#class-notextends-ext-method","children":[]},{"level":2,"title":"Class?.implements - ext-method","slug":"class-implements-ext-method","link":"#class-implements-ext-method","children":[]},{"level":2,"title":"Class?.notImplements - ext-method","slug":"class-notimplements-ext-method","link":"#class-notimplements-ext-method","children":[]},{"level":2,"title":"Class.toJavaPrimitiveType - ext-method","slug":"class-tojavaprimitivetype-ext-method","link":"#class-tojavaprimitivetype-ext-method","children":[]},{"level":2,"title":"String.toClass - ext-method","slug":"string-toclass-ext-method","link":"#string-toclass-ext-method","children":[]},{"level":2,"title":"String.toClassOrNull - ext-method","slug":"string-toclassornull-ext-method","link":"#string-toclassornull-ext-method","children":[]},{"level":2,"title":"classOf - method","slug":"classof-method","link":"#classof-method","children":[]},{"level":2,"title":"lazyClass - method","slug":"lazyclass-method","link":"#lazyclass-method","children":[]},{"level":2,"title":"lazyClassOrNull - method","slug":"lazyclassornull-method","link":"#lazyclassornull-method","children":[]},{"level":2,"title":"String.hasClass - ext-method","slug":"string-hasclass-ext-method","link":"#string-hasclass-ext-method","children":[]},{"level":2,"title":"Class.hasField - ext-method","slug":"class-hasfield-ext-method","link":"#class-hasfield-ext-method","children":[]},{"level":2,"title":"Class.hasMethod - ext-method","slug":"class-hasmethod-ext-method","link":"#class-hasmethod-ext-method","children":[]},{"level":2,"title":"Class.hasConstructor - ext-method","slug":"class-hasconstructor-ext-method","link":"#class-hasconstructor-ext-method","children":[]},{"level":2,"title":"Member.hasModifiers - ext-method","slug":"member-hasmodifiers-ext-method","link":"#member-hasmodifiers-ext-method","children":[]},{"level":2,"title":"Class.hasModifiers - ext-method","slug":"class-hasmodifiers-ext-method","link":"#class-hasmodifiers-ext-method","children":[]},{"level":2,"title":"Class.field - ext-method","slug":"class-field-ext-method","link":"#class-field-ext-method","children":[]},{"level":2,"title":"Class.method - ext-method","slug":"class-method-ext-method","link":"#class-method-ext-method","children":[]},{"level":2,"title":"Class.constructor - ext-method","slug":"class-constructor-ext-method","link":"#class-constructor-ext-method","children":[]},{"level":2,"title":"Class.generic - ext-method","slug":"class-generic-ext-method","link":"#class-generic-ext-method","children":[]},{"level":2,"title":"Class.generic - ext-method","slug":"class-generic-ext-method-1","link":"#class-generic-ext-method-1","children":[]},{"level":2,"title":"Any.current - ext-method","slug":"any-current-ext-method","link":"#any-current-ext-method","children":[]},{"level":2,"title":"Class.buildOf - ext-method","slug":"class-buildof-ext-method","link":"#class-buildof-ext-method","children":[]},{"level":2,"title":"Class.allMethods - ext-method","slug":"class-allmethods-ext-method","link":"#class-allmethods-ext-method","children":[]},{"level":2,"title":"Class.allConstructors - ext-method","slug":"class-allconstructors-ext-method","link":"#class-allconstructors-ext-method","children":[]},{"level":2,"title":"Class.allFields - ext-method","slug":"class-allfields-ext-method","link":"#class-allfields-ext-method","children":[]}],"git":{"updatedTime":1696530015000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.md"}');export{e as data}; diff --git a/assets/VariableTypeFactory.html-L20wMFG_.js b/assets/VariableTypeFactory.html-L20wMFG_.js new file mode 100644 index 0000000..02cc525 --- /dev/null +++ b/assets/VariableTypeFactory.html-L20wMFG_.js @@ -0,0 +1 @@ +import{_ as o,r,o as n,c,b as t,d as e,e as s,a as i}from"./app-Un_zyw_U.js";const l={},p=i('

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

VariableTypeFactory - kt

Change Records

v1.0.0 first

Function Illustrate

这是一个预置反射类型的常量类,主要为 Java 相关基本变量类型的 Class 内容,跟随版本更新会逐一进行增加。

',6),d={href:"https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"};function h(u,b){const a=r("ExternalLinkIcon");return n(),c("div",null,[p,t("p",null,[e("详情可 "),t("a",d,[e("点击这里"),s(a)]),e(" 进行查看。")])])}const _=o(l,[["render",h],["__file","VariableTypeFactory.html.vue"]]);export{_ as default}; diff --git a/assets/VariableTypeFactory.html-aKba1Svi.js b/assets/VariableTypeFactory.html-aKba1Svi.js new file mode 100644 index 0000000..f64fdaf --- /dev/null +++ b/assets/VariableTypeFactory.html-aKba1Svi.js @@ -0,0 +1 @@ +const a=JSON.parse('{"key":"v-12f074b0","path":"/en/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html","title":"VariableTypeFactory - kt","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.md"}');export{a as data}; diff --git a/assets/VariableTypeFactory.html-vuqEkE15.js b/assets/VariableTypeFactory.html-vuqEkE15.js new file mode 100644 index 0000000..67a5643 --- /dev/null +++ b/assets/VariableTypeFactory.html-vuqEkE15.js @@ -0,0 +1 @@ +import{_ as o,r,o as c,c as n,b as a,d as e,e as s,a as l}from"./app-Un_zyw_U.js";const i={},p=l('

VariableTypeFactory - kt

变更记录

v1.0.0 添加

功能描述

这是一个预置反射类型的常量类,主要为 Java 相关基本变量类型的 Class 内容,跟随版本更新会逐一进行增加。

',5),d={href:"https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"};function _(b,h){const t=r("ExternalLinkIcon");return c(),n("div",null,[p,a("p",null,[e("详情可 "),a("a",d,[e("点击这里"),s(t)]),e(" 进行查看。")])])}const f=o(i,[["render",_],["__file","VariableTypeFactory.html.vue"]]);export{f as default}; diff --git a/assets/VariableTypeFactory.html-z7CY3MNH.js b/assets/VariableTypeFactory.html-z7CY3MNH.js new file mode 100644 index 0000000..7af2928 --- /dev/null +++ b/assets/VariableTypeFactory.html-z7CY3MNH.js @@ -0,0 +1 @@ +const a=JSON.parse('{"key":"v-5ad1133e","path":"/zh-cn/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html","title":"VariableTypeFactory - kt","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.md"}');export{a as data}; diff --git a/assets/VariousClass.html-27EKagHz.js b/assets/VariousClass.html-27EKagHz.js new file mode 100644 index 0000000..d6d2018 --- /dev/null +++ b/assets/VariousClass.html-27EKagHz.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c234ac1e","path":"/zh-cn/api/public/com/highcapable/yukireflection/bean/VariousClass.html","title":"VariousClass - class","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":2,"title":"getOrNull - method","slug":"getornull-method","link":"#getornull-method","children":[]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/bean/VariousClass.md"}');export{e as data}; diff --git a/assets/VariousClass.html-N1_WPt67.js b/assets/VariousClass.html-N1_WPt67.js new file mode 100644 index 0000000..94932db --- /dev/null +++ b/assets/VariousClass.html-N1_WPt67.js @@ -0,0 +1,4 @@ +import{_ as s,o as a,c as o,a as e}from"./app-Un_zyw_U.js";const l={},n=e(`

VariousClass - class

class VariousClass(private vararg val name: String)
+

变更记录

v1.0.0 添加

功能描述

这是一个不确定性 Class 类名装载器,通过 name 装载 Class 名称数组。

get - method

fun get(loader: ClassLoader? = null, initialize: Boolean): Class<*>
+

变更记录

v1.0.0 添加

功能描述

获取匹配的实体类。

使用当前 loader 装载目标 Class

getOrNull - method

fun getOrNull(loader: ClassLoader? = null, initialize: Boolean): Class<*>?
+

变更记录

v1.0.0 添加

功能描述

获取匹配的实体类。

使用当前 loader 装载目标 Class

匹配不到 Class 会返回 null,不会抛出异常。

`,21),p=[n];function c(t,r){return a(),o("div",null,p)}const i=s(l,[["render",c],["__file","VariousClass.html.vue"]]);export{i as default}; diff --git a/assets/VariousClass.html-OGR6uO-Q.js b/assets/VariousClass.html-OGR6uO-Q.js new file mode 100644 index 0000000..920d974 --- /dev/null +++ b/assets/VariousClass.html-OGR6uO-Q.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-3a8666c0","path":"/en/api/public/com/highcapable/yukireflection/bean/VariousClass.html","title":"VariousClass - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":2,"title":"getOrNull - method","slug":"getornull-method","link":"#getornull-method","children":[]}],"git":{"updatedTime":1674726569000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/bean/VariousClass.md"}');export{e as data}; diff --git a/assets/VariousClass.html-lYu6ahQy.js b/assets/VariousClass.html-lYu6ahQy.js new file mode 100644 index 0000000..88d73d3 --- /dev/null +++ b/assets/VariousClass.html-lYu6ahQy.js @@ -0,0 +1,4 @@ +import{_ as s,o as a,c as o,a as e}from"./app-Un_zyw_U.js";const n={},l=e(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

VariousClass - class

class VariousClass(private vararg val name: String)
+

Change Records

v1.0.0 first

Function Illustrate

这是一个不确定性 Class 类名装载器,通过 name 装载 Class 名称数组。

get - method

fun get(loader: ClassLoader? = null, initialize: Boolean): Class<*>
+

Change Records

v1.0.0 first

Function Illustrate

获取匹配的实体类。

使用当前 loader 装载目标 Class

getOrNull - method

fun getOrNull(loader: ClassLoader? = null, initialize: Boolean): Class<*>?
+

Change Records

v1.0.0 first

Function Illustrate

获取匹配的实体类。

使用当前 loader 装载目标 Class

匹配不到 Class 会返回 null,不会抛出异常。

`,22),t=[l];function c(p,r){return a(),o("div",null,t)}const i=s(n,[["render",c],["__file","VariousClass.html.vue"]]);export{i as default}; diff --git a/assets/ViewTypeFactory.html-0slISbaY.js b/assets/ViewTypeFactory.html-0slISbaY.js new file mode 100644 index 0000000..5492cc8 --- /dev/null +++ b/assets/ViewTypeFactory.html-0slISbaY.js @@ -0,0 +1 @@ +import{_ as a,r as c,o as r,c as n,b as o,d as e,e as s,a as i}from"./app-Un_zyw_U.js";const d={},l=i('

ViewTypeFactory - kt

变更记录

v1.0.0 添加

功能描述

这是一个预置反射类型的常量类,主要为 Android 相关 WidgetClass 内容,跟随版本更新会逐一进行增加。

',5),p={href:"https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"};function _(h,y){const t=c("ExternalLinkIcon");return r(),n("div",null,[l,o("p",null,[e("详情可 "),o("a",p,[e("点击这里"),s(t)]),e(" 进行查看。")])])}const k=a(d,[["render",_],["__file","ViewTypeFactory.html.vue"]]);export{k as default}; diff --git a/assets/ViewTypeFactory.html-BlJgDBiK.js b/assets/ViewTypeFactory.html-BlJgDBiK.js new file mode 100644 index 0000000..f69623e --- /dev/null +++ b/assets/ViewTypeFactory.html-BlJgDBiK.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-be0e3220","path":"/en/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html","title":"ViewTypeFactory - kt","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.md"}');export{e as data}; diff --git a/assets/ViewTypeFactory.html-a4OWMkml.js b/assets/ViewTypeFactory.html-a4OWMkml.js new file mode 100644 index 0000000..1623374 --- /dev/null +++ b/assets/ViewTypeFactory.html-a4OWMkml.js @@ -0,0 +1 @@ +import{_ as a,r as n,o as r,c,b as t,d as e,e as s,a as i}from"./app-Un_zyw_U.js";const l={},p=i('

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

ViewTypeFactory - kt

Change Records

v1.0.0 first

Function Illustrate

这是一个预置反射类型的常量类,主要为 Android 相关 WidgetClass 内容,跟随版本更新会逐一进行增加。

',6),d={href:"https://github.com/HighCapable/YukiReflection/blob/master/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"};function h(u,f){const o=n("ExternalLinkIcon");return r(),c("div",null,[p,t("p",null,[e("详情可 "),t("a",d,[e("点击这里"),s(o)]),e(" 进行查看。")])])}const m=a(l,[["render",h],["__file","ViewTypeFactory.html.vue"]]);export{m as default}; diff --git a/assets/ViewTypeFactory.html-tP76iwqq.js b/assets/ViewTypeFactory.html-tP76iwqq.js new file mode 100644 index 0000000..724d52c --- /dev/null +++ b/assets/ViewTypeFactory.html-tP76iwqq.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-12826b1f","path":"/zh-cn/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html","title":"ViewTypeFactory - kt","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.md"}');export{e as data}; diff --git a/assets/YLog.html-BiSru-dl.js b/assets/YLog.html-BiSru-dl.js new file mode 100644 index 0000000..55e0e34 --- /dev/null +++ b/assets/YLog.html-BiSru-dl.js @@ -0,0 +1,5 @@ +import{_ as e,o as s,c as o,a}from"./app-Un_zyw_U.js";const n={},t=a(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

YLog - object

object YLog
+

Change Records

v1.0.3 added

Function Illustrate

全局 Log 管理类。

Configs - object

object Configs
+

Change Records

v1.0.3 added

Function Illustrate

配置 YLog

tag - field

var tag: String
+

Change Records

v1.0.3 added

Function Illustrate

这是一个调试日志的全局标识。

默认文案为 YukiReflection

你可以修改为你自己的文案。

isEnable - field

var isEnable: Boolean
+

Change Records

v1.0.3 added

Function Illustrate

是否启用调试日志的输出功能。

关闭后将会停用 YukiReflection 对全部日志的输出。

isEnable 关闭后 YukiReflection.Configs.isDebug 也将同时关闭。

`,29),c=[t];function l(d,p){return s(),o("div",null,c)}const r=e(n,[["render",l],["__file","YLog.html.vue"]]);export{r as default}; diff --git a/assets/YLog.html-HMp0r_nP.js b/assets/YLog.html-HMp0r_nP.js new file mode 100644 index 0000000..771965c --- /dev/null +++ b/assets/YLog.html-HMp0r_nP.js @@ -0,0 +1,5 @@ +import{_ as e,o as s,c as o,a}from"./app-Un_zyw_U.js";const n={},c=a(`

YLog - object

object YLog
+

变更记录

v1.0.3 新增

功能描述

全局 Log 管理类。

Configs - object

object Configs
+

变更记录

v1.0.3 新增

功能描述

配置 YLog

tag - field

var tag: String
+

变更记录

v1.0.3 新增

功能描述

这是一个调试日志的全局标识。

默认文案为 YukiReflection

你可以修改为你自己的文案。

isEnable - field

var isEnable: Boolean
+

变更记录

v1.0.3 新增

功能描述

是否启用调试日志的输出功能。

关闭后将会停用 YukiReflection 对全部日志的输出。

isEnable 关闭后 YukiReflection.Configs.isDebug 也将同时关闭。

`,28),l=[c];function t(p,d){return s(),o("div",null,l)}const r=e(n,[["render",t],["__file","YLog.html.vue"]]);export{r as default}; diff --git a/assets/YLog.html-OO_nxYSS.js b/assets/YLog.html-OO_nxYSS.js new file mode 100644 index 0000000..c4a2e08 --- /dev/null +++ b/assets/YLog.html-OO_nxYSS.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-736d2dff","path":"/zh-cn/api/public/com/highcapable/yukireflection/log/YLog.html","title":"YLog - object","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"Configs - object","slug":"configs-object","link":"#configs-object","children":[{"level":3,"title":"tag - field","slug":"tag-field","link":"#tag-field","children":[]},{"level":3,"title":"isEnable - field","slug":"isenable-field","link":"#isenable-field","children":[]}]}],"git":{"updatedTime":1695822096000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/log/YLog.md"}');export{e as data}; diff --git a/assets/YLog.html-tEpiJE43.js b/assets/YLog.html-tEpiJE43.js new file mode 100644 index 0000000..c3083c7 --- /dev/null +++ b/assets/YLog.html-tEpiJE43.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-0f70fc50","path":"/en/api/public/com/highcapable/yukireflection/log/YLog.html","title":"YLog - object","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"Configs - object","slug":"configs-object","link":"#configs-object","children":[{"level":3,"title":"tag - field","slug":"tag-field","link":"#tag-field","children":[]},{"level":3,"title":"isEnable - field","slug":"isenable-field","link":"#isenable-field","children":[]}]}],"git":{"updatedTime":1695822096000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/log/YLog.md"}');export{e as data}; diff --git a/assets/YukiReflection.html-9kfBlewr.js b/assets/YukiReflection.html-9kfBlewr.js new file mode 100644 index 0000000..5e99fb3 --- /dev/null +++ b/assets/YukiReflection.html-9kfBlewr.js @@ -0,0 +1,8 @@ +import{_ as e,o,c as s,a}from"./app-Un_zyw_U.js";const n={},c=a(`

Notice

The English translation of this page has not been completed, you are welcome to contribute translations to us.

You can use the Chrome Translation Plugin to translate entire pages for reference.

YukiReflection - object

object YukiReflection
+

Change Records

v1.0.0 first

Function Illustrate

这是 YukiReflection 的装载调用类。

TAG - field

const val TAG: String
+

Change Records

v1.0.3 added

Function Illustrate

获取当前 YukiReflection 的名称 (标签)。

VERSION - field

const val VERSION: String
+

Change Records

v1.0.3 added

Function Illustrate

获取当前 YukiReflection 的版本。

API_VERSION_NAME - field

Change Records

v1.0.0 first

v1.0.3 deprecated

不再区分版本名称和版本号,请迁移到 VERSION

API_VERSION_CODE - field

Change Records

v1.0.0 first

v1.0.3 deprecated

不再区分版本名称和版本号,请迁移到 VERSION

Configs - object

object Configs
+

Change Records

v1.0.0 first

Function Illustrate

对 API 相关功能的配置类。

debugLog - method

inline fun debugLog(initiate: YLog.Configs.() -> Unit)
+

Change Records

v1.0.3 added

Function Illustrate

配置 YLog.Configs 相关参数。

debugTag - field

Change Records

v1.0.0 first

v1.0.3 deprecated

请迁移到 debugLog

isDebug - field

var isDebug: Boolean
+

Change Records

v1.0.0 first

Function Illustrate

是否启用 Debug 模式。

默认不启用,启用后将交由日志输出管理器打印详细日志 (例如反射查找功能的耗时) 到控制台。

isAllowPrintingLogs - field

Change Records

v1.0.0 first

v1.0.3 deprecated

请迁移到 debugLog

isEnableMemberCache - field

Change Records

v1.0.0 first

v1.0.2 deprecated

Member 的直接缓存功能已被移除,因为其存在内存溢出 (OOM) 问题

configs - method

inline fun configs(initiate: Configs.() -> Unit)
+

Change Records

v1.0.0 first

Function Illustrate

Configs 类实现了一个 lambda 方法体。

你可以轻松地调用它进行配置。

`,70),t=[c];function d(p,l){return o(),s("div",null,t)}const i=e(n,[["render",d],["__file","YukiReflection.html.vue"]]);export{i as default}; diff --git a/assets/YukiReflection.html-N0eAU_3r.js b/assets/YukiReflection.html-N0eAU_3r.js new file mode 100644 index 0000000..a706ceb --- /dev/null +++ b/assets/YukiReflection.html-N0eAU_3r.js @@ -0,0 +1,8 @@ +import{_ as e,o,c as s,a}from"./app-Un_zyw_U.js";const n={},c=a(`

YukiReflection - object

object YukiReflection
+

变更记录

v1.0.0 添加

功能描述

这是 YukiReflection 的装载调用类。

TAG - field

const val TAG: String
+

变更记录

v1.0.3 新增

功能描述

获取当前 YukiReflection 的名称 (标签)。

VERSION - field

const val VERSION: String
+

变更记录

v1.0.3 新增

功能描述

获取当前 YukiReflection 的版本。

API_VERSION_NAME - field

变更记录

v1.0.0 添加

v1.0.3 作废

不再区分版本名称和版本号,请迁移到 VERSION

API_VERSION_CODE - field

变更记录

v1.0.0 添加

v1.0.3 作废

不再区分版本名称和版本号,请迁移到 VERSION

Configs - object

object Configs
+

变更记录

v1.0.0 添加

功能描述

对 API 相关功能的配置类。

debugLog - method

inline fun debugLog(initiate: YLog.Configs.() -> Unit)
+

变更记录

v1.0.3 新增

功能描述

配置 YLog.Configs 相关参数。

debugTag - field

变更记录

v1.0.0 添加

v1.0.3 作废

请迁移到 debugLog

isDebug - field

var isDebug: Boolean
+

变更记录

v1.0.0 添加

功能描述

是否启用 Debug 模式。

默认不启用,启用后将交由日志输出管理器打印详细日志 (例如反射查找功能的耗时) 到控制台。

isAllowPrintingLogs - field

变更记录

v1.0.0 添加

v1.0.3 作废

请迁移到 debugLog

isEnableMemberCache - field

变更记录

v1.0.0 添加

v1.0.2 作废

Member 的直接缓存功能已被移除,因为其存在内存溢出 (OOM) 问题

configs - method

inline fun configs(initiate: Configs.() -> Unit)
+

变更记录

v1.0.0 添加

功能描述

Configs 类实现了一个 lambda 方法体。

你可以轻松地调用它进行配置。

`,69),p=[c];function d(l,t){return o(),s("div",null,p)}const i=e(n,[["render",d],["__file","YukiReflection.html.vue"]]);export{i as default}; diff --git a/assets/YukiReflection.html-d5WSFYcp.js b/assets/YukiReflection.html-d5WSFYcp.js new file mode 100644 index 0000000..9f8ac34 --- /dev/null +++ b/assets/YukiReflection.html-d5WSFYcp.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c088ede0","path":"/zh-cn/api/public/com/highcapable/yukireflection/YukiReflection.html","title":"YukiReflection - object","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"TAG - field","slug":"tag-field","link":"#tag-field","children":[]},{"level":2,"title":"VERSION - field","slug":"version-field","link":"#version-field","children":[]},{"level":2,"title":"Configs - object","slug":"configs-object","link":"#configs-object","children":[{"level":3,"title":"debugLog - method","slug":"debuglog-method","link":"#debuglog-method","children":[]},{"level":3,"title":"isDebug - field","slug":"isdebug-field","link":"#isdebug-field","children":[]}]},{"level":2,"title":"configs - method","slug":"configs-method","link":"#configs-method","children":[]}],"git":{"updatedTime":1695822096000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":7}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukireflection/YukiReflection.md"}');export{e as data}; diff --git a/assets/YukiReflection.html-wyZOo9RJ.js b/assets/YukiReflection.html-wyZOo9RJ.js new file mode 100644 index 0000000..6a87be7 --- /dev/null +++ b/assets/YukiReflection.html-wyZOo9RJ.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-23f4d2be","path":"/en/api/public/com/highcapable/yukireflection/YukiReflection.html","title":"YukiReflection - object","lang":"en-US","frontmatter":{"pageClass":"code-page"},"headers":[{"level":2,"title":"TAG - field","slug":"tag-field","link":"#tag-field","children":[]},{"level":2,"title":"VERSION - field","slug":"version-field","link":"#version-field","children":[]},{"level":2,"title":"Configs - object","slug":"configs-object","link":"#configs-object","children":[{"level":3,"title":"debugLog - method","slug":"debuglog-method","link":"#debuglog-method","children":[]},{"level":3,"title":"isDebug - field","slug":"isdebug-field","link":"#isdebug-field","children":[]}]},{"level":2,"title":"configs - method","slug":"configs-method","link":"#configs-method","children":[]}],"git":{"updatedTime":1695822096000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":8}]},"filePathRelative":"en/api/public/com/highcapable/yukireflection/YukiReflection.md"}');export{e as data}; diff --git a/assets/about.html--vPvG7gm.js b/assets/about.html--vPvG7gm.js new file mode 100644 index 0000000..824340f --- /dev/null +++ b/assets/about.html--vPvG7gm.js @@ -0,0 +1,16 @@ +import{_ as o,r as c,o as l,c as t,b as a,d as e,e as n,a as p}from"./app-Un_zyw_U.js";const r={},i=a("h1",{id:"关于此文档",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#关于此文档","aria-hidden":"true"},"#"),e(" 关于此文档")],-1),d={href:"https://v2.vuepress.vuejs.org/zh",target:"_blank",rel:"noopener noreferrer"},h=a("h2",{id:"许可证",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#许可证","aria-hidden":"true"},"#"),e(" 许可证")],-1),b={href:"https://github.com/HighCapable/YukiReflection/blob/master/LICENSE",target:"_blank",rel:"noopener noreferrer"},u=p(`
Apache License Version 2.0
+
+Copyright (C) 2019 HighCapable
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+

版权所有 © 2019 HighCapable

`,2);function _(y,f){const s=c("ExternalLinkIcon");return l(),t("div",null,[i,a("blockquote",null,[a("p",null,[e("此文档由 "),a("a",d,[e("VuePress"),n(s)]),e(" 强力驱动。")])]),h,a("p",null,[a("a",b,[e("Apache-2.0"),n(s)])]),u])}const m=o(r,[["render",_],["__file","about.html.vue"]]);export{m as default}; diff --git a/assets/about.html-a0D_ZdrJ.js b/assets/about.html-a0D_ZdrJ.js new file mode 100644 index 0000000..889ec0f --- /dev/null +++ b/assets/about.html-a0D_ZdrJ.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-41967128","path":"/zh-cn/about/about.html","title":"关于此文档","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"许可证","slug":"许可证","link":"#许可证","children":[]}],"git":{"updatedTime":1738723045000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"zh-cn/about/about.md"}');export{t as data}; diff --git a/assets/about.html-esShpFQo.js b/assets/about.html-esShpFQo.js new file mode 100644 index 0000000..f585c96 --- /dev/null +++ b/assets/about.html-esShpFQo.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-7a15fe3b","path":"/en/about/about.html","title":"About This Document","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"License","slug":"license","link":"#license","children":[]}],"git":{"updatedTime":1738723045000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"en/about/about.md"}');export{e as data}; diff --git a/assets/about.html-nADqWWz2.js b/assets/about.html-nADqWWz2.js new file mode 100644 index 0000000..864c603 --- /dev/null +++ b/assets/about.html-nADqWWz2.js @@ -0,0 +1,16 @@ +import{_ as o,r as t,o as c,c as l,b as e,d as a,e as n,a as p}from"./app-Un_zyw_U.js";const i={},r=e("h1",{id:"about-this-document",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#about-this-document","aria-hidden":"true"},"#"),a(" About This Document")],-1),d={href:"https://v2.vuepress.vuejs.org/en",target:"_blank",rel:"noopener noreferrer"},h=e("h2",{id:"license",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#license","aria-hidden":"true"},"#"),a(" License")],-1),b={href:"https://github.com/HighCapable/YukiReflection/blob/master/LICENSE",target:"_blank",rel:"noopener noreferrer"},u=p(`
Apache License Version 2.0
+
+Copyright (C) 2019 HighCapable
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+

Copyright © 2019 HighCapable

`,2);function _(y,m){const s=t("ExternalLinkIcon");return c(),l("div",null,[r,e("blockquote",null,[e("p",null,[a("This document is powered by "),e("a",d,[a("VuePress"),n(s)]),a(".")])]),h,e("p",null,[e("a",b,[a("Apache-2.0"),n(s)])]),u])}const f=o(i,[["render",_],["__file","about.html.vue"]]);export{f as default}; diff --git a/assets/api-example.html-4yu62_kW.js b/assets/api-example.html-4yu62_kW.js new file mode 100644 index 0000000..5e81cd2 --- /dev/null +++ b/assets/api-example.html-4yu62_kW.js @@ -0,0 +1,34 @@ +import{_ as s,o as n,c as a,a as e}from"./app-Un_zyw_U.js";const l={},i=e(`

API 基本配置

这里介绍了 YukiReflection 的基本配置方法。

YukiReflection 无需一些复杂的配置即可直接开始使用,且不会与 Java 原生的反射 API 冲突。

你可以在使用之前对 YukiReflection 进行一些功能配置。

获取 API 标签 & 版本

你可以通过如下方式获取当前 YukiReflection 的标签和版本。

示例如下

// 获取标签
+val tag = YukiReflection.TAG
+// 获取版本
+val version = YukiReflection.VERSION
+

你可以通过获取版本进行一些不同版本差异的判断或用于显示在关于信息中。

小提示

更多功能请参考 YukiReflection

配置 API 相关功能

你可以通过 YukiReflection.configs { ... } 方法或 YukiReflection.Configs 来配置相关功能。

自定义调试日志标签

你可以使用如下方式来自定义调试日志的标签。

API 内部的日志将会使用此标签进行打印。

示例如下

// 通过 configs 方法
+YukiReflection.configs {
+    debugLog {
+        tag = "YourCustomTag"
+    }
+}
+// 直接设置
+YLog.Configs.tag = "YourCustomTag"
+

启用或禁用 Debug 模式

你可以使用如下方式来启用或禁用 Debug 模式。

Debug 模式默认是关闭的,启用后将会打印详细日志 (例如反射查找功能的耗时) 到控制台。

示例如下

// 通过 configs 方法
+YukiReflection.configs {
+    isDebug = true
+}
+// 直接设置
+YukiReflection.Configs.isDebug = true
+

启用或禁用调试日志的输出功能

你可以使用如下方式来启用或禁用调试日志的输出功能。

此功能默认启用,关闭后将会停用 YukiReflection 对全部日志的输出。

示例如下

// 通过 configs 方法
+YukiReflection.configs {
+    debugLog {
+        isEnable = true
+    }
+}
+// 直接设置
+YLog.Configs.isEnable = true
+

使用 configs 方法配置

为了一次性配置多个功能,你可以直接使用 YukiReflection.configs { ... } 方法进行配置。

示例如下

YukiReflection.configs {
+    debugLog {
+        tag = "YourCustomTag"
+        isEnable = true
+    }
+    isDebug = true
+}
+

小提示

更多功能请参考 YukiReflection.configs 方法、YukiReflection.Configs

`,32),o=[i];function p(c,r){return n(),a("div",null,o)}const d=s(l,[["render",p],["__file","api-example.html.vue"]]);export{d as default}; diff --git a/assets/api-example.html-9cblKm8X.js b/assets/api-example.html-9cblKm8X.js new file mode 100644 index 0000000..63251ae --- /dev/null +++ b/assets/api-example.html-9cblKm8X.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c6114c9e","path":"/zh-cn/config/api-example.html","title":"API 基本配置","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"获取 API 标签 & 版本","slug":"获取-api-标签-版本","link":"#获取-api-标签-版本","children":[]},{"level":2,"title":"配置 API 相关功能","slug":"配置-api-相关功能","link":"#配置-api-相关功能","children":[{"level":3,"title":"自定义调试日志标签","slug":"自定义调试日志标签","link":"#自定义调试日志标签","children":[]},{"level":3,"title":"启用或禁用 Debug 模式","slug":"启用或禁用-debug-模式","link":"#启用或禁用-debug-模式","children":[]},{"level":3,"title":"启用或禁用调试日志的输出功能","slug":"启用或禁用调试日志的输出功能","link":"#启用或禁用调试日志的输出功能","children":[]},{"level":3,"title":"使用 configs 方法配置","slug":"使用-configs-方法配置","link":"#使用-configs-方法配置","children":[]}]}],"git":{"updatedTime":1695822725000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"zh-cn/config/api-example.md"}');export{e as data}; diff --git a/assets/api-example.html-VAmv0BWX.js b/assets/api-example.html-VAmv0BWX.js new file mode 100644 index 0000000..3926de5 --- /dev/null +++ b/assets/api-example.html-VAmv0BWX.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-9cfea7fc","path":"/en/config/api-example.html","title":"API Basic Configs","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Get the API Tag & Version","slug":"get-the-api-tag-version","link":"#get-the-api-tag-version","children":[]},{"level":2,"title":"Configure API Related Functions","slug":"configure-api-related-functions","link":"#configure-api-related-functions","children":[{"level":3,"title":"Custom Debug Log Tag","slug":"custom-debug-log-tag","link":"#custom-debug-log-tag","children":[]},{"level":3,"title":"Enable or Disable Debug Mode","slug":"enable-or-disable-debug-mode","link":"#enable-or-disable-debug-mode","children":[]},{"level":3,"title":"Enable or Disable Debug Logs","slug":"enable-or-disable-debug-logs","link":"#enable-or-disable-debug-logs","children":[]},{"level":3,"title":"Use the configs Method to Configure","slug":"use-the-configs-method-to-configure","link":"#use-the-configs-method-to-configure","children":[]}]}],"git":{"updatedTime":1695822725000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"en/config/api-example.md"}');export{e as data}; diff --git a/assets/api-example.html-X3fvd5da.js b/assets/api-example.html-X3fvd5da.js new file mode 100644 index 0000000..19623dd --- /dev/null +++ b/assets/api-example.html-X3fvd5da.js @@ -0,0 +1,34 @@ +import{_ as s,o as e,c as n,a}from"./app-Un_zyw_U.js";const l={},o=a(`

API Basic Configs

The basic configuration method of YukiReflection is introduced here.

YukiReflection can be used directly without some complex configuration, and does not conflict with Java's native Reflection API.

You can configure some functions of YukiReflection before using it.

Get the API Tag & Version

You can get the current tag and version of YukiReflection as follows.

The following example

// Get the tag
+val tag = YukiReflection.TAG
+// Get the version
+val version = YukiReflection.VERSION
+

You can judge the difference between different versions or display it in the about information by obtaining the version.

Tips

For more functions, please refer to YukiReflection.

You can configure related functions through YukiReflection.configs { ... } method or YukiReflection.Configs.

Custom Debug Log Tag

You can use the following methods to customize the tag of the debug log.

Logs inside the API will be printed using this tag.

The following example

// Via the configs method
+YukiReflection.configs {
+    debugLog {
+        tag = "YourCustomTag"
+    }
+}
+// Set directly
+YLog.Configs.tag = "YourCustomTag"
+

Enable or Disable Debug Mode

You can use the following methods to enable or disable Debug mode.

The Debug mode is disabled by default, and when enabled, detailed logs (such as the time spent on the reflective search function) will be printed to the console.

The following example

// Via the configs method
+YukiReflection.configs {
+    isDebug = true
+}
+// Set directly
+YukiReflection.Configs.isDebug = true
+

Enable or Disable Debug Logs

You can use the following methods to enable or disable debug logs.

This function is enabled by default, and disable will stop YukiReflection output all logs.

The following example

// Via the configs method
+YukiReflection.configs {
+    debugLog {
+        isEnable = true
+    }
+}
+// Set directly
+YLog.Configs.isEnable = true
+

Use the configs Method to Configure

In order to configure multiple features at once, you can directly use the YukiReflection.configs { ... } method to configure.

The following example

YukiReflection.configs {
+    debugLog {
+        tag = "YourCustomTag"
+        isEnable = true
+    }
+    isDebug = true
+}
+

Tips

For more functions, please refer to YukiReflection.configs method, YukiReflection.Configs.

`,32),i=[o];function c(t,p){return e(),n("div",null,i)}const d=s(l,[["render",c],["__file","api-example.html.vue"]]);export{d as default}; diff --git a/assets/api-exception.html-AQNocG1O.js b/assets/api-exception.html-AQNocG1O.js new file mode 100644 index 0000000..c0b5cd4 --- /dev/null +++ b/assets/api-exception.html-AQNocG1O.js @@ -0,0 +1,83 @@ +import{_ as s,o as n,c as a,a as e}from"./app-Un_zyw_U.js";const l={},o=e(`

API 异常处理

异常是在开发过程经常遇到的主要问题,这里介绍了 YukiReflection 在使用过程中可能遇到的常见异常以及处理方式。

这里的异常说明只会同步最新的 API 版本,较旧的 API 版本的异常将不会再进行说明,请始终保持 API 版本为最新。

非阻断异常

这些异常不会导致 APP 停止运行 (FC),但是会在控制台打印 E 级别的日志,也可能会停止继续执行相关功能。

exception

loggerE

Method/Constructor/Field match type "TYPE" not allowed

异常原因

在查找方法、构造方法以及变量时设置了不允许的参数类型。

示例如下

// 查找一个方法
+method {
+    // 设置了无效的类型举例
+    param(false, 1, 0)
+    // 设置了无效的类型举例
+    returnType = false
+}
+
+// 查找一个变量
+field {
+    // 设置了无效的类型举例
+    type = false
+}
+

解决方案

在查找中 paramreturnTypetype 中仅接受 ClassStringVariousClass 类型的传值,不可传入参数实例。

示例如下

// 查找一个方法
+method {
+    // ✅ 正确的使用方法举例
+    param(BooleanType, IntType, IntType)
+    // ✅ 正确的使用方法举例
+    returnType = BooleanType
+    // ✅ 以下方案也是正确的
+    returnType = "java.lang.Boolean"
+}
+
+// 查找一个变量
+field {
+    // ✅ 正确的使用方法举例
+    type = BooleanType
+}
+
exception

loggerE

NoSuchMethod/NoSuchConstructor/NoSuchField happend in [NAME]

异常原因

在查找方法、构造方法以及变量时并未找到目标方法、构造方法以及变量。

解决方案

请确认你的查找条件是否能正确匹配到目标 Class 中的指定方法、构造方法以及变量。

exception

loggerE

Trying COUNT times and all failure by RemedyPlan

异常原因

使用 RemedyPlan 重新查找方法、构造方法、变量时依然没有找到方法、构造方法、变量。

解决方案

请确认你设置的 RemedyPlan 参数以及当前 APP 内存在的 Class,再试一次。

exception

loggerE

Can't find this Class in [CLASSLOADER]: CONTENT Generated by YukiReflection#ReflectionTool

异常原因

通过 ClassLoader.searchClass 找不到需要查找的 Class 对象。

示例如下

customClassLoader?.searchClass {
+    from(...)
+    // ...
+}.get()
+

解决方案

这是一个安全异常,请检查你设置的条件,使用相关工具查看所在 Dex 中的 Class 以及字节码对象特征,并再试一次。

exception

loggerE

Can't find this Method/Constructor/Field in [CLASS]: CONTENT Generated by YukiReflection#ReflectionTool

异常原因

通过指定条件找不到需要查找的方法、构造方法以及变量。

示例如下

TargetClass.method {
+    name = "test"
+    param(BooleanType)
+}
+

解决方案

这是一个安全异常,请检查你设置的条件,使用相关工具查看所在 Class 中的字节码对象特征,并再试一次。

exception

loggerE

The number of VagueType must be at least less than the count of paramTypes

异常原因

MethodConstructor 查找条件中错误地使用了 VagueType

示例如下

TargetClass.method {
+    name = "test"
+    // <情景1>
+    param(VagueType)
+    // <情景2>
+    param(VagueType, VagueType ...)
+}
+

解决方案

VagueType 不能在方法、构造方法参数中完全填充,若存在这样的需求请使用 paramCount

exception

loggerE

Field match type class is not found

异常原因

在查找变量时所设置的查找条件中 typeClass 实例未被找到。

示例如下

field {
+    name = "test"
+    // 假设这里设置的 type 的 Class 并不存在
+    type = "com.example.TestClass"
+}
+

解决方案

请检查查找条件中 typeClass 是否存在,然后再试一次。

exception

loggerE

Method match returnType class is not found

异常原因

在查找方法时所设置的查找条件中 returnTypeClass 实例未被找到。

示例如下

method {
+    name = "test"
+    // 假设这里设置的 returnType 的 Class 并不存在
+    returnType = "com.example.TestClass"
+}
+

解决方案

请检查查找条件中 returnTypeClass 是否存在,然后再试一次。

exception

loggerE

Method/Constructor match paramType[INDEX] class is not found

异常原因

在查找方法、构造方法时所设置的查找条件中 paramindex 号下标的 Class 实例未被找到。

method {
+    name = "test"
+    // 假设这里设置的 1 号下标的 Class 并不存在
+    param(StringClass, "com.example.TestClass", BooleanType)
+}
+

解决方案

请检查查找条件中 paramindex 号下标的 Class 是否存在,然后再试一次。

阻断异常

这些异常会直接导致 APP 停止运行 (FC),同时会在控制台打印 E 级别的日志。

exception

NoClassDefFoundError

Can't find this Class in [CLASSLOADER]: CONTENT Generated by YukiReflection#ReflectionTool

异常原因

通过 String.toClass(...)classOf<...>() 找不到需要查找的 Class 对象。

示例如下

"com.demo.Test".toClass()
+

解决方案

请检查当前字符串或实体匹配到的 Class 是否存在于当前 ClassLoader,并再试一次。

exception

IllegalStateException

ClassLoader [CLASSLOADER] is not a DexClassLoader

异常原因

使用 ClassLoader.searchClass 查找 Class 但是当前 ClassLoader 并不继承于 BaseDexClassLoader

解决方案

这种情况基本不存在,除非当前 APP 引用了非 ART 平台的可执行文件 (但是这种情况还是不会存在) 或当前 ClassLoader 为空。

exception

IllegalStateException

VariousClass match failed of those CLASSES

异常原因

在使用 VariousClass 创建不确定的 Class 对象时全部的 Class 都没有被找到。

解决方案

检查当前 APP 内是否存在其中能够匹配的 Class 后,再试一次。

exception

IllegalStateException

paramTypes is empty, please use emptyParam() instead

异常原因

在查找方法、构造方法时保留了空的 param 方法。

示例如下

method {
+    name = "test"
+    // 括号内没有填写任何参数
+    param()
+}
+

解决方案

若要标识此方法、构造方法没有参数,你可以有如下设置方法。

第一种,设置 emptyParam (推荐)

示例如下

method {
+    name = "test"
+    emptyParam()
+}
+

第二种,设置 paramCount = 0

示例如下

method {
+    name = "test"
+    paramCount = 0
+}
+
exception

IllegalStateException

Cannot create classes cache for "android", please remove "name" param

异常原因

在系统框架 (android) 中使用了 DexClassFinder 的缓存功能 searchClass(name = ...)

示例如下

searchClass(name = "test") {
+    from(...)
+    // ...
+}.get()
+

解决方案

由于缓存会将找到的 Class 名称存入 SharedPreferences,但是系统框架不存在 data 目录,所以请不要在系统框架中使用此功能。

exception

IllegalStateException

Target Class type cannot cast to TYPE

异常原因

使用 Class.toClassClass.toClassOrNullGenericClass.argument 方法将字符串类名转换为目标 Class 时声明了错误的类型。

以下使用 Class.toClass 方法来进行示例。

示例如下

// 假设目标类型是 Activity 但是被错误地转换为了 WrongClass 类型
+val clazz = "android.app.Activity".toClass<WrongClass>()
+

解决方案

示例如下

// <解决方案 1> 填写正确的类型
+val clazz1 = "android.app.Activity".toClass<Activity>()
+// <解决方案 2> 不填写泛型声明
+val clazz2 = "android.app.Activity".toClass()
+

请确保执行方法后声明的泛型是指定的目标 Class 类型,在不确定目标类型的情况下你可以不需要填写泛型声明。

`,129),p=[o];function c(t,i){return n(),a("div",null,p)}const d=s(l,[["render",c],["__file","api-exception.html.vue"]]);export{d as default}; diff --git a/assets/api-exception.html-PveSaoT0.js b/assets/api-exception.html-PveSaoT0.js new file mode 100644 index 0000000..9f8a19a --- /dev/null +++ b/assets/api-exception.html-PveSaoT0.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-72c12b7d","path":"/en/config/api-exception.html","title":"API Exception Handling","lang":"en-US","frontmatter":{"pageClass":"hidden-anchor-page"},"headers":[{"level":2,"title":"Non-Blocking Exceptions","slug":"non-blocking-exceptions","link":"#non-blocking-exceptions","children":[]},{"level":2,"title":"Blocking Exceptions","slug":"blocking-exceptions","link":"#blocking-exceptions","children":[]}],"git":{"updatedTime":1696346535000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"en/config/api-exception.md"}');export{e as data}; diff --git a/assets/api-exception.html-jnFpFUq0.js b/assets/api-exception.html-jnFpFUq0.js new file mode 100644 index 0000000..f4f2655 --- /dev/null +++ b/assets/api-exception.html-jnFpFUq0.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-5b43296c","path":"/zh-cn/config/api-exception.html","title":"API 异常处理","lang":"zh-CN","frontmatter":{"pageClass":"hidden-anchor-page"},"headers":[{"level":2,"title":"非阻断异常","slug":"非阻断异常","link":"#非阻断异常","children":[]},{"level":2,"title":"阻断异常","slug":"阻断异常","link":"#阻断异常","children":[]}],"git":{"updatedTime":1696346535000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"zh-cn/config/api-exception.md"}');export{e as data}; diff --git a/assets/api-exception.html-ngpL7qd8.js b/assets/api-exception.html-ngpL7qd8.js new file mode 100644 index 0000000..343ea25 --- /dev/null +++ b/assets/api-exception.html-ngpL7qd8.js @@ -0,0 +1,83 @@ +import{_ as s,o as e,c as n,a}from"./app-Un_zyw_U.js";const o={},l=a(`

API Exception Handling

Exceptions are the main problems often encountered in the development process. Here are some common exceptions that may be encountered during the use of YukiReflection and how to deal with them.

The exception description here will only synchronize the latest API version, and the exception of the older API version will not be described again, please always keep the API version up-to-date.

Non-Blocking Exceptions

These exceptions will not cause the app to stop running (FC), but will print E level logs on the console, and may also stop continuing to execute related functions.

exception

loggerE

Method/Constructor/Field match type "TYPE" not allowed

Abnormal

A disallowed parameter type was set when looking up methods, constructors, and variables.

The following example

// Find a method
+method {
+    //  Invalid type example is set
+    param(false, 1, 0)
+    //  Invalid type example is set
+    returnType = false
+}
+
+// Find a variable
+field {
+    //  Invalid type example is set
+    type = false
+}
+

Solution

In the search, param, returnType, type only accept Class, String, VariousClass types, and parameter instances cannot be passed in.

The following example

// Find a method
+method {
+    // ✅ Examples of correct usage
+    param(BooleanType, IntType, IntType)
+    // ✅ Examples of correct usage
+    returnType = BooleanType
+    // ✅ The following scheme is also correct
+    returnType = "java.lang.Boolean"
+}
+
+// Find a variable
+field {
+    // ✅ Examples of correct usage
+    type = BooleanType
+}
+
exception

loggerE

NoSuchMethod/NoSuchConstructor/NoSuchField happend in [NAME]

Abnormal

The target method, constructor, and variable were not found when looking for methods, constructors, and variables.

Solution

Please confirm that your search criteria can correctly match the specified methods, constructors and variables in the target Class.

exception

loggerE

Trying COUNT times and all failure by RemedyPlan

Abnormal

When using RemedyPlan to search for methods, constructors, and variables, the methods, constructors, and variables are still not found.

Solution

Please confirm the RemedyPlan parameter you set and the Class that exists in the current app, and try again.

exception

loggerE

Can't find this Class in [CLASSLOADER]: CONTENT Generated by YukiReflection#ReflectionTool

Abnormal

The Class object to be searched for was not found via ClassLoader.searchClass.

The following example

customClassLoader?.searchClass {
+    from(...)
+    // ...
+}.get()
+

Solution

This is a security exception, please check the conditions you set, use the relevant tools to view the Class and bytecode object characteristics in the Dex and try again.

exception

loggerE

Can't find this Method/Constructor/Field in [CLASS]: CONTENT Generated by YukiReflection#ReflectionTool

Abnormal

The methods, constructors, and variables that need to be found cannot be found by specifying conditions.

The following example

TargetClass.method {
+    name = "test"
+    param(BooleanType)
+}
+

Solution

This is a security exception, please check the conditions you set, use the relevant tools to view the bytecode object characteristics in the Class, and try again.

exception

loggerE

The number of VagueType must be at least less than the count of paramTypes

Abnormal

Incorrect use of VagueType in Method, Constructor lookup conditions.

The following example

TargetClass.method {
+    name = "test"
+    // <Scenario 1>
+    param(VagueType)
+    // <Scenario 2>
+    param(VagueType, VagueType ...)
+}
+

Solution

VagueType cannot be completely filled in method and constructor parameters. If there is such a requirement, please use paramCount.

exception

loggerE

Field match type class is not found

Abnormal

An instance of Class for type was not found in the lookup criteria set when looking up the variable.

The following example

field {
+    name = "test"
+    // Assume that the Class of the type set here does not exist
+    type = "com.example.TestClass"
+}
+

Solution

Please check if Class of type in the lookup condition exists and try again.

exception

loggerE

Method match returnType class is not found

Abnormal

An instance of Class of returnType was not found in the search criteria set when looking up the method.

The following example

method {
+    name = "test"
+    // Assume that the Class of returnType set here does not exist
+    returnType = "com.example.TestClass"
+}
+

Solution

Please check if Class of returnType in the lookup condition exists and try again.

exception

loggerE

Method/Constructor match paramType[INDEX] class is not found

Abnormal

The Class instance subscripted by the index number of param was not found in the search conditions set when searching for methods and constructors.

method {
+    name = "test"
+    // Assume that the Class with subscript "No.1" set here does not exist
+    param(StringClass, "com.example.TestClass", BooleanType)
+}
+

Solution

Please check if the Class subscripted by the index number of param in the lookup condition exists and try again.

Blocking Exceptions

These exceptions will directly cause the app to stop running (FC), at the same time print E level logs on the console.

exception

NoClassDefFoundError

Can't find this Class in [CLASSLOADER]: CONTENT Generated by YukiReflection#ReflectionTool

Abnormal

The Class object you were looking for was not found via String.toClass(...) or classOf<...>().

The following example

"com.demo.Test".toClass()
+

Solution

Please check if the Class matched by the current string or entity exists in the current ClassLoader and try again.

exception

IllegalStateException

ClassLoader [CLASSLOADER] is not a DexClassLoader

Abnormal

Use ClassLoader.searchClass to find Class but currently ClassLoader does not extends BaseDexClassLoader.

Solution

This situation basically does not exist, unless the current app references a Non-ART platform executable (which not realistic) or the current ClassLoader is null.

exception

IllegalStateException

VariousClass match failed of those CLASSES

Abnormal

All Class were not found when creating indeterminate Class objects using VariousClass.

Solution

After checking whether there is a matching Class in the current app and try again.

exception

IllegalStateException

paramTypes is empty, please use emptyParam() instead

Abnormal

The empty param method is preserved when looking up methods, constructors.

The following example

method {
+    name = "test"
+    // No parameters are filled in parentheses
+    param()
+}
+

Solution

To identify this method, the constructor has no parameters, you can have a setter method as follows.

The first way, set emptyParam (recommended)

The following example

method {
+    name = "test"
+    emptyParam()
+}
+

The second way, set paramCount = 0

The following example

method {
+    name = "test"
+    paramCount = 0
+}
+
exception

IllegalStateException

Cannot create classes cache for "android", please remove "name" param

Abnormal

The DexClassFinder cache function searchClass(name = ...) is used in the System Framework ("android") app.

The following example

searchClass(name = "test") {
+    from(...)
+    // ...
+}.get()
+

Solution

Since the cache will store the found Class name in SharedPreferences, but the data directory does not exist in the System Framework, so please do not use this function in the System Framework.

exception

IllegalStateException

Target Class type cannot cast to TYPE

Abnormal

Wrong type declared when converting string class name to target Class using Class.toClass, Class.toClassOrNull, GenericClass.argument methods.

The following uses the Class.toClass method as an example.

The following example

// Assume the target type is Activity but it was wrongly cast to WrongClass type
+val clazz = "android.app.Activity".toClass<WrongClass>()
+

Solution

The following example

// <Solution 1> Fill in the correct type
+val clazz1 = "android.app.Activity".toClass<Activity>()
+// <Solution 2> Do not fill in the generic declaration
+val clazz2 = "android.app.Activity".toClass()
+

Please ensure that the generic type declared after executing the method is the specified target Class type, and you do not need to fill in the generic declaration if the target type is not sure.

`,129),t=[l];function p(c,i){return e(),n("div",null,t)}const d=s(o,[["render",p],["__file","api-exception.html.vue"]]);export{d as default}; diff --git a/assets/app-Un_zyw_U.js b/assets/app-Un_zyw_U.js new file mode 100644 index 0000000..3011389 --- /dev/null +++ b/assets/app-Un_zyw_U.js @@ -0,0 +1,16 @@ +function _i(e,t){const l=Object.create(null),n=e.split(",");for(let i=0;i!!l[i.toLowerCase()]:i=>!!l[i]}const Ee={},il=[],dt=()=>{},Qs=()=>!1,$l=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),bi=e=>e.startsWith("onUpdate:"),Ie=Object.assign,yi=(e,t)=>{const l=e.indexOf(t);l>-1&&e.splice(l,1)},Zs=Object.prototype.hasOwnProperty,me=(e,t)=>Zs.call(e,t),te=Array.isArray,ol=e=>Ln(e)==="[object Map]",gr=e=>Ln(e)==="[object Set]",re=e=>typeof e=="function",ge=e=>typeof e=="string",gl=e=>typeof e=="symbol",Ce=e=>e!==null&&typeof e=="object",vr=e=>(Ce(e)||re(e))&&re(e.then)&&re(e.catch),_r=Object.prototype.toString,Ln=e=>_r.call(e),Xs=e=>Ln(e).slice(8,-1),br=e=>Ln(e)==="[object Object]",ki=e=>ge(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ll=_i(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),wn=e=>{const t=Object.create(null);return l=>t[l]||(t[l]=e(l))},ea=/-(\w)/g,ht=wn(e=>e.replace(ea,(t,l)=>l?l.toUpperCase():"")),ta=/\B([A-Z])/g,Qt=wn(e=>e.replace(ta,"-$1").toLowerCase()),Tn=wn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Vn=wn(e=>e?`on${Tn(e)}`:""),Jt=(e,t)=>!Object.is(e,t),Hn=(e,t)=>{for(let l=0;l{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:l})},la=e=>{const t=parseFloat(e);return isNaN(t)?e:t},na=e=>{const t=ge(e)?Number(e):NaN;return isNaN(t)?e:t};let eo;const li=()=>eo||(eo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Vl(e){if(te(e)){const t={};for(let l=0;l{if(l){const n=l.split(oa);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ke(e){let t="";if(ge(e))t=e;else if(te(e))for(let l=0;lge(e)?e:e==null?"":te(e)||Ce(e)&&(e.toString===_r||!re(e.toString))?JSON.stringify(e,kr,2):String(e),kr=(e,t)=>t&&t.__v_isRef?kr(e,t.value):ol(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((l,[n,i],o)=>(l[jn(n,o)+" =>"]=i,l),{})}:gr(t)?{[`Set(${t.size})`]:[...t.values()].map(l=>jn(l))}:gl(t)?jn(t):Ce(t)&&!te(t)&&!br(t)?String(t):t,jn=(e,t="")=>{var l;return gl(e)?`Symbol(${(l=e.description)!=null?l:t})`:e};let Je;class ua{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Je,!t&&Je&&(this.index=(Je.scopes||(Je.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const l=Je;try{return Je=this,t()}finally{Je=l}}}on(){Je=this}off(){Je=this.parent}stop(t){if(this._active){let l,n;for(l=0,n=this.effects.length;l{const t=new Set(e);return t.w=0,t.n=0,t},Er=e=>(e.w&Ft)>0,Cr=e=>(e.n&Ft)>0,fa=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let l=0;for(let n=0;n{(u==="length"||!gl(u)&&u>=s)&&a.push(c)})}else switch(l!==void 0&&a.push(r.get(l)),t){case"add":te(e)?ki(l)&&a.push(r.get("length")):(a.push(r.get(Kt)),ol(e)&&a.push(r.get(ii)));break;case"delete":te(e)||(a.push(r.get(Kt)),ol(e)&&a.push(r.get(ii)));break;case"set":ol(e)&&a.push(r.get(Kt));break}if(a.length===1)a[0]&&oi(a[0]);else{const s=[];for(const c of a)c&&s.push(...c);oi(xi(s))}}function oi(e,t){const l=te(e)?e:[...e];for(const n of l)n.computed&&lo(n);for(const n of l)n.computed||lo(n)}function lo(e,t){(e!==nt||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function pa(e,t){var l;return(l=mn.get(e))==null?void 0:l.get(t)}const ga=_i("__proto__,__v_isRef,__isVue"),wr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(gl)),no=va();function va(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...l){const n=pe(this);for(let o=0,r=this.length;o{e[t]=function(...l){vl();const n=pe(this)[t].apply(this,l);return _l(),n}}),e}function _a(e){const t=pe(this);return Ye(t,"has",e),t.hasOwnProperty(e)}class Tr{constructor(t=!1,l=!1){this._isReadonly=t,this._shallow=l}get(t,l,n){const i=this._isReadonly,o=this._shallow;if(l==="__v_isReactive")return!i;if(l==="__v_isReadonly")return i;if(l==="__v_isShallow")return o;if(l==="__v_raw")return n===(i?o?Oa:Ir:o?Or:Pr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=te(t);if(!i){if(r&&me(no,l))return Reflect.get(no,l,n);if(l==="hasOwnProperty")return _a}const a=Reflect.get(t,l,n);return(gl(l)?wr.has(l):ga(l))||(i||Ye(t,"get",l),o)?a:Ve(a)?r&&ki(l)?a:a.value:Ce(a)?i?jl(a):Hl(a):a}}class Ar extends Tr{constructor(t=!1){super(!1,t)}set(t,l,n,i){let o=t[l];if(!this._shallow){const s=cl(o);if(!pn(n)&&!cl(n)&&(o=pe(o),n=pe(n)),!te(t)&&Ve(o)&&!Ve(n))return s?!1:(o.value=n,!0)}const r=te(t)&&ki(l)?Number(l)e,An=e=>Reflect.getPrototypeOf(e);function Jl(e,t,l=!1,n=!1){e=e.__v_raw;const i=pe(e),o=pe(t);l||(Jt(t,o)&&Ye(i,"get",t),Ye(i,"get",o));const{has:r}=An(i),a=n?Ci:l?wi:Il;if(r.call(i,t))return a(e.get(t));if(r.call(i,o))return a(e.get(o));e!==i&&e.get(t)}function Ql(e,t=!1){const l=this.__v_raw,n=pe(l),i=pe(e);return t||(Jt(e,i)&&Ye(n,"has",e),Ye(n,"has",i)),e===i?l.has(e):l.has(e)||l.has(i)}function Zl(e,t=!1){return e=e.__v_raw,!t&&Ye(pe(e),"iterate",Kt),Reflect.get(e,"size",e)}function io(e){e=pe(e);const t=pe(this);return An(t).has.call(t,e)||(t.add(e),vt(t,"add",e,e)),this}function oo(e,t){t=pe(t);const l=pe(this),{has:n,get:i}=An(l);let o=n.call(l,e);o||(e=pe(e),o=n.call(l,e));const r=i.call(l,e);return l.set(e,t),o?Jt(t,r)&&vt(l,"set",e,t):vt(l,"add",e,t),this}function ro(e){const t=pe(this),{has:l,get:n}=An(t);let i=l.call(t,e);i||(e=pe(e),i=l.call(t,e)),n&&n.call(t,e);const o=t.delete(e);return i&&vt(t,"delete",e,void 0),o}function so(){const e=pe(this),t=e.size!==0,l=e.clear();return t&&vt(e,"clear",void 0,void 0),l}function Xl(e,t){return function(n,i){const o=this,r=o.__v_raw,a=pe(r),s=t?Ci:e?wi:Il;return!e&&Ye(a,"iterate",Kt),r.forEach((c,u)=>n.call(i,s(c),s(u),o))}}function en(e,t,l){return function(...n){const i=this.__v_raw,o=pe(i),r=ol(o),a=e==="entries"||e===Symbol.iterator&&r,s=e==="keys"&&r,c=i[e](...n),u=l?Ci:t?wi:Il;return!t&&Ye(o,"iterate",s?ii:Kt),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Rt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ea(){const e={get(o){return Jl(this,o)},get size(){return Zl(this)},has:Ql,add:io,set:oo,delete:ro,clear:so,forEach:Xl(!1,!1)},t={get(o){return Jl(this,o,!1,!0)},get size(){return Zl(this)},has:Ql,add:io,set:oo,delete:ro,clear:so,forEach:Xl(!1,!0)},l={get(o){return Jl(this,o,!0)},get size(){return Zl(this,!0)},has(o){return Ql.call(this,o,!0)},add:Rt("add"),set:Rt("set"),delete:Rt("delete"),clear:Rt("clear"),forEach:Xl(!0,!1)},n={get(o){return Jl(this,o,!0,!0)},get size(){return Zl(this,!0)},has(o){return Ql.call(this,o,!0)},add:Rt("add"),set:Rt("set"),delete:Rt("delete"),clear:Rt("clear"),forEach:Xl(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=en(o,!1,!1),l[o]=en(o,!0,!1),t[o]=en(o,!1,!0),n[o]=en(o,!0,!0)}),[e,l,t,n]}const[Ca,Ra,La,wa]=Ea();function Ri(e,t){const l=t?e?wa:La:e?Ra:Ca;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(me(l,i)&&i in n?l:n,i,o)}const Ta={get:Ri(!1,!1)},Aa={get:Ri(!1,!0)},Pa={get:Ri(!0,!1)},Pr=new WeakMap,Or=new WeakMap,Ir=new WeakMap,Oa=new WeakMap;function Ia(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Sa(e){return e.__v_skip||!Object.isExtensible(e)?0:Ia(Xs(e))}function Hl(e){return cl(e)?e:Li(e,!1,ya,Ta,Pr)}function Sr(e){return Li(e,!1,xa,Aa,Or)}function jl(e){return Li(e,!0,ka,Pa,Ir)}function Li(e,t,l,n,i){if(!Ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const r=Sa(e);if(r===0)return e;const a=new Proxy(e,r===2?n:l);return i.set(e,a),a}function rl(e){return cl(e)?rl(e.__v_raw):!!(e&&e.__v_isReactive)}function cl(e){return!!(e&&e.__v_isReadonly)}function pn(e){return!!(e&&e.__v_isShallow)}function Fr(e){return rl(e)||cl(e)}function pe(e){const t=e&&e.__v_raw;return t?pe(t):e}function Dr(e){return fn(e,"__v_skip",!0),e}const Il=e=>Ce(e)?Hl(e):e,wi=e=>Ce(e)?jl(e):e;function Ti(e){It&&nt&&(e=pe(e),Lr(e.dep||(e.dep=xi())))}function Ai(e,t){e=pe(e);const l=e.dep;l&&oi(l)}function Ve(e){return!!(e&&e.__v_isRef===!0)}function _e(e){return zr(e,!1)}function Pi(e){return zr(e,!0)}function zr(e,t){return Ve(e)?e:new Fa(e,t)}class Fa{constructor(t,l){this.__v_isShallow=l,this.dep=void 0,this.__v_isRef=!0,this._rawValue=l?t:pe(t),this._value=l?t:Il(t)}get value(){return Ti(this),this._value}set value(t){const l=this.__v_isShallow||pn(t)||cl(t);t=l?t:pe(t),Jt(t,this._rawValue)&&(this._rawValue=t,this._value=l?t:Il(t),Ai(this))}}function le(e){return Ve(e)?e.value:e}const Da={get:(e,t,l)=>le(Reflect.get(e,t,l)),set:(e,t,l,n)=>{const i=e[t];return Ve(i)&&!Ve(l)?(i.value=l,!0):Reflect.set(e,t,l,n)}};function Mr(e){return rl(e)?e:new Proxy(e,Da)}class za{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:l,set:n}=t(()=>Ti(this),()=>Ai(this));this._get=l,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}function Ma(e){return new za(e)}function Pn(e){const t=te(e)?new Array(e.length):{};for(const l in e)t[l]=$a(e,l);return t}class Na{constructor(t,l,n){this._object=t,this._key=l,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return pa(pe(this._object),this._key)}}function $a(e,t,l){const n=e[t];return Ve(n)?n:new Na(e,t,l)}class Va{constructor(t,l,n,i){this._setter=l,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new Ei(t,()=>{this._dirty||(this._dirty=!0,Ai(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const t=pe(this);return Ti(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Ha(e,t,l=!1){let n,i;const o=re(e);return o?(n=e,i=dt):(n=e.get,i=e.set),new Va(n,i,o||!i,l)}function St(e,t,l,n){let i;try{i=n?e(...n):e()}catch(o){Bl(o,t,l)}return i}function et(e,t,l,n){if(re(e)){const o=St(e,t,l,n);return o&&vr(o)&&o.catch(r=>{Bl(r,t,l)}),o}const i=[];for(let o=0;o>>1,i=$e[n],o=Fl(i);out&&$e.splice(t,1)}function qa(e){te(e)?sl.push(...e):(!gt||!gt.includes(e,e.allowRecurse?jt+1:jt))&&sl.push(e),$r()}function ao(e,t,l=Sl?ut+1:0){for(;l<$e.length;l++){const n=$e[l];if(n&&n.pre){if(e&&n.id!==e.uid)continue;$e.splice(l,1),l--,n()}}}function gn(e){if(sl.length){const t=[...new Set(sl)];if(sl.length=0,gt){gt.push(...t);return}for(gt=t,gt.sort((l,n)=>Fl(l)-Fl(n)),jt=0;jte.id==null?1/0:e.id,Ka=(e,t)=>{const l=Fl(e)-Fl(t);if(l===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return l};function Vr(e){ri=!1,Sl=!0,$e.sort(Ka);try{for(ut=0;ut<$e.length;ut++){const t=$e[ut];t&&t.active!==!1&&St(t,null,14)}}finally{ut=0,$e.length=0,gn(),Sl=!1,Oi=null,($e.length||sl.length)&&Vr()}}function Wa(e,t,...l){if(e.isUnmounted)return;const n=e.vnode.props||Ee;let i=l;const o=t.startsWith("update:"),r=o&&t.slice(7);if(r&&r in n){const u=`${r==="modelValue"?"model":r}Modifiers`,{number:d,trim:h}=n[u]||Ee;h&&(i=l.map(p=>ge(p)?p.trim():p)),d&&(i=l.map(la))}let a,s=n[a=Vn(t)]||n[a=Vn(ht(t))];!s&&o&&(s=n[a=Vn(Qt(t))]),s&&et(s,e,6,i);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,et(c,e,6,i)}}function Hr(e,t,l=!1){const n=t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let r={},a=!1;if(!re(e)){const s=c=>{const u=Hr(c,t,!0);u&&(a=!0,Ie(r,u))};!l&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!o&&!a?(Ce(e)&&n.set(e,null),null):(te(o)?o.forEach(s=>r[s]=null):Ie(r,o),Ce(e)&&n.set(e,r),r)}function In(e,t){return!e||!$l(t)?!1:(t=t.slice(2).replace(/Once$/,""),me(e,t[0].toLowerCase()+t.slice(1))||me(e,Qt(t))||me(e,t))}let Me=null,Sn=null;function vn(e){const t=Me;return Me=e,Sn=e&&e.type.__scopeId||null,t}function Ya(e){Sn=e}function Ga(){Sn=null}function ze(e,t=Me,l){if(!t||e._n)return e;const n=(...i)=>{n._d&&ko(-1);const o=vn(t);let r;try{r=e(...i)}finally{vn(o),n._d&&ko(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function Bn(e){const{type:t,vnode:l,proxy:n,withProxy:i,props:o,propsOptions:[r],slots:a,attrs:s,emit:c,render:u,renderCache:d,data:h,setupState:p,ctx:k,inheritAttrs:E}=e;let L,A;const T=vn(e);try{if(l.shapeFlag&4){const y=i||n,V=y;L=lt(u.call(V,y,d,o,p,h,k)),A=s}else{const y=t;L=lt(y.length>1?y(o,{attrs:s,slots:a,emit:c}):y(o,null)),A=t.props?s:Ja(s)}}catch(y){Al.length=0,Bl(y,e,1),L=ie(Qe)}let v=L;if(A&&E!==!1){const y=Object.keys(A),{shapeFlag:V}=v;y.length&&V&7&&(r&&y.some(bi)&&(A=Qa(A,r)),v=zt(v,A))}return l.dirs&&(v=zt(v),v.dirs=v.dirs?v.dirs.concat(l.dirs):l.dirs),l.transition&&(v.transition=l.transition),L=v,vn(T),L}const Ja=e=>{let t;for(const l in e)(l==="class"||l==="style"||$l(l))&&((t||(t={}))[l]=e[l]);return t},Qa=(e,t)=>{const l={};for(const n in e)(!bi(n)||!(n.slice(9)in t))&&(l[n]=e[n]);return l};function Za(e,t,l){const{props:n,children:i,component:o}=e,{props:r,children:a,patchFlag:s}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(l&&s>=0){if(s&1024)return!0;if(s&16)return n?co(n,r,c):!!r;if(s&8){const u=t.dynamicProps;for(let d=0;de.__isSuspense;function Br(e,t){t&&t.pendingBranch?te(e)?t.effects.push(...e):t.effects.push(e):qa(e)}function Ur(e,t){return Ii(e,null,t)}const tn={};function We(e,t,l){return Ii(e,t,l)}function Ii(e,t,{immediate:l,deep:n,flush:i,onTrack:o,onTrigger:r}=Ee){var a;const s=xr()===((a=Pe)==null?void 0:a.scope)?Pe:null;let c,u=!1,d=!1;if(Ve(e)?(c=()=>e.value,u=pn(e)):rl(e)?(c=()=>e,n=!0):te(e)?(d=!0,u=e.some(y=>rl(y)||pn(y)),c=()=>e.map(y=>{if(Ve(y))return y.value;if(rl(y))return qt(y);if(re(y))return St(y,s,2)})):re(e)?t?c=()=>St(e,s,2):c=()=>{if(!(s&&s.isUnmounted))return h&&h(),et(e,s,3,[p])}:c=dt,t&&n){const y=c;c=()=>qt(y())}let h,p=y=>{h=T.onStop=()=>{St(y,s,4),h=T.onStop=void 0}},k;if(hl)if(p=dt,t?l&&et(t,s,3,[c(),d?[]:void 0,p]):c(),i==="sync"){const y=Gc();k=y.__watcherHandles||(y.__watcherHandles=[])}else return dt;let E=d?new Array(e.length).fill(tn):tn;const L=()=>{if(T.active)if(t){const y=T.run();(n||u||(d?y.some((V,Y)=>Jt(V,E[Y])):Jt(y,E)))&&(h&&h(),et(t,s,3,[y,E===tn?void 0:d&&E[0]===tn?[]:E,p]),E=y)}else T.run()};L.allowRecurse=!!t;let A;i==="sync"?A=L:i==="post"?A=()=>qe(L,s&&s.suspense):(L.pre=!0,s&&(L.id=s.uid),A=()=>On(L));const T=new Ei(c,A);t?l?L():E=T.run():i==="post"?qe(T.run.bind(T),s&&s.suspense):T.run();const v=()=>{T.stop(),s&&s.scope&&yi(s.scope.effects,T)};return k&&k.push(v),v}function nc(e,t,l){const n=this.proxy,i=ge(e)?e.includes(".")?qr(n,e):()=>n[e]:e.bind(n,n);let o;re(t)?o=t:(o=t.handler,l=t);const r=Pe;dl(this);const a=Ii(i,o.bind(n),l);return r?dl(r):Yt(),a}function qr(e,t){const l=t.split(".");return()=>{let n=e;for(let i=0;i{qt(l,t)});else if(br(e))for(const l in e)qt(e[l],t);return e}function _n(e,t){const l=Me;if(l===null)return e;const n=Mn(l)||l.proxy,i=e.dirs||(e.dirs=[]);for(let o=0;o{e.isMounted=!0}),Kl(()=>{e.isUnmounting=!0}),e}const Ze=[Function,Array],Kr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ze,onEnter:Ze,onAfterEnter:Ze,onEnterCancelled:Ze,onBeforeLeave:Ze,onLeave:Ze,onAfterLeave:Ze,onLeaveCancelled:Ze,onBeforeAppear:Ze,onAppear:Ze,onAfterAppear:Ze,onAppearCancelled:Ze},oc={name:"BaseTransition",props:Kr,setup(e,{slots:t}){const l=zi(),n=ic();let i;return()=>{const o=t.default&&Yr(t.default(),!0);if(!o||!o.length)return;let r=o[0];if(o.length>1){for(const E of o)if(E.type!==Qe){r=E;break}}const a=pe(e),{mode:s}=a;if(n.isLeaving)return Un(r);const c=ho(r);if(!c)return Un(r);const u=si(c,a,n,l);ai(c,u);const d=l.subTree,h=d&&ho(d);let p=!1;const{getTransitionKey:k}=c.type;if(k){const E=k();i===void 0?i=E:E!==i&&(i=E,p=!0)}if(h&&h.type!==Qe&&(!Bt(c,h)||p)){const E=si(h,a,n,l);if(ai(h,E),s==="out-in")return n.isLeaving=!0,E.afterLeave=()=>{n.isLeaving=!1,l.update.active!==!1&&l.update()},Un(r);s==="in-out"&&c.type!==Qe&&(E.delayLeave=(L,A,T)=>{const v=Wr(n,h);v[String(h.key)]=h,L[At]=()=>{A(),L[At]=void 0,delete u.delayedLeave},u.delayedLeave=T})}return r}}},rc=oc;function Wr(e,t){const{leavingVNodes:l}=e;let n=l.get(t.type);return n||(n=Object.create(null),l.set(t.type,n)),n}function si(e,t,l,n){const{appear:i,mode:o,persisted:r=!1,onBeforeEnter:a,onEnter:s,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:h,onAfterLeave:p,onLeaveCancelled:k,onBeforeAppear:E,onAppear:L,onAfterAppear:A,onAppearCancelled:T}=t,v=String(e.key),y=Wr(l,e),V=(_,F)=>{_&&et(_,n,9,F)},Y=(_,F)=>{const O=F[1];V(_,F),te(_)?_.every(W=>W.length<=1)&&O():_.length<=1&&O()},M={mode:o,persisted:r,beforeEnter(_){let F=a;if(!l.isMounted)if(i)F=E||a;else return;_[At]&&_[At](!0);const O=y[v];O&&Bt(e,O)&&O.el[At]&&O.el[At](),V(F,[_])},enter(_){let F=s,O=c,W=u;if(!l.isMounted)if(i)F=L||s,O=A||c,W=T||u;else return;let C=!1;const z=_[ln]=ne=>{C||(C=!0,ne?V(W,[_]):V(O,[_]),M.delayedLeave&&M.delayedLeave(),_[ln]=void 0)};F?Y(F,[_,z]):z()},leave(_,F){const O=String(e.key);if(_[ln]&&_[ln](!0),l.isUnmounting)return F();V(d,[_]);let W=!1;const C=_[At]=z=>{W||(W=!0,F(),z?V(k,[_]):V(p,[_]),_[At]=void 0,y[O]===e&&delete y[O])};y[O]=e,h?Y(h,[_,C]):C()},clone(_){return si(_,t,l,n)}};return M}function Un(e){if(ql(e))return e=zt(e),e.children=null,e}function ho(e){return ql(e)?e.children?e.children[0]:void 0:e}function ai(e,t){e.shapeFlag&6&&e.component?ai(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Yr(e,t=!1,l){let n=[],i=0;for(let o=0;o1)for(let o=0;o!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function H(e){re(e)&&(e={loader:e});const{loader:t,loadingComponent:l,errorComponent:n,delay:i=200,timeout:o,suspensible:r=!0,onError:a}=e;let s=null,c,u=0;const d=()=>(u++,s=null,h()),h=()=>{let p;return s||(p=s=t().catch(k=>{if(k=k instanceof Error?k:new Error(String(k)),a)return new Promise((E,L)=>{a(k,()=>E(d()),()=>L(k),u+1)});throw k}).then(k=>p!==s&&s?s:(k&&(k.__esModule||k[Symbol.toStringTag]==="Module")&&(k=k.default),c=k,k)))};return he({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return c},setup(){const p=Pe;if(c)return()=>qn(c,p);const k=T=>{s=null,Bl(T,p,13,!n)};if(r&&p.suspense||hl)return h().then(T=>()=>qn(T,p)).catch(T=>(k(T),()=>n?ie(n,{error:T}):null));const E=_e(!1),L=_e(),A=_e(!!i);return i&&setTimeout(()=>{A.value=!1},i),o!=null&&setTimeout(()=>{if(!E.value&&!L.value){const T=new Error(`Async component timed out after ${o}ms.`);k(T),L.value=T}},o),h().then(()=>{E.value=!0,p.parent&&ql(p.parent.vnode)&&On(p.parent.update)}).catch(T=>{k(T),L.value=T}),()=>{if(E.value&&c)return qn(c,p);if(L.value&&n)return ie(n,{error:L.value});if(l&&!A.value)return ie(l)}}})}function qn(e,t){const{ref:l,props:n,children:i,ce:o}=t.vnode,r=ie(e,n,i);return r.ref=l,r.ce=o,delete t.vnode.ce,r}const ql=e=>e.type.__isKeepAlive;function sc(e,t){Gr(e,"a",t)}function ac(e,t){Gr(e,"da",t)}function Gr(e,t,l=Pe){const n=e.__wdc||(e.__wdc=()=>{let i=l;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Fn(t,n,l),l){let i=l.parent;for(;i&&i.parent;)ql(i.parent.vnode)&&cc(n,t,l,i),i=i.parent}}function cc(e,t,l,n){const i=Fn(t,e,n,!0);Dn(()=>{yi(n[t],i)},l)}function Fn(e,t,l=Pe,n=!1){if(l){const i=l[e]||(l[e]=[]),o=t.__weh||(t.__weh=(...r)=>{if(l.isUnmounted)return;vl(),dl(l);const a=et(t,l,e,r);return Yt(),_l(),a});return n?i.unshift(o):i.push(o),o}}const kt=e=>(t,l=Pe)=>(!hl||e==="sp")&&Fn(e,(...n)=>t(...n),l),uc=kt("bm"),He=kt("m"),dc=kt("bu"),hc=kt("u"),Kl=kt("bum"),Dn=kt("um"),fc=kt("sp"),mc=kt("rtg"),pc=kt("rtc");function gc(e,t=Pe){Fn("ec",e,t)}function Dt(e,t,l,n){let i;const o=l&&l[n];if(te(e)||ge(e)){i=new Array(e.length);for(let r=0,a=e.length;rt(r,a,void 0,o&&o[a]));else{const r=Object.keys(e);i=new Array(r.length);for(let a=0,s=r.length;axn(t)?!(t.type===Qe||t.type===xe&&!Jr(t.children)):!0)?e:null}const ci=e=>e?as(e)?Mn(e)||e.proxy:ci(e.parent):null,wl=Ie(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ci(e.parent),$root:e=>ci(e.root),$emit:e=>e.emit,$options:e=>Si(e),$forceUpdate:e=>e.f||(e.f=()=>On(e.update)),$nextTick:e=>e.n||(e.n=Ul.bind(e.proxy)),$watch:e=>nc.bind(e)}),Kn=(e,t)=>e!==Ee&&!e.__isScriptSetup&&me(e,t),vc={get({_:e},t){const{ctx:l,setupState:n,data:i,props:o,accessCache:r,type:a,appContext:s}=e;let c;if(t[0]!=="$"){const p=r[t];if(p!==void 0)switch(p){case 1:return n[t];case 2:return i[t];case 4:return l[t];case 3:return o[t]}else{if(Kn(n,t))return r[t]=1,n[t];if(i!==Ee&&me(i,t))return r[t]=2,i[t];if((c=e.propsOptions[0])&&me(c,t))return r[t]=3,o[t];if(l!==Ee&&me(l,t))return r[t]=4,l[t];ui&&(r[t]=0)}}const u=wl[t];let d,h;if(u)return t==="$attrs"&&Ye(e,"get",t),u(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(l!==Ee&&me(l,t))return r[t]=4,l[t];if(h=s.config.globalProperties,me(h,t))return h[t]},set({_:e},t,l){const{data:n,setupState:i,ctx:o}=e;return Kn(i,t)?(i[t]=l,!0):n!==Ee&&me(n,t)?(n[t]=l,!0):me(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=l,!0)},has({_:{data:e,setupState:t,accessCache:l,ctx:n,appContext:i,propsOptions:o}},r){let a;return!!l[r]||e!==Ee&&me(e,r)||Kn(t,r)||(a=o[0])&&me(a,r)||me(n,r)||me(wl,r)||me(i.config.globalProperties,r)},defineProperty(e,t,l){return l.get!=null?e._.accessCache[t]=0:me(l,"value")&&this.set(e,t,l.value,null),Reflect.defineProperty(e,t,l)}};function fo(e){return te(e)?e.reduce((t,l)=>(t[l]=null,t),{}):e}let ui=!0;function _c(e){const t=Si(e),l=e.proxy,n=e.ctx;ui=!1,t.beforeCreate&&mo(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:a,provide:s,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:p,updated:k,activated:E,deactivated:L,beforeDestroy:A,beforeUnmount:T,destroyed:v,unmounted:y,render:V,renderTracked:Y,renderTriggered:M,errorCaptured:_,serverPrefetch:F,expose:O,inheritAttrs:W,components:C,directives:z,filters:ne}=t;if(c&&bc(c,n,null),r)for(const Q in r){const K=r[Q];re(K)&&(n[Q]=K.bind(l))}if(i){const Q=i.call(l,l);Ce(Q)&&(e.data=Hl(Q))}if(ui=!0,o)for(const Q in o){const K=o[Q],Se=re(K)?K.bind(l,l):re(K.get)?K.get.bind(l,l):dt,De=!re(K)&&re(K.set)?K.set.bind(l):dt,Ue=U({get:Se,set:De});Object.defineProperty(n,Q,{enumerable:!0,configurable:!0,get:()=>Ue.value,set:Ne=>Ue.value=Ne})}if(a)for(const Q in a)Qr(a[Q],n,l,Q);if(s){const Q=re(s)?s.call(l):s;Reflect.ownKeys(Q).forEach(K=>{Wt(K,Q[K])})}u&&mo(u,e,"c");function S(Q,K){te(K)?K.forEach(Se=>Q(Se.bind(l))):K&&Q(K.bind(l))}if(S(uc,d),S(He,h),S(dc,p),S(hc,k),S(sc,E),S(ac,L),S(gc,_),S(pc,Y),S(mc,M),S(Kl,T),S(Dn,y),S(fc,F),te(O))if(O.length){const Q=e.exposed||(e.exposed={});O.forEach(K=>{Object.defineProperty(Q,K,{get:()=>l[K],set:Se=>l[K]=Se})})}else e.exposed||(e.exposed={});V&&e.render===dt&&(e.render=V),W!=null&&(e.inheritAttrs=W),C&&(e.components=C),z&&(e.directives=z)}function bc(e,t,l=dt){te(e)&&(e=di(e));for(const n in e){const i=e[n];let o;Ce(i)?"default"in i?o=we(i.from||n,i.default,!0):o=we(i.from||n):o=we(i),Ve(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[n]=o}}function mo(e,t,l){et(te(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,l)}function Qr(e,t,l,n){const i=n.includes(".")?qr(l,n):()=>l[n];if(ge(e)){const o=t[e];re(o)&&We(i,o)}else if(re(e))We(i,e.bind(l));else if(Ce(e))if(te(e))e.forEach(o=>Qr(o,t,l,n));else{const o=re(e.handler)?e.handler.bind(l):t[e.handler];re(o)&&We(i,o,e)}}function Si(e){const t=e.type,{mixins:l,extends:n}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,a=o.get(t);let s;return a?s=a:!i.length&&!l&&!n?s=t:(s={},i.length&&i.forEach(c=>bn(s,c,r,!0)),bn(s,t,r)),Ce(t)&&o.set(t,s),s}function bn(e,t,l,n=!1){const{mixins:i,extends:o}=t;o&&bn(e,o,l,!0),i&&i.forEach(r=>bn(e,r,l,!0));for(const r in t)if(!(n&&r==="expose")){const a=yc[r]||l&&l[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const yc={data:po,props:go,emits:go,methods:Rl,computed:Rl,beforeCreate:je,created:je,beforeMount:je,mounted:je,beforeUpdate:je,updated:je,beforeDestroy:je,beforeUnmount:je,destroyed:je,unmounted:je,activated:je,deactivated:je,errorCaptured:je,serverPrefetch:je,components:Rl,directives:Rl,watch:xc,provide:po,inject:kc};function po(e,t){return t?e?function(){return Ie(re(e)?e.call(this,this):e,re(t)?t.call(this,this):t)}:t:e}function kc(e,t){return Rl(di(e),di(t))}function di(e){if(te(e)){const t={};for(let l=0;l1)return l&&re(t)?t.call(n&&n.proxy):t}}function Rc(e,t,l,n=!1){const i={},o={};fn(o,zn,1),e.propsDefaults=Object.create(null),Xr(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);l?e.props=n?i:Sr(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function Lc(e,t,l,n){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,a=pe(i),[s]=e.propsOptions;let c=!1;if((n||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let d=0;d{s=!0;const[h,p]=es(d,t,!0);Ie(r,h),p&&a.push(...p)};!l&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!s)return Ce(e)&&n.set(e,il),il;if(te(o))for(let u=0;u-1,p[1]=E<0||k-1||me(p,"default"))&&a.push(d)}}}const c=[r,a];return Ce(e)&&n.set(e,c),c}function vo(e){return e[0]!=="$"}function _o(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function bo(e,t){return _o(e)===_o(t)}function yo(e,t){return te(t)?t.findIndex(l=>bo(l,e)):re(t)&&bo(t,e)?0:-1}const ts=e=>e[0]==="_"||e==="$stable",Fi=e=>te(e)?e.map(lt):[lt(e)],wc=(e,t,l)=>{if(t._n)return t;const n=ze((...i)=>Fi(t(...i)),l);return n._c=!1,n},ls=(e,t,l)=>{const n=e._ctx;for(const i in e){if(ts(i))continue;const o=e[i];if(re(o))t[i]=wc(i,o,n);else if(o!=null){const r=Fi(o);t[i]=()=>r}}},ns=(e,t)=>{const l=Fi(t);e.slots.default=()=>l},Tc=(e,t)=>{if(e.vnode.shapeFlag&32){const l=t._;l?(e.slots=pe(t),fn(t,"_",l)):ls(t,e.slots={})}else e.slots={},t&&ns(e,t);fn(e.slots,zn,1)},Ac=(e,t,l)=>{const{vnode:n,slots:i}=e;let o=!0,r=Ee;if(n.shapeFlag&32){const a=t._;a?l&&a===1?o=!1:(Ie(i,t),!l&&a===1&&delete i._):(o=!t.$stable,ls(t,i)),r=t}else t&&(ns(e,t),r={default:1});if(o)for(const a in i)!ts(a)&&r[a]==null&&delete i[a]};function kn(e,t,l,n,i=!1){if(te(e)){e.forEach((h,p)=>kn(h,t&&(te(t)?t[p]:t),l,n,i));return}if(al(n)&&!i)return;const o=n.shapeFlag&4?Mn(n.component)||n.component.proxy:n.el,r=i?null:o,{i:a,r:s}=e,c=t&&t.r,u=a.refs===Ee?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==s&&(ge(c)?(u[c]=null,me(d,c)&&(d[c]=null)):Ve(c)&&(c.value=null)),re(s))St(s,a,12,[r,u]);else{const h=ge(s),p=Ve(s);if(h||p){const k=()=>{if(e.f){const E=h?me(d,s)?d[s]:u[s]:s.value;i?te(E)&&yi(E,o):te(E)?E.includes(o)||E.push(o):h?(u[s]=[o],me(d,s)&&(d[s]=u[s])):(s.value=[o],e.k&&(u[e.k]=s.value))}else h?(u[s]=r,me(d,s)&&(d[s]=r)):p&&(s.value=r,e.k&&(u[e.k]=r))};r?(k.id=-1,qe(k,l)):k()}}}let Lt=!1;const nn=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",on=e=>e.nodeType===8;function Pc(e){const{mt:t,p:l,o:{patchProp:n,createText:i,nextSibling:o,parentNode:r,remove:a,insert:s,createComment:c}}=e,u=(v,y)=>{if(!y.hasChildNodes()){l(null,v,y),gn(),y._vnode=v;return}Lt=!1,d(y.firstChild,v,null,null,null),gn(),y._vnode=v,Lt&&console.error("Hydration completed but contains mismatches.")},d=(v,y,V,Y,M,_=!1)=>{const F=on(v)&&v.data==="[",O=()=>E(v,y,V,Y,M,F),{type:W,ref:C,shapeFlag:z,patchFlag:ne}=y;let se=v.nodeType;y.el=v,ne===-2&&(_=!1,y.dynamicChildren=null);let S=null;switch(W){case ul:se!==3?y.children===""?(s(y.el=i(""),r(v),v),S=v):S=O():(v.data!==y.children&&(Lt=!0,v.data=y.children),S=o(v));break;case Qe:T(v)?(S=o(v),A(y.el=v.content.firstChild,v,V)):se!==8||F?S=O():S=o(v);break;case Tl:if(F&&(v=o(v),se=v.nodeType),se===1||se===3){S=v;const Q=!y.children.length;for(let K=0;K{_=_||!!y.dynamicChildren;const{type:F,props:O,patchFlag:W,shapeFlag:C,dirs:z,transition:ne}=y,se=F==="input"||F==="option";if(se||W!==-1){z&&ct(y,null,V,"created");let S=!1;if(T(v)){S=is(Y,ne)&&V&&V.vnode.props&&V.vnode.props.appear;const K=v.content.firstChild;S&&ne.beforeEnter(K),A(K,v,V),y.el=v=K}if(O)if(se||!_||W&48)for(const K in O)(se&&(K.endsWith("value")||K==="indeterminate")||$l(K)&&!Ll(K)||K[0]===".")&&n(v,K,null,O[K],!1,void 0,V);else O.onClick&&n(v,"onClick",null,O.onClick,!1,void 0,V);let Q;if((Q=O&&O.onVnodeBeforeMount)&&Xe(Q,V,y),z&&ct(y,null,V,"beforeMount"),((Q=O&&O.onVnodeMounted)||z||S)&&Br(()=>{Q&&Xe(Q,V,y),S&&ne.enter(v),z&&ct(y,null,V,"mounted")},Y),C&16&&!(O&&(O.innerHTML||O.textContent))){let K=p(v.firstChild,y,v,V,Y,M,_);for(;K;){Lt=!0;const Se=K;K=K.nextSibling,a(Se)}}else C&8&&v.textContent!==y.children&&(Lt=!0,v.textContent=y.children)}return v.nextSibling},p=(v,y,V,Y,M,_,F)=>{F=F||!!y.dynamicChildren;const O=y.children,W=O.length;for(let C=0;C{const{slotScopeIds:F}=y;F&&(M=M?M.concat(F):F);const O=r(v),W=p(o(v),y,O,V,Y,M,_);return W&&on(W)&&W.data==="]"?o(y.anchor=W):(Lt=!0,s(y.anchor=c("]"),O,W),W)},E=(v,y,V,Y,M,_)=>{if(Lt=!0,y.el=null,_){const W=L(v);for(;;){const C=o(v);if(C&&C!==W)a(C);else break}}const F=o(v),O=r(v);return a(v),l(null,y,O,F,V,Y,nn(O),M),F},L=(v,y="[",V="]")=>{let Y=0;for(;v;)if(v=o(v),v&&on(v)&&(v.data===y&&Y++,v.data===V)){if(Y===0)return o(v);Y--}return v},A=(v,y,V)=>{const Y=y.parentNode;Y&&Y.replaceChild(v,y);let M=V;for(;M;)M.vnode.el===y&&(M.vnode.el=M.subTree.el=v),M=M.parent},T=v=>v.nodeType===1&&v.tagName.toLowerCase()==="template";return[u,d]}const qe=Br;function Oc(e){return Ic(e,Pc)}function Ic(e,t){const l=li();l.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:r,createText:a,createComment:s,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:p=dt,insertStaticContent:k}=e,E=(f,m,g,x=null,w=null,P=null,j=!1,D=null,$=!!m.dynamicChildren)=>{if(f===m)return;f&&!Bt(f,m)&&(x=R(f),Ne(f,w,P,!0),f=null),m.patchFlag===-2&&($=!1,m.dynamicChildren=null);const{type:I,ref:Z,shapeFlag:G}=m;switch(I){case ul:L(f,m,g,x);break;case Qe:A(f,m,g,x);break;case Tl:f==null&&T(m,g,x,j);break;case xe:C(f,m,g,x,w,P,j,D,$);break;default:G&1?V(f,m,g,x,w,P,j,D,$):G&6?z(f,m,g,x,w,P,j,D,$):(G&64||G&128)&&I.process(f,m,g,x,w,P,j,D,$,N)}Z!=null&&w&&kn(Z,f&&f.ref,P,m||f,!m)},L=(f,m,g,x)=>{if(f==null)n(m.el=a(m.children),g,x);else{const w=m.el=f.el;m.children!==f.children&&c(w,m.children)}},A=(f,m,g,x)=>{f==null?n(m.el=s(m.children||""),g,x):m.el=f.el},T=(f,m,g,x)=>{[f.el,f.anchor]=k(f.children,m,g,x,f.el,f.anchor)},v=({el:f,anchor:m},g,x)=>{let w;for(;f&&f!==m;)w=h(f),n(f,g,x),f=w;n(m,g,x)},y=({el:f,anchor:m})=>{let g;for(;f&&f!==m;)g=h(f),i(f),f=g;i(m)},V=(f,m,g,x,w,P,j,D,$)=>{j=j||m.type==="svg",f==null?Y(m,g,x,w,P,j,D,$):F(f,m,w,P,j,D,$)},Y=(f,m,g,x,w,P,j,D)=>{let $,I;const{type:Z,props:G,shapeFlag:X,transition:oe,dirs:ae}=f;if($=f.el=r(f.type,P,G&&G.is,G),X&8?u($,f.children):X&16&&_(f.children,$,null,x,w,P&&Z!=="foreignObject",j,D),ae&&ct(f,null,x,"created"),M($,f,f.scopeId,j,x),G){for(const be in G)be!=="value"&&!Ll(be)&&o($,be,null,G[be],P,f.children,x,w,Fe);"value"in G&&o($,"value",null,G.value),(I=G.onVnodeBeforeMount)&&Xe(I,x,f)}ae&&ct(f,null,x,"beforeMount");const ye=is(w,oe);ye&&oe.beforeEnter($),n($,m,g),((I=G&&G.onVnodeMounted)||ye||ae)&&qe(()=>{I&&Xe(I,x,f),ye&&oe.enter($),ae&&ct(f,null,x,"mounted")},w)},M=(f,m,g,x,w)=>{if(g&&p(f,g),x)for(let P=0;P{for(let I=$;I{const D=m.el=f.el;let{patchFlag:$,dynamicChildren:I,dirs:Z}=m;$|=f.patchFlag&16;const G=f.props||Ee,X=m.props||Ee;let oe;g&&Nt(g,!1),(oe=X.onVnodeBeforeUpdate)&&Xe(oe,g,m,f),Z&&ct(m,f,g,"beforeUpdate"),g&&Nt(g,!0);const ae=w&&m.type!=="foreignObject";if(I?O(f.dynamicChildren,I,D,g,x,ae,P):j||K(f,m,D,null,g,x,ae,P,!1),$>0){if($&16)W(D,m,G,X,g,x,w);else if($&2&&G.class!==X.class&&o(D,"class",null,X.class,w),$&4&&o(D,"style",G.style,X.style,w),$&8){const ye=m.dynamicProps;for(let be=0;be{oe&&Xe(oe,g,m,f),Z&&ct(m,f,g,"updated")},x)},O=(f,m,g,x,w,P,j)=>{for(let D=0;D{if(g!==x){if(g!==Ee)for(const D in g)!Ll(D)&&!(D in x)&&o(f,D,g[D],null,j,m.children,w,P,Fe);for(const D in x){if(Ll(D))continue;const $=x[D],I=g[D];$!==I&&D!=="value"&&o(f,D,I,$,j,m.children,w,P,Fe)}"value"in x&&o(f,"value",g.value,x.value)}},C=(f,m,g,x,w,P,j,D,$)=>{const I=m.el=f?f.el:a(""),Z=m.anchor=f?f.anchor:a("");let{patchFlag:G,dynamicChildren:X,slotScopeIds:oe}=m;oe&&(D=D?D.concat(oe):oe),f==null?(n(I,g,x),n(Z,g,x),_(m.children,g,Z,w,P,j,D,$)):G>0&&G&64&&X&&f.dynamicChildren?(O(f.dynamicChildren,X,g,w,P,j,D),(m.key!=null||w&&m===w.subTree)&&os(f,m,!0)):K(f,m,g,Z,w,P,j,D,$)},z=(f,m,g,x,w,P,j,D,$)=>{m.slotScopeIds=D,f==null?m.shapeFlag&512?w.ctx.activate(m,g,x,j,$):ne(m,g,x,w,P,j,$):se(f,m,$)},ne=(f,m,g,x,w,P,j)=>{const D=f.component=Hc(f,x,w);if(ql(f)&&(D.ctx.renderer=N),jc(D),D.asyncDep){if(w&&w.registerDep(D,S),!f.el){const $=D.subTree=ie(Qe);A(null,$,m,g)}return}S(D,f,m,g,w,P,j)},se=(f,m,g)=>{const x=m.component=f.component;if(Za(f,m,g))if(x.asyncDep&&!x.asyncResolved){Q(x,m,g);return}else x.next=m,Ua(x.update),x.update();else m.el=f.el,x.vnode=m},S=(f,m,g,x,w,P,j)=>{const D=()=>{if(f.isMounted){let{next:Z,bu:G,u:X,parent:oe,vnode:ae}=f,ye=Z,be;Nt(f,!1),Z?(Z.el=ae.el,Q(f,Z,j)):Z=ae,G&&Hn(G),(be=Z.props&&Z.props.onVnodeBeforeUpdate)&&Xe(be,oe,Z,ae),Nt(f,!0);const Te=Bn(f),tt=f.subTree;f.subTree=Te,E(tt,Te,d(tt.el),R(tt),f,w,P),Z.el=Te.el,ye===null&&Xa(f,Te.el),X&&qe(X,w),(be=Z.props&&Z.props.onVnodeUpdated)&&qe(()=>Xe(be,oe,Z,ae),w)}else{let Z;const{el:G,props:X}=m,{bm:oe,m:ae,parent:ye}=f,be=al(m);if(Nt(f,!1),oe&&Hn(oe),!be&&(Z=X&&X.onVnodeBeforeMount)&&Xe(Z,ye,m),Nt(f,!0),G&&de){const Te=()=>{f.subTree=Bn(f),de(G,f.subTree,f,w,null)};be?m.type.__asyncLoader().then(()=>!f.isUnmounted&&Te()):Te()}else{const Te=f.subTree=Bn(f);E(null,Te,g,x,f,w,P),m.el=Te.el}if(ae&&qe(ae,w),!be&&(Z=X&&X.onVnodeMounted)){const Te=m;qe(()=>Xe(Z,ye,Te),w)}(m.shapeFlag&256||ye&&al(ye.vnode)&&ye.vnode.shapeFlag&256)&&f.a&&qe(f.a,w),f.isMounted=!0,m=g=x=null}},$=f.effect=new Ei(D,()=>On(I),f.scope),I=f.update=()=>$.run();I.id=f.uid,Nt(f,!0),I()},Q=(f,m,g)=>{m.component=f;const x=f.vnode.props;f.vnode=m,f.next=null,Lc(f,m.props,x,g),Ac(f,m.children,g),vl(),ao(f),_l()},K=(f,m,g,x,w,P,j,D,$=!1)=>{const I=f&&f.children,Z=f?f.shapeFlag:0,G=m.children,{patchFlag:X,shapeFlag:oe}=m;if(X>0){if(X&128){De(I,G,g,x,w,P,j,D,$);return}else if(X&256){Se(I,G,g,x,w,P,j,D,$);return}}oe&8?(Z&16&&Fe(I,w,P),G!==I&&u(g,G)):Z&16?oe&16?De(I,G,g,x,w,P,j,D,$):Fe(I,w,P,!0):(Z&8&&u(g,""),oe&16&&_(G,g,x,w,P,j,D,$))},Se=(f,m,g,x,w,P,j,D,$)=>{f=f||il,m=m||il;const I=f.length,Z=m.length,G=Math.min(I,Z);let X;for(X=0;XZ?Fe(f,w,P,!0,!1,G):_(m,g,x,w,P,j,D,$,G)},De=(f,m,g,x,w,P,j,D,$)=>{let I=0;const Z=m.length;let G=f.length-1,X=Z-1;for(;I<=G&&I<=X;){const oe=f[I],ae=m[I]=$?Pt(m[I]):lt(m[I]);if(Bt(oe,ae))E(oe,ae,g,null,w,P,j,D,$);else break;I++}for(;I<=G&&I<=X;){const oe=f[G],ae=m[X]=$?Pt(m[X]):lt(m[X]);if(Bt(oe,ae))E(oe,ae,g,null,w,P,j,D,$);else break;G--,X--}if(I>G){if(I<=X){const oe=X+1,ae=oeX)for(;I<=G;)Ne(f[I],w,P,!0),I++;else{const oe=I,ae=I,ye=new Map;for(I=ae;I<=X;I++){const Ge=m[I]=$?Pt(m[I]):lt(m[I]);Ge.key!=null&&ye.set(Ge.key,I)}let be,Te=0;const tt=X-ae+1;let Xt=!1,Qi=0;const bl=new Array(tt);for(I=0;I=tt){Ne(Ge,w,P,!0);continue}let at;if(Ge.key!=null)at=ye.get(Ge.key);else for(be=ae;be<=X;be++)if(bl[be-ae]===0&&Bt(Ge,m[be])){at=be;break}at===void 0?Ne(Ge,w,P,!0):(bl[at-ae]=I+1,at>=Qi?Qi=at:Xt=!0,E(Ge,m[at],g,null,w,P,j,D,$),Te++)}const Zi=Xt?Sc(bl):il;for(be=Zi.length-1,I=tt-1;I>=0;I--){const Ge=ae+I,at=m[Ge],Xi=Ge+1{const{el:P,type:j,transition:D,children:$,shapeFlag:I}=f;if(I&6){Ue(f.component.subTree,m,g,x);return}if(I&128){f.suspense.move(m,g,x);return}if(I&64){j.move(f,m,g,N);return}if(j===xe){n(P,m,g);for(let G=0;G<$.length;G++)Ue($[G],m,g,x);n(f.anchor,m,g);return}if(j===Tl){v(f,m,g);return}if(x!==2&&I&1&&D)if(x===0)D.beforeEnter(P),n(P,m,g),qe(()=>D.enter(P),w);else{const{leave:G,delayLeave:X,afterLeave:oe}=D,ae=()=>n(P,m,g),ye=()=>{G(P,()=>{ae(),oe&&oe()})};X?X(P,ae,ye):ye()}else n(P,m,g)},Ne=(f,m,g,x=!1,w=!1)=>{const{type:P,props:j,ref:D,children:$,dynamicChildren:I,shapeFlag:Z,patchFlag:G,dirs:X}=f;if(D!=null&&kn(D,null,g,f,!0),Z&256){m.ctx.deactivate(f);return}const oe=Z&1&&X,ae=!al(f);let ye;if(ae&&(ye=j&&j.onVnodeBeforeUnmount)&&Xe(ye,m,f),Z&6)st(f.component,g,x);else{if(Z&128){f.suspense.unmount(g,x);return}oe&&ct(f,null,m,"beforeUnmount"),Z&64?f.type.remove(f,m,g,w,N,x):I&&(P!==xe||G>0&&G&64)?Fe(I,m,g,!1,!0):(P===xe&&G&384||!w&&Z&16)&&Fe($,m,g),x&&Et(f)}(ae&&(ye=j&&j.onVnodeUnmounted)||oe)&&qe(()=>{ye&&Xe(ye,m,f),oe&&ct(f,null,m,"unmounted")},g)},Et=f=>{const{type:m,el:g,anchor:x,transition:w}=f;if(m===xe){Ct(g,x);return}if(m===Tl){y(f);return}const P=()=>{i(g),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(f.shapeFlag&1&&w&&!w.persisted){const{leave:j,delayLeave:D}=w,$=()=>j(g,P);D?D(f.el,P,$):$()}else P()},Ct=(f,m)=>{let g;for(;f!==m;)g=h(f),i(f),f=g;i(m)},st=(f,m,g)=>{const{bum:x,scope:w,update:P,subTree:j,um:D}=f;x&&Hn(x),w.stop(),P&&(P.active=!1,Ne(j,f,m,g)),D&&qe(D,m),qe(()=>{f.isUnmounted=!0},m),m&&m.pendingBranch&&!m.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===m.pendingId&&(m.deps--,m.deps===0&&m.resolve())},Fe=(f,m,g,x=!1,w=!1,P=0)=>{for(let j=P;jf.shapeFlag&6?R(f.component.subTree):f.shapeFlag&128?f.suspense.next():h(f.anchor||f.el),q=(f,m,g)=>{f==null?m._vnode&&Ne(m._vnode,null,null,!0):E(m._vnode||null,f,m,null,null,null,g),ao(),gn(),m._vnode=f},N={p:E,um:Ne,m:Ue,r:Et,mt:ne,mc:_,pc:K,pbc:O,n:R,o:e};let J,de;return t&&([J,de]=t(N)),{render:q,hydrate:J,createApp:Cc(q,J)}}function Nt({effect:e,update:t},l){e.allowRecurse=t.allowRecurse=l}function is(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function os(e,t,l=!1){const n=e.children,i=t.children;if(te(n)&&te(i))for(let o=0;o>1,e[l[a]]0&&(t[n]=l[o-1]),l[o]=n)}}for(o=l.length,r=l[o-1];o-- >0;)l[o]=r,r=t[r];return l}const Fc=e=>e.__isTeleport,xe=Symbol.for("v-fgt"),ul=Symbol.for("v-txt"),Qe=Symbol.for("v-cmt"),Tl=Symbol.for("v-stc"),Al=[];let it=null;function B(e=!1){Al.push(it=e?null:[])}function Dc(){Al.pop(),it=Al[Al.length-1]||null}let Dl=1;function ko(e){Dl+=e}function rs(e){return e.dynamicChildren=Dl>0?it||il:null,Dc(),Dl>0&&it&&it.push(e),e}function ee(e,t,l,n,i,o){return rs(ue(e,t,l,n,i,o,!0))}function Ae(e,t,l,n,i){return rs(ie(e,t,l,n,i,!0))}function xn(e){return e?e.__v_isVNode===!0:!1}function Bt(e,t){return e.type===t.type&&e.key===t.key}const zn="__vInternal",ss=({key:e})=>e??null,dn=({ref:e,ref_key:t,ref_for:l})=>(typeof e=="number"&&(e=""+e),e!=null?ge(e)||Ve(e)||re(e)?{i:Me,r:e,k:t,f:!!l}:e:null);function ue(e,t=null,l=null,n=0,i=null,o=e===xe?0:1,r=!1,a=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ss(t),ref:t&&dn(t),scopeId:Sn,slotScopeIds:null,children:l,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Me};return a?(Di(s,l),o&128&&e.normalize(s)):l&&(s.shapeFlag|=ge(l)?8:16),Dl>0&&!r&&it&&(s.patchFlag>0||o&6)&&s.patchFlag!==32&&it.push(s),s}const ie=zc;function zc(e,t=null,l=null,n=0,i=null,o=!1){if((!e||e===ec)&&(e=Qe),xn(e)){const a=zt(e,t,!0);return l&&Di(a,l),Dl>0&&!o&&it&&(a.shapeFlag&6?it[it.indexOf(e)]=a:it.push(a)),a.patchFlag|=-2,a}if(Wc(e)&&(e=e.__vccOpts),t){t=Mc(t);let{class:a,style:s}=t;a&&!ge(a)&&(t.class=Ke(a)),Ce(s)&&(Fr(s)&&!te(s)&&(s=Ie({},s)),t.style=Vl(s))}const r=ge(e)?1:lc(e)?128:Fc(e)?64:Ce(e)?4:re(e)?2:0;return ue(e,t,l,n,i,r,o,!0)}function Mc(e){return e?Fr(e)||zn in e?Ie({},e):e:null}function zt(e,t,l=!1){const{props:n,ref:i,patchFlag:o,children:r}=e,a=t?fi(n||{},t):n;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&ss(a),ref:t&&t.ref?l&&i?te(i)?i.concat(dn(t)):[i,dn(t)]:dn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&zt(e.ssContent),ssFallback:e.ssFallback&&zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function ot(e=" ",t=0){return ie(ul,null,e,t)}function Nc(e,t){const l=ie(Tl,null,e);return l.staticCount=t,l}function Le(e="",t=!1){return t?(B(),Ae(Qe,null,e)):ie(Qe,null,e)}function lt(e){return e==null||typeof e=="boolean"?ie(Qe):te(e)?ie(xe,null,e.slice()):typeof e=="object"?Pt(e):ie(ul,null,String(e))}function Pt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:zt(e)}function Di(e,t){let l=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(te(t))l=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),Di(e,i()),i._c&&(i._d=!0));return}else{l=32;const i=t._;!i&&!(zn in t)?t._ctx=Me:i===3&&Me&&(Me.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else re(t)?(t={default:t,_ctx:Me},l=32):(t=String(t),n&64?(l=16,t=[ot(t)]):l=8);e.children=t,e.shapeFlag|=l}function fi(...e){const t={};for(let l=0;lPe||Me;let Mi,el,xo="__VUE_INSTANCE_SETTERS__";(el=li()[xo])||(el=li()[xo]=[]),el.push(e=>Pe=e),Mi=e=>{el.length>1?el.forEach(t=>t(e)):el[0](e)};const dl=e=>{Mi(e),e.scope.on()},Yt=()=>{Pe&&Pe.scope.off(),Mi(null)};function as(e){return e.vnode.shapeFlag&4}let hl=!1;function jc(e,t=!1){hl=t;const{props:l,children:n}=e.vnode,i=as(e);Rc(e,l,i,t),Tc(e,n);const o=i?Bc(e,t):void 0;return hl=!1,o}function Bc(e,t){const l=e.type;e.accessCache=Object.create(null),e.proxy=Dr(new Proxy(e.ctx,vc));const{setup:n}=l;if(n){const i=e.setupContext=n.length>1?qc(e):null;dl(e),vl();const o=St(n,e,0,[e.props,i]);if(_l(),Yt(),vr(o)){if(o.then(Yt,Yt),t)return o.then(r=>{Eo(e,r,t)}).catch(r=>{Bl(r,e,0)});e.asyncDep=o}else Eo(e,o,t)}else cs(e,t)}function Eo(e,t,l){re(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ce(t)&&(e.setupState=Mr(t)),cs(e,l)}let Co;function cs(e,t,l){const n=e.type;if(!e.render){if(!t&&Co&&!n.render){const i=n.template||Si(e).template;if(i){const{isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:s}=n,c=Ie(Ie({isCustomElement:o,delimiters:a},r),s);n.render=Co(i,c)}}e.render=n.render||dt}{dl(e),vl();try{_c(e)}finally{_l(),Yt()}}}function Uc(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,l){return Ye(e,"get","$attrs"),t[l]}}))}function qc(e){const t=l=>{e.exposed=l||{}};return{get attrs(){return Uc(e)},slots:e.slots,emit:e.emit,expose:t}}function Mn(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Mr(Dr(e.exposed)),{get(t,l){if(l in t)return t[l];if(l in wl)return wl[l](e)},has(t,l){return l in t||l in wl}}))}function Kc(e,t=!0){return re(e)?e.displayName||e.name:e.name||t&&e.__name}function Wc(e){return re(e)&&"__vccOpts"in e}const U=(e,t)=>Ha(e,t,hl);function ce(e,t,l){const n=arguments.length;return n===2?Ce(t)&&!te(t)?xn(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(n>3?l=Array.prototype.slice.call(arguments,2):n===3&&xn(l)&&(l=[l]),ie(e,t,l))}const Yc=Symbol.for("v-scx"),Gc=()=>we(Yc),Jc="3.3.12",Qc="http://www.w3.org/2000/svg",Ut=typeof document<"u"?document:null,Ro=Ut&&Ut.createElement("template"),Zc={insert:(e,t,l)=>{t.insertBefore(e,l||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,l,n)=>{const i=t?Ut.createElementNS(Qc,e):Ut.createElement(e,l?{is:l}:void 0);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Ut.createTextNode(e),createComment:e=>Ut.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ut.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,l,n,i,o){const r=l?l.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),l),!(i===o||!(i=i.nextSibling)););else{Ro.innerHTML=n?`${e}`:e;const a=Ro.content;if(n){const s=a.firstChild;for(;s.firstChild;)a.appendChild(s.firstChild);a.removeChild(s)}t.insertBefore(a,l)}return[r?r.nextSibling:t.firstChild,l?l.previousSibling:t.lastChild]}},wt="transition",yl="animation",zl=Symbol("_vtc"),Wl=(e,{slots:t})=>ce(rc,Xc(e),t);Wl.displayName="Transition";const us={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Wl.props=Ie({},Kr,us);const $t=(e,t=[])=>{te(e)?e.forEach(l=>l(...t)):e&&e(...t)},Lo=e=>e?te(e)?e.some(t=>t.length>1):e.length>1:!1;function Xc(e){const t={};for(const C in e)C in us||(t[C]=e[C]);if(e.css===!1)return t;const{name:l="v",type:n,duration:i,enterFromClass:o=`${l}-enter-from`,enterActiveClass:r=`${l}-enter-active`,enterToClass:a=`${l}-enter-to`,appearFromClass:s=o,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${l}-leave-from`,leaveActiveClass:h=`${l}-leave-active`,leaveToClass:p=`${l}-leave-to`}=e,k=eu(i),E=k&&k[0],L=k&&k[1],{onBeforeEnter:A,onEnter:T,onEnterCancelled:v,onLeave:y,onLeaveCancelled:V,onBeforeAppear:Y=A,onAppear:M=T,onAppearCancelled:_=v}=t,F=(C,z,ne)=>{Vt(C,z?u:a),Vt(C,z?c:r),ne&&ne()},O=(C,z)=>{C._isLeaving=!1,Vt(C,d),Vt(C,p),Vt(C,h),z&&z()},W=C=>(z,ne)=>{const se=C?M:T,S=()=>F(z,C,ne);$t(se,[z,S]),wo(()=>{Vt(z,C?s:o),Tt(z,C?u:a),Lo(se)||To(z,n,E,S)})};return Ie(t,{onBeforeEnter(C){$t(A,[C]),Tt(C,o),Tt(C,r)},onBeforeAppear(C){$t(Y,[C]),Tt(C,s),Tt(C,c)},onEnter:W(!1),onAppear:W(!0),onLeave(C,z){C._isLeaving=!0;const ne=()=>O(C,z);Tt(C,d),nu(),Tt(C,h),wo(()=>{C._isLeaving&&(Vt(C,d),Tt(C,p),Lo(y)||To(C,n,L,ne))}),$t(y,[C,ne])},onEnterCancelled(C){F(C,!1),$t(v,[C])},onAppearCancelled(C){F(C,!0),$t(_,[C])},onLeaveCancelled(C){O(C),$t(V,[C])}})}function eu(e){if(e==null)return null;if(Ce(e))return[Wn(e.enter),Wn(e.leave)];{const t=Wn(e);return[t,t]}}function Wn(e){return na(e)}function Tt(e,t){t.split(/\s+/).forEach(l=>l&&e.classList.add(l)),(e[zl]||(e[zl]=new Set)).add(t)}function Vt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const l=e[zl];l&&(l.delete(t),l.size||(e[zl]=void 0))}function wo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let tu=0;function To(e,t,l,n){const i=e._endId=++tu,o=()=>{i===e._endId&&n()};if(l)return setTimeout(o,l);const{type:r,timeout:a,propCount:s}=lu(e,t);if(!r)return n();const c=r+"end";let u=0;const d=()=>{e.removeEventListener(c,h),o()},h=p=>{p.target===e&&++u>=s&&d()};setTimeout(()=>{u(l[k]||"").split(", "),i=n(`${wt}Delay`),o=n(`${wt}Duration`),r=Ao(i,o),a=n(`${yl}Delay`),s=n(`${yl}Duration`),c=Ao(a,s);let u=null,d=0,h=0;t===wt?r>0&&(u=wt,d=r,h=o.length):t===yl?c>0&&(u=yl,d=c,h=s.length):(d=Math.max(r,c),u=d>0?r>c?wt:yl:null,h=u?u===wt?o.length:s.length:0);const p=u===wt&&/\b(transform|all)(,|$)/.test(n(`${wt}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:p}}function Ao(e,t){for(;e.lengthPo(l)+Po(e[n])))}function Po(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function nu(){return document.body.offsetHeight}function iu(e,t,l){const n=e[zl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):l?e.setAttribute("class",t):e.className=t}const Ni=Symbol("_vod"),En={beforeMount(e,{value:t},{transition:l}){e[Ni]=e.style.display==="none"?"":e.style.display,l&&t?l.beforeEnter(e):kl(e,t)},mounted(e,{value:t},{transition:l}){l&&t&&l.enter(e)},updated(e,{value:t,oldValue:l},{transition:n}){!t!=!l&&(n?t?(n.beforeEnter(e),kl(e,!0),n.enter(e)):n.leave(e,()=>{kl(e,!1)}):kl(e,t))},beforeUnmount(e,{value:t}){kl(e,t)}};function kl(e,t){e.style.display=t?e[Ni]:"none"}const ou=Symbol("");function ru(e,t,l){const n=e.style,i=ge(l);if(l&&!i){if(t&&!ge(t))for(const o in t)l[o]==null&&mi(n,o,"");for(const o in l)mi(n,o,l[o])}else{const o=n.display;if(i){if(t!==l){const r=n[ou];r&&(l+=";"+r),n.cssText=l}}else t&&e.removeAttribute("style");Ni in e&&(n.display=o)}}const Oo=/\s*!important$/;function mi(e,t,l){if(te(l))l.forEach(n=>mi(e,t,n));else if(l==null&&(l=""),t.startsWith("--"))e.setProperty(t,l);else{const n=su(e,t);Oo.test(l)?e.setProperty(Qt(n),l.replace(Oo,""),"important"):e[n]=l}}const Io=["Webkit","Moz","ms"],Yn={};function su(e,t){const l=Yn[t];if(l)return l;let n=ht(t);if(n!=="filter"&&n in e)return Yn[t]=n;n=Tn(n);for(let i=0;iGn||(mu.then(()=>Gn=0),Gn=Date.now());function gu(e,t){const l=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=l.attached)return;et(vu(n,l.value),t,5,[n])};return l.value=e,l.attached=pu(),l}function vu(e,t){if(te(t)){const l=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{l.call(e),e._stopped=!0},t.map(n=>i=>!i._stopped&&n&&n(i))}else return t}const zo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,_u=(e,t,l,n,i=!1,o,r,a,s)=>{t==="class"?iu(e,n,i):t==="style"?ru(e,l,n):$l(t)?bi(t)||hu(e,t,l,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bu(e,t,n,i))?cu(e,t,n,o,r,a,s):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),au(e,t,n,i))};function bu(e,t,l,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&zo(t)&&re(l));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return zo(t)&&ge(l)?!1:t in e}const yu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ku=(e,t)=>e._withKeys||(e._withKeys=l=>{if(!("key"in l))return;const n=Qt(l.key);if(t.some(i=>i===n||yu[i]===n))return e(l)}),xu=Ie({patchProp:_u},Zc);let Jn,Mo=!1;function Eu(){return Jn=Mo?Jn:Oc(xu),Mo=!0,Jn}const Cu=(...e)=>{const t=Eu().createApp(...e),{mount:l}=t;return t.mount=n=>{const i=Ru(n);if(i)return l(i,!0,i instanceof SVGElement)},t};function Ru(e){return ge(e)?document.querySelector(e):e}const Lu="modulepreload",wu=function(e){return"/YukiReflection/"+e},No={},b=function(t,l,n){let i=Promise.resolve();if(l&&l.length>0){const o=document.getElementsByTagName("link");i=Promise.all(l.map(r=>{if(r=wu(r),r in No)return;No[r]=!0;const a=r.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!n)for(let d=o.length-1;d>=0;d--){const h=o[d];if(h.href===r&&(!a||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":Lu,a||(u.as="script",u.crossOrigin=""),u.href=r,document.head.appendChild(u),a)return new Promise((d,h)=>{u.addEventListener("load",d),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${r}`)))})}))}return i.then(()=>t()).catch(o=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=o,window.dispatchEvent(r),!r.defaultPrevented)throw o})},Tu={"v-8daa1a0e":()=>b(()=>import("./index.html-jSt2tOGZ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-2d0a870d":()=>b(()=>import("./index.html-TK3hZBTT.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c0c85b84":()=>b(()=>import("./index.html-pjzas0AJ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-7a15fe3b":()=>b(()=>import("./about.html-esShpFQo.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-3f851d14":()=>b(()=>import("./changelog.html-P4l7oFKE.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-193cf592":()=>b(()=>import("./contacts.html-iNJWt8MD.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-ae7b83f2":()=>b(()=>import("./future.html-AGWEVq2N.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c557cfcc":()=>b(()=>import("./features.html-VU512ZaF.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-64fc7bb8":()=>b(()=>import("./home.html-s4QryDyD.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-9cfea7fc":()=>b(()=>import("./api-example.html-VAmv0BWX.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-72c12b7d":()=>b(()=>import("./api-exception.html-PveSaoT0.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-efb45d4c":()=>b(()=>import("./home.html-IgXFm8EJ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-72889797":()=>b(()=>import("./quick-start.html-QOp7B8w8.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-41967128":()=>b(()=>import("./about.html-a0D_ZdrJ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-0e6c3476":()=>b(()=>import("./changelog.html-2qAsS2UI.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-6cf86266":()=>b(()=>import("./contacts.html-0oJDLEja.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-3106ca14":()=>b(()=>import("./future.html-wqMG_3q5.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-47e315ee":()=>b(()=>import("./features.html-SzPF_JgZ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c8deafb2":()=>b(()=>import("./home.html-8Cjdx1AU.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c6114c9e":()=>b(()=>import("./api-example.html-9cblKm8X.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-5b43296c":()=>b(()=>import("./api-exception.html-jnFpFUq0.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-6a609e09":()=>b(()=>import("./home.html--XHi8faE.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-24840ff0":()=>b(()=>import("./quick-start.html-n1c0Zazn.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-23f4d2be":()=>b(()=>import("./YukiReflection.html-wyZOo9RJ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c088ede0":()=>b(()=>import("./YukiReflection.html-d5WSFYcp.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-47f17664":()=>b(()=>import("./CurrentClass.html-aIvFMoGD.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-38df33ac":()=>b(()=>import("./GenericClass.html--Lql8mDe.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-3a8666c0":()=>b(()=>import("./VariousClass.html-OGR6uO-Q.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-728f231c":()=>b(()=>import("./ReflectionFactory.html-NQiaTVE5.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-0f70fc50":()=>b(()=>import("./YLog.html-tEpiJE43.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-406687ff":()=>b(()=>import("./CurrentClass.html-sE3zJIrm.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c5831246":()=>b(()=>import("./GenericClass.html-TJqKXlog.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c234ac1e":()=>b(()=>import("./VariousClass.html-27EKagHz.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-b3841eba":()=>b(()=>import("./ReflectionFactory.html-fNUb_WhR.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-736d2dff":()=>b(()=>import("./YLog.html-OO_nxYSS.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-740d06da":()=>b(()=>import("./BaseFinder.html-72Iq-6f5.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-6d6cd473":()=>b(()=>import("./DexClassFinder.html-CuqfiW90.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-b3220076":()=>b(()=>import("./ConstructorFinder.html-WBhuluIb.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-4b907076":()=>b(()=>import("./FieldFinder.html-SCPPTVS5.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-012ee5a6":()=>b(()=>import("./MethodFinder.html-rrxJN8Pm.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-7f47f9f8":()=>b(()=>import("./ComponentTypeFactory.html-MSABhHlb.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-5a1019d6":()=>b(()=>import("./GraphicsTypeFactory.html-DXquzZdf.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-be0e3220":()=>b(()=>import("./ViewTypeFactory.html-BlJgDBiK.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-30e525ac":()=>b(()=>import("./DefinedTypeFactory.html-OIQVLnGM.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-12f074b0":()=>b(()=>import("./VariableTypeFactory.html-aKba1Svi.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c945cb6e":()=>b(()=>import("./BaseFinder.html-ALJEe03K.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-2d13d624":()=>b(()=>import("./DexClassFinder.html-UYJDQWR2.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-722cd474":()=>b(()=>import("./ConstructorFinder.html-_FNxdKVs.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-293ae898":()=>b(()=>import("./FieldFinder.html-zKtt89hV.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-155c9f97":()=>b(()=>import("./MethodFinder.html-F3Nq1ta1.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-6c58c435":()=>b(()=>import("./ComponentTypeFactory.html-986b1Uh7.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-25cdee85":()=>b(()=>import("./GraphicsTypeFactory.html-LLClnUt2.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-12826b1f":()=>b(()=>import("./ViewTypeFactory.html-tP76iwqq.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-597ac69b":()=>b(()=>import("./DefinedTypeFactory.html-mINnsZd9.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-5ad1133e":()=>b(()=>import("./VariableTypeFactory.html-z7CY3MNH.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-6f96d791":()=>b(()=>import("./CountRules.html-qumSB8gY.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-56071599":()=>b(()=>import("./ModifierRules.html-n9h96LhZ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-4ea9e766":()=>b(()=>import("./NameRules.html-jW6PpEoY.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-3045c7fe":()=>b(()=>import("./ObjectRules.html-eckIsmZq.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-cce2b7b6":()=>b(()=>import("./ConstructorRules.html-bV3tMIM8.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-82a85036":()=>b(()=>import("./FieldRules.html-J5ZPIA8O.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-71ecb893":()=>b(()=>import("./MemberRules.html-s0L0dO7U.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-5e7e121a":()=>b(()=>import("./MethodRules.html-wOHbNM4H.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-3dbf4880":()=>b(()=>import("./CountRules.html-ePjFzVT5.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-701721ec":()=>b(()=>import("./ModifierRules.html-w8NPlak8.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-264e7384":()=>b(()=>import("./NameRules.html-FTNuImB7.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-b0f7c49c":()=>b(()=>import("./ObjectRules.html-Nqx6ijx7.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-ec153654":()=>b(()=>import("./ConstructorRules.html-DYOYWZvf.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-30993156":()=>b(()=>import("./FieldRules.html-IMr78QcL.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-3daa8d42":()=>b(()=>import("./MemberRules.html-cNDASndV.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-2a3be6c9":()=>b(()=>import("./MethodRules.html-aSRU9IHr.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-4f47dfda":()=>b(()=>import("./MemberRulesResult.html-2SlL_c8V.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-503f5f8b":()=>b(()=>import("./MemberRulesResult.html-4XM5SrCj.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-3706649a":()=>b(()=>import("./404.html-6Yl8cQE3.js"),__vite__mapDeps([])).then(({data:e})=>e)},Au=JSON.parse('{"base":"/YukiReflection/","lang":"en-US","title":"Yuki Reflection","description":"An efficient Reflection API for Java and Android built in Kotlin","head":[["link",{"rel":"icon","href":"/YukiReflection/images/logo.png"}]],"locales":{"/en/":{"lang":"en-US","description":"An efficient Reflection API for Java and Android built in Kotlin"},"/zh-cn/":{"lang":"zh-CN","description":"一个使用 Kotlin 构建的用于 Java 和 Android 平台高效反射 API"}}}');var Pu=([e,t,l])=>e==="meta"&&t.name?`${e}.${t.name}`:["title","base"].includes(e)?e:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,t,l]),Ou=e=>{const t=new Set,l=[];return e.forEach(n=>{const i=Pu(n);t.has(i)||(t.add(i),l.push(n))}),l},Yl=e=>/^(https?:)?\/\//.test(e),Iu=e=>/^[a-z][a-z0-9+.-]*:/.test(e),$i=e=>Object.prototype.toString.call(e)==="[object Object]",ds=e=>e[e.length-1]==="/"?e.slice(0,-1):e,hs=e=>e[0]==="/"?e.slice(1):e,fs=(e,t)=>{const l=Object.keys(e).sort((n,i)=>{const o=i.split("/").length-n.split("/").length;return o!==0?o:i.length-n.length});for(const n of l)if(t.startsWith(n))return n;return"/"};const ms={"v-8daa1a0e":H(()=>b(()=>import("./index.html-OaTtftmv.js"),__vite__mapDeps([]))),"v-2d0a870d":H(()=>b(()=>import("./index.html-seflpP7l.js"),__vite__mapDeps([]))),"v-c0c85b84":H(()=>b(()=>import("./index.html-QcMSdla7.js"),__vite__mapDeps([]))),"v-7a15fe3b":H(()=>b(()=>import("./about.html-nADqWWz2.js"),__vite__mapDeps([]))),"v-3f851d14":H(()=>b(()=>import("./changelog.html-W-b8mvsm.js"),__vite__mapDeps([]))),"v-193cf592":H(()=>b(()=>import("./contacts.html-C8LAv6xu.js"),__vite__mapDeps([]))),"v-ae7b83f2":H(()=>b(()=>import("./future.html-ejs_q7b1.js"),__vite__mapDeps([]))),"v-c557cfcc":H(()=>b(()=>import("./features.html-UPAlRPRa.js"),__vite__mapDeps([]))),"v-64fc7bb8":H(()=>b(()=>import("./home.html-CFF_AMaM.js"),__vite__mapDeps([]))),"v-9cfea7fc":H(()=>b(()=>import("./api-example.html-X3fvd5da.js"),__vite__mapDeps([]))),"v-72c12b7d":H(()=>b(()=>import("./api-exception.html-ngpL7qd8.js"),__vite__mapDeps([]))),"v-efb45d4c":H(()=>b(()=>import("./home.html-eQwepd-K.js"),__vite__mapDeps([]))),"v-72889797":H(()=>b(()=>import("./quick-start.html-uujte6L-.js"),__vite__mapDeps([]))),"v-41967128":H(()=>b(()=>import("./about.html--vPvG7gm.js"),__vite__mapDeps([]))),"v-0e6c3476":H(()=>b(()=>import("./changelog.html-rt4TZTG3.js"),__vite__mapDeps([]))),"v-6cf86266":H(()=>b(()=>import("./contacts.html-6Q6LT5CM.js"),__vite__mapDeps([]))),"v-3106ca14":H(()=>b(()=>import("./future.html-qjL5dEhQ.js"),__vite__mapDeps([]))),"v-47e315ee":H(()=>b(()=>import("./features.html-tu9AQPUC.js"),__vite__mapDeps([]))),"v-c8deafb2":H(()=>b(()=>import("./home.html-MnXIMn-y.js"),__vite__mapDeps([]))),"v-c6114c9e":H(()=>b(()=>import("./api-example.html-4yu62_kW.js"),__vite__mapDeps([]))),"v-5b43296c":H(()=>b(()=>import("./api-exception.html-AQNocG1O.js"),__vite__mapDeps([]))),"v-6a609e09":H(()=>b(()=>import("./home.html-Y4O_zhtP.js"),__vite__mapDeps([]))),"v-24840ff0":H(()=>b(()=>import("./quick-start.html-EP-s2HU3.js"),__vite__mapDeps([]))),"v-23f4d2be":H(()=>b(()=>import("./YukiReflection.html-9kfBlewr.js"),__vite__mapDeps([]))),"v-c088ede0":H(()=>b(()=>import("./YukiReflection.html-N0eAU_3r.js"),__vite__mapDeps([]))),"v-47f17664":H(()=>b(()=>import("./CurrentClass.html-ZCLUCXCq.js"),__vite__mapDeps([]))),"v-38df33ac":H(()=>b(()=>import("./GenericClass.html-hROzteRj.js"),__vite__mapDeps([]))),"v-3a8666c0":H(()=>b(()=>import("./VariousClass.html-lYu6ahQy.js"),__vite__mapDeps([]))),"v-728f231c":H(()=>b(()=>import("./ReflectionFactory.html-e_EIy99E.js"),__vite__mapDeps([]))),"v-0f70fc50":H(()=>b(()=>import("./YLog.html-BiSru-dl.js"),__vite__mapDeps([]))),"v-406687ff":H(()=>b(()=>import("./CurrentClass.html-iDLdKTRl.js"),__vite__mapDeps([]))),"v-c5831246":H(()=>b(()=>import("./GenericClass.html-VZQ2Br0U.js"),__vite__mapDeps([]))),"v-c234ac1e":H(()=>b(()=>import("./VariousClass.html-N1_WPt67.js"),__vite__mapDeps([]))),"v-b3841eba":H(()=>b(()=>import("./ReflectionFactory.html-4bon6h3y.js"),__vite__mapDeps([]))),"v-736d2dff":H(()=>b(()=>import("./YLog.html-HMp0r_nP.js"),__vite__mapDeps([]))),"v-740d06da":H(()=>b(()=>import("./BaseFinder.html-DcynkNRV.js"),__vite__mapDeps([]))),"v-6d6cd473":H(()=>b(()=>import("./DexClassFinder.html-oDUXm983.js"),__vite__mapDeps([]))),"v-b3220076":H(()=>b(()=>import("./ConstructorFinder.html-HZlOD583.js"),__vite__mapDeps([]))),"v-4b907076":H(()=>b(()=>import("./FieldFinder.html-CaQR3qZR.js"),__vite__mapDeps([]))),"v-012ee5a6":H(()=>b(()=>import("./MethodFinder.html-9zE4fEos.js"),__vite__mapDeps([]))),"v-7f47f9f8":H(()=>b(()=>import("./ComponentTypeFactory.html-FeM6EBQs.js"),__vite__mapDeps([]))),"v-5a1019d6":H(()=>b(()=>import("./GraphicsTypeFactory.html-DptpdaTU.js"),__vite__mapDeps([]))),"v-be0e3220":H(()=>b(()=>import("./ViewTypeFactory.html-a4OWMkml.js"),__vite__mapDeps([]))),"v-30e525ac":H(()=>b(()=>import("./DefinedTypeFactory.html-IT5sdpCR.js"),__vite__mapDeps([]))),"v-12f074b0":H(()=>b(()=>import("./VariableTypeFactory.html-L20wMFG_.js"),__vite__mapDeps([]))),"v-c945cb6e":H(()=>b(()=>import("./BaseFinder.html-bAM0SzKR.js"),__vite__mapDeps([]))),"v-2d13d624":H(()=>b(()=>import("./DexClassFinder.html-tnGJIsCX.js"),__vite__mapDeps([]))),"v-722cd474":H(()=>b(()=>import("./ConstructorFinder.html-SqtdCIul.js"),__vite__mapDeps([]))),"v-293ae898":H(()=>b(()=>import("./FieldFinder.html-_oWPO7Eh.js"),__vite__mapDeps([]))),"v-155c9f97":H(()=>b(()=>import("./MethodFinder.html-dHpCygp2.js"),__vite__mapDeps([]))),"v-6c58c435":H(()=>b(()=>import("./ComponentTypeFactory.html-Wy4oe3qj.js"),__vite__mapDeps([]))),"v-25cdee85":H(()=>b(()=>import("./GraphicsTypeFactory.html-xL-hvwWg.js"),__vite__mapDeps([]))),"v-12826b1f":H(()=>b(()=>import("./ViewTypeFactory.html-0slISbaY.js"),__vite__mapDeps([]))),"v-597ac69b":H(()=>b(()=>import("./DefinedTypeFactory.html-EYV1yl_b.js"),__vite__mapDeps([]))),"v-5ad1133e":H(()=>b(()=>import("./VariableTypeFactory.html-vuqEkE15.js"),__vite__mapDeps([]))),"v-6f96d791":H(()=>b(()=>import("./CountRules.html-oJp6KY1O.js"),__vite__mapDeps([]))),"v-56071599":H(()=>b(()=>import("./ModifierRules.html-EHCxf6eb.js"),__vite__mapDeps([]))),"v-4ea9e766":H(()=>b(()=>import("./NameRules.html-6iq8oL-B.js"),__vite__mapDeps([]))),"v-3045c7fe":H(()=>b(()=>import("./ObjectRules.html-EZNQwBuT.js"),__vite__mapDeps([]))),"v-cce2b7b6":H(()=>b(()=>import("./ConstructorRules.html-HoOS6Lpr.js"),__vite__mapDeps([]))),"v-82a85036":H(()=>b(()=>import("./FieldRules.html-tbZ9y4HH.js"),__vite__mapDeps([]))),"v-71ecb893":H(()=>b(()=>import("./MemberRules.html-wPy0xHct.js"),__vite__mapDeps([]))),"v-5e7e121a":H(()=>b(()=>import("./MethodRules.html-0hkKQ1Lm.js"),__vite__mapDeps([]))),"v-3dbf4880":H(()=>b(()=>import("./CountRules.html-z8W_vwvZ.js"),__vite__mapDeps([]))),"v-701721ec":H(()=>b(()=>import("./ModifierRules.html-4vu7ZiXc.js"),__vite__mapDeps([]))),"v-264e7384":H(()=>b(()=>import("./NameRules.html-9btOATID.js"),__vite__mapDeps([]))),"v-b0f7c49c":H(()=>b(()=>import("./ObjectRules.html-qlYFsawY.js"),__vite__mapDeps([]))),"v-ec153654":H(()=>b(()=>import("./ConstructorRules.html-b9arB2u-.js"),__vite__mapDeps([]))),"v-30993156":H(()=>b(()=>import("./FieldRules.html-m_-yonQY.js"),__vite__mapDeps([]))),"v-3daa8d42":H(()=>b(()=>import("./MemberRules.html-1gLEBvW8.js"),__vite__mapDeps([]))),"v-2a3be6c9":H(()=>b(()=>import("./MethodRules.html-SViWQxO9.js"),__vite__mapDeps([]))),"v-4f47dfda":H(()=>b(()=>import("./MemberRulesResult.html-rcTdNW24.js"),__vite__mapDeps([]))),"v-503f5f8b":H(()=>b(()=>import("./MemberRulesResult.html-N7SQp4D9.js"),__vite__mapDeps([]))),"v-3706649a":H(()=>b(()=>import("./404.html-GYBVbwsB.js"),__vite__mapDeps([])))};var Su=Symbol(""),ps=Symbol(""),Fu=jl({key:"",path:"",title:"",lang:"",frontmatter:{},headers:[]}),Gt=()=>{const e=we(ps);if(!e)throw new Error("pageData() is called without provider.");return e},gs=Symbol(""),_t=()=>{const e=we(gs);if(!e)throw new Error("usePageFrontmatter() is called without provider.");return e},vs=Symbol(""),Du=()=>{const e=we(vs);if(!e)throw new Error("usePageHead() is called without provider.");return e},zu=Symbol(""),_s=Symbol(""),Mu=()=>{const e=we(_s);if(!e)throw new Error("usePageLang() is called without provider.");return e},bs=Symbol(""),Nu=()=>{const e=we(bs);if(!e)throw new Error("usePageLayout() is called without provider.");return e},$u=_e(Tu),Vi=Symbol(""),Gl=()=>{const e=we(Vi);if(!e)throw new Error("useRouteLocale() is called without provider.");return e},nl=_e(Au),ys=()=>nl,ks=Symbol(""),Hi=()=>{const e=we(ks);if(!e)throw new Error("useSiteLocaleData() is called without provider.");return e},Vu=Symbol(""),Hu="Layout",ju="NotFound",mt=Hl({resolveLayouts:e=>e.reduce((t,l)=>({...t,...l.layouts}),{}),resolvePageData:async e=>{const t=$u.value[e];return await(t==null?void 0:t())??Fu},resolvePageFrontmatter:e=>e.frontmatter,resolvePageHead:(e,t,l)=>{const n=ge(t.description)?t.description:l.description,i=[...te(t.head)?t.head:[],...l.head,["title",{},e],["meta",{name:"description",content:n}]];return Ou(i)},resolvePageHeadTitle:(e,t)=>[e.title,t.title].filter(l=>!!l).join(" | "),resolvePageLang:(e,t)=>e.lang||t.lang||"en-US",resolvePageLayout:(e,t)=>{let l;if(e.path){const n=e.frontmatter.layout;ge(n)?l=n:l=Hu}else l=ju;return t[l]},resolveRouteLocale:(e,t)=>fs(e,t),resolveSiteLocaleData:(e,t)=>({...e,...e.locales[t]})}),ji=he({name:"ClientOnly",setup(e,t){const l=_e(!1);return He(()=>{l.value=!0}),()=>{var n,i;return l.value?(i=(n=t.slots).default)==null?void 0:i.call(n):null}}}),Bu=he({name:"Content",props:{pageKey:{type:String,required:!1,default:""}},setup(e){const t=Gt(),l=U(()=>ms[e.pageKey||t.value.key]);return()=>l.value?ce(l.value):ce("div","404 Not Found")}}),xt=(e={})=>e,Bi=e=>Yl(e)?e:`/YukiReflection/${hs(e)}`;function xs(e,t,l){var n,i,o;t===void 0&&(t=50),l===void 0&&(l={});var r=(n=l.isImmediate)!=null&&n,a=(i=l.callback)!=null&&i,s=l.maxWait,c=Date.now(),u=[];function d(){if(s!==void 0){var p=Date.now()-c;if(p+t>=s)return s-p}return t}var h=function(){var p=[].slice.call(arguments),k=this;return new Promise(function(E,L){var A=r&&o===void 0;if(o!==void 0&&clearTimeout(o),o=setTimeout(function(){if(o=void 0,c=Date.now(),!r){var v=e.apply(k,p);a&&a(v),u.forEach(function(y){return(0,y.resolve)(v)}),u=[]}},d()),A){var T=e.apply(k,p);return a&&a(T),E(T)}u.push({resolve:E,reject:L})})};return h.cancel=function(p){o!==void 0&&clearTimeout(o),u.forEach(function(k){return(0,k.reject)(p)}),u=[]},h}/*! + * vue-router v4.2.5 + * (c) 2023 Eduardo San Martin Morote + * @license MIT + */const ll=typeof window<"u";function Uu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ve=Object.assign;function Qn(e,t){const l={};for(const n in t){const i=t[n];l[n]=rt(i)?i.map(e):e(i)}return l}const Pl=()=>{},rt=Array.isArray,qu=/\/$/,Ku=e=>e.replace(qu,"");function Zn(e,t,l="/"){let n,i={},o="",r="";const a=t.indexOf("#");let s=t.indexOf("?");return a=0&&(s=-1),s>-1&&(n=t.slice(0,s),o=t.slice(s+1,a>-1?a:t.length),i=e(o)),a>-1&&(n=n||t.slice(0,a),r=t.slice(a,t.length)),n=Ju(n??t,l),{fullPath:n+(o&&"?")+o+r,path:n,query:i,hash:r}}function Wu(e,t){const l=t.query?e(t.query):"";return t.path+(l&&"?")+l+(t.hash||"")}function $o(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Yu(e,t,l){const n=t.matched.length-1,i=l.matched.length-1;return n>-1&&n===i&&fl(t.matched[n],l.matched[i])&&Es(t.params,l.params)&&e(t.query)===e(l.query)&&t.hash===l.hash}function fl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Es(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const l in e)if(!Gu(e[l],t[l]))return!1;return!0}function Gu(e,t){return rt(e)?Vo(e,t):rt(t)?Vo(t,e):e===t}function Vo(e,t){return rt(t)?e.length===t.length&&e.every((l,n)=>l===t[n]):e.length===1&&e[0]===t}function Ju(e,t){if(e.startsWith("/"))return e;if(!e)return t;const l=t.split("/"),n=e.split("/"),i=n[n.length-1];(i===".."||i===".")&&n.push("");let o=l.length-1,r,a;for(r=0;r1&&o--;else break;return l.slice(0,o).join("/")+"/"+n.slice(r-(r===n.length?1:0)).join("/")}var Ml;(function(e){e.pop="pop",e.push="push"})(Ml||(Ml={}));var Ol;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ol||(Ol={}));function Qu(e){if(!e)if(ll){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ku(e)}const Zu=/^[^#]+#/;function Xu(e,t){return e.replace(Zu,"#")+t}function ed(e,t){const l=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-l.left-(t.left||0),top:n.top-l.top-(t.top||0)}}const Nn=()=>({left:window.pageXOffset,top:window.pageYOffset});function td(e){let t;if("el"in e){const l=e.el,n=typeof l=="string"&&l.startsWith("#"),i=typeof l=="string"?n?document.getElementById(l.slice(1)):document.querySelector(l):l;if(!i)return;t=ed(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Ho(e,t){return(history.state?history.state.position-t:-1)+e}const pi=new Map;function ld(e,t){pi.set(e,t)}function nd(e){const t=pi.get(e);return pi.delete(e),t}let id=()=>location.protocol+"//"+location.host;function Cs(e,t){const{pathname:l,search:n,hash:i}=t,o=e.indexOf("#");if(o>-1){let a=i.includes(e.slice(o))?e.slice(o).length:1,s=i.slice(a);return s[0]!=="/"&&(s="/"+s),$o(s,"")}return $o(l,e)+n+i}function od(e,t,l,n){let i=[],o=[],r=null;const a=({state:h})=>{const p=Cs(e,location),k=l.value,E=t.value;let L=0;if(h){if(l.value=p,t.value=h,r&&r===k){r=null;return}L=E?h.position-E.position:0}else n(p);i.forEach(A=>{A(l.value,k,{delta:L,type:Ml.pop,direction:L?L>0?Ol.forward:Ol.back:Ol.unknown})})};function s(){r=l.value}function c(h){i.push(h);const p=()=>{const k=i.indexOf(h);k>-1&&i.splice(k,1)};return o.push(p),p}function u(){const{history:h}=window;h.state&&h.replaceState(ve({},h.state,{scroll:Nn()}),"")}function d(){for(const h of o)h();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:s,listen:c,destroy:d}}function jo(e,t,l,n=!1,i=!1){return{back:e,current:t,forward:l,replaced:n,position:window.history.length,scroll:i?Nn():null}}function rd(e){const{history:t,location:l}=window,n={value:Cs(e,l)},i={value:t.state};i.value||o(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(s,c,u){const d=e.indexOf("#"),h=d>-1?(l.host&&document.querySelector("base")?e:e.slice(d))+s:id()+e+s;try{t[u?"replaceState":"pushState"](c,"",h),i.value=c}catch(p){console.error(p),l[u?"replace":"assign"](h)}}function r(s,c){const u=ve({},t.state,jo(i.value.back,s,i.value.forward,!0),c,{position:i.value.position});o(s,u,!0),n.value=s}function a(s,c){const u=ve({},i.value,t.state,{forward:s,scroll:Nn()});o(u.current,u,!0);const d=ve({},jo(n.value,s,null),{position:u.position+1},c);o(s,d,!1),n.value=s}return{location:n,state:i,push:a,replace:r}}function sd(e){e=Qu(e);const t=rd(e),l=od(e,t.state,t.location,t.replace);function n(o,r=!0){r||l.pauseListeners(),history.go(o)}const i=ve({location:"",base:e,go:n,createHref:Xu.bind(null,e)},t,l);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function ad(e){return typeof e=="string"||e&&typeof e=="object"}function Rs(e){return typeof e=="string"||typeof e=="symbol"}const pt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Ls=Symbol("");var Bo;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Bo||(Bo={}));function ml(e,t){return ve(new Error,{type:e,[Ls]:!0},t)}function ft(e,t){return e instanceof Error&&Ls in e&&(t==null||!!(e.type&t))}const Uo="[^/]+?",cd={sensitive:!1,strict:!1,start:!0,end:!0},ud=/[.+*?^${}()[\]/\\]/g;function dd(e,t){const l=ve({},cd,t),n=[];let i=l.start?"^":"";const o=[];for(const c of e){const u=c.length?[]:[90];l.strict&&!c.length&&(i+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function fd(e,t){let l=0;const n=e.score,i=t.score;for(;l0&&t[t.length-1]<0}const md={type:0,value:""},pd=/[a-zA-Z0-9_]/;function gd(e){if(!e)return[[]];if(e==="/")return[[md]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${l})/"${c}": ${p}`)}let l=0,n=l;const i=[];let o;function r(){o&&i.push(o),o=[]}let a=0,s,c="",u="";function d(){c&&(l===0?o.push({type:0,value:c}):l===1||l===2||l===3?(o.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),c="")}function h(){c+=s}for(;a{r(T)}:Pl}function r(u){if(Rs(u)){const d=n.get(u);d&&(n.delete(u),l.splice(l.indexOf(d),1),d.children.forEach(r),d.alias.forEach(r))}else{const d=l.indexOf(u);d>-1&&(l.splice(d,1),u.record.name&&n.delete(u.record.name),u.children.forEach(r),u.alias.forEach(r))}}function a(){return l}function s(u){let d=0;for(;d=0&&(u.record.path!==l[d].record.path||!ws(u,l[d]));)d++;l.splice(d,0,u),u.record.name&&!Wo(u)&&n.set(u.record.name,u)}function c(u,d){let h,p={},k,E;if("name"in u&&u.name){if(h=n.get(u.name),!h)throw ml(1,{location:u});E=h.record.name,p=ve(Ko(d.params,h.keys.filter(T=>!T.optional).map(T=>T.name)),u.params&&Ko(u.params,h.keys.map(T=>T.name))),k=h.stringify(p)}else if("path"in u)k=u.path,h=l.find(T=>T.re.test(k)),h&&(p=h.parse(k),E=h.record.name);else{if(h=d.name?n.get(d.name):l.find(T=>T.re.test(d.path)),!h)throw ml(1,{location:u,currentLocation:d});E=h.record.name,p=ve({},d.params,u.params),k=h.stringify(p)}const L=[];let A=h;for(;A;)L.unshift(A.record),A=A.parent;return{name:E,path:k,params:p,matched:L,meta:kd(L)}}return e.forEach(u=>o(u)),{addRoute:o,resolve:c,removeRoute:r,getRoutes:a,getRecordMatcher:i}}function Ko(e,t){const l={};for(const n of t)n in e&&(l[n]=e[n]);return l}function bd(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:yd(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function yd(e){const t={},l=e.props||!1;if("component"in e)t.default=l;else for(const n in e.components)t[n]=typeof l=="object"?l[n]:l;return t}function Wo(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function kd(e){return e.reduce((t,l)=>ve(t,l.meta),{})}function Yo(e,t){const l={};for(const n in e)l[n]=n in t?t[n]:e[n];return l}function ws(e,t){return t.children.some(l=>l===e||ws(e,l))}const Ts=/#/g,xd=/&/g,Ed=/\//g,Cd=/=/g,Rd=/\?/g,As=/\+/g,Ld=/%5B/g,wd=/%5D/g,Ps=/%5E/g,Td=/%60/g,Os=/%7B/g,Ad=/%7C/g,Is=/%7D/g,Pd=/%20/g;function Ui(e){return encodeURI(""+e).replace(Ad,"|").replace(Ld,"[").replace(wd,"]")}function Od(e){return Ui(e).replace(Os,"{").replace(Is,"}").replace(Ps,"^")}function gi(e){return Ui(e).replace(As,"%2B").replace(Pd,"+").replace(Ts,"%23").replace(xd,"%26").replace(Td,"`").replace(Os,"{").replace(Is,"}").replace(Ps,"^")}function Id(e){return gi(e).replace(Cd,"%3D")}function Sd(e){return Ui(e).replace(Ts,"%23").replace(Rd,"%3F")}function Fd(e){return e==null?"":Sd(e).replace(Ed,"%2F")}function Cn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Dd(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;io&&gi(o)):[n&&gi(n)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+l,o!=null&&(t+="="+o))})}return t}function zd(e){const t={};for(const l in e){const n=e[l];n!==void 0&&(t[l]=rt(n)?n.map(i=>i==null?null:""+i):n==null?n:""+n)}return t}const Md=Symbol(""),Jo=Symbol(""),$n=Symbol(""),qi=Symbol(""),vi=Symbol("");function xl(){let e=[];function t(n){return e.push(n),()=>{const i=e.indexOf(n);i>-1&&e.splice(i,1)}}function l(){e=[]}return{add:t,list:()=>e.slice(),reset:l}}function Ot(e,t,l,n,i){const o=n&&(n.enterCallbacks[i]=n.enterCallbacks[i]||[]);return()=>new Promise((r,a)=>{const s=d=>{d===!1?a(ml(4,{from:l,to:t})):d instanceof Error?a(d):ad(d)?a(ml(2,{from:t,to:d})):(o&&n.enterCallbacks[i]===o&&typeof d=="function"&&o.push(d),r())},c=e.call(n&&n.instances[i],t,l,s);let u=Promise.resolve(c);e.length<3&&(u=u.then(s)),u.catch(d=>a(d))})}function Xn(e,t,l,n){const i=[];for(const o of e)for(const r in o.components){let a=o.components[r];if(!(t!=="beforeRouteEnter"&&!o.instances[r]))if(Nd(a)){const c=(a.__vccOpts||a)[t];c&&i.push(Ot(c,l,n,o,r))}else{let s=a();i.push(()=>s.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${r}" at "${o.path}"`));const u=Uu(c)?c.default:c;o.components[r]=u;const h=(u.__vccOpts||u)[t];return h&&Ot(h,l,n,o,r)()}))}}return i}function Nd(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Qo(e){const t=we($n),l=we(qi),n=U(()=>t.resolve(le(e.to))),i=U(()=>{const{matched:s}=n.value,{length:c}=s,u=s[c-1],d=l.matched;if(!u||!d.length)return-1;const h=d.findIndex(fl.bind(null,u));if(h>-1)return h;const p=Zo(s[c-2]);return c>1&&Zo(u)===p&&d[d.length-1].path!==p?d.findIndex(fl.bind(null,s[c-2])):h}),o=U(()=>i.value>-1&&jd(l.params,n.value.params)),r=U(()=>i.value>-1&&i.value===l.matched.length-1&&Es(l.params,n.value.params));function a(s={}){return Hd(s)?t[le(e.replace)?"replace":"push"](le(e.to)).catch(Pl):Promise.resolve()}return{route:n,href:U(()=>n.value.href),isActive:o,isExactActive:r,navigate:a}}const $d=he({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Qo,setup(e,{slots:t}){const l=Hl(Qo(e)),{options:n}=we($n),i=U(()=>({[Xo(e.activeClass,n.linkActiveClass,"router-link-active")]:l.isActive,[Xo(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:l.isExactActive}));return()=>{const o=t.default&&t.default(l);return e.custom?o:ce("a",{"aria-current":l.isExactActive?e.ariaCurrentValue:null,href:l.href,onClick:l.navigate,class:i.value},o)}}}),Vd=$d;function Hd(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function jd(e,t){for(const l in t){const n=t[l],i=e[l];if(typeof n=="string"){if(n!==i)return!1}else if(!rt(i)||i.length!==n.length||n.some((o,r)=>o!==i[r]))return!1}return!0}function Zo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Xo=(e,t,l)=>e??t??l,Bd=he({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:l}){const n=we(vi),i=U(()=>e.route||n.value),o=we(Jo,0),r=U(()=>{let c=le(o);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=U(()=>i.value.matched[r.value]);Wt(Jo,U(()=>r.value+1)),Wt(Md,a),Wt(vi,i);const s=_e();return We(()=>[s.value,a.value,e.name],([c,u,d],[h,p,k])=>{u&&(u.instances[d]=c,p&&p!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),c&&u&&(!p||!fl(u,p)||!h)&&(u.enterCallbacks[d]||[]).forEach(E=>E(c))},{flush:"post"}),()=>{const c=i.value,u=e.name,d=a.value,h=d&&d.components[u];if(!h)return er(l.default,{Component:h,route:c});const p=d.props[u],k=p?p===!0?c.params:typeof p=="function"?p(c):p:null,L=ce(h,ve({},k,t,{onVnodeUnmounted:A=>{A.component.isUnmounted&&(d.instances[u]=null)},ref:s}));return er(l.default,{Component:L,route:c})||L}}});function er(e,t){if(!e)return null;const l=e(t);return l.length===1?l[0]:l}const Ss=Bd;function Ud(e){const t=_d(e.routes,e),l=e.parseQuery||Dd,n=e.stringifyQuery||Go,i=e.history,o=xl(),r=xl(),a=xl(),s=Pi(pt);let c=pt;ll&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Qn.bind(null,R=>""+R),d=Qn.bind(null,Fd),h=Qn.bind(null,Cn);function p(R,q){let N,J;return Rs(R)?(N=t.getRecordMatcher(R),J=q):J=R,t.addRoute(J,N)}function k(R){const q=t.getRecordMatcher(R);q&&t.removeRoute(q)}function E(){return t.getRoutes().map(R=>R.record)}function L(R){return!!t.getRecordMatcher(R)}function A(R,q){if(q=ve({},q||s.value),typeof R=="string"){const g=Zn(l,R,q.path),x=t.resolve({path:g.path},q),w=i.createHref(g.fullPath);return ve(g,x,{params:h(x.params),hash:Cn(g.hash),redirectedFrom:void 0,href:w})}let N;if("path"in R)N=ve({},R,{path:Zn(l,R.path,q.path).path});else{const g=ve({},R.params);for(const x in g)g[x]==null&&delete g[x];N=ve({},R,{params:d(g)}),q.params=d(q.params)}const J=t.resolve(N,q),de=R.hash||"";J.params=u(h(J.params));const f=Wu(n,ve({},R,{hash:Od(de),path:J.path})),m=i.createHref(f);return ve({fullPath:f,hash:de,query:n===Go?zd(R.query):R.query||{}},J,{redirectedFrom:void 0,href:m})}function T(R){return typeof R=="string"?Zn(l,R,s.value.path):ve({},R)}function v(R,q){if(c!==R)return ml(8,{from:q,to:R})}function y(R){return M(R)}function V(R){return y(ve(T(R),{replace:!0}))}function Y(R){const q=R.matched[R.matched.length-1];if(q&&q.redirect){const{redirect:N}=q;let J=typeof N=="function"?N(R):N;return typeof J=="string"&&(J=J.includes("?")||J.includes("#")?J=T(J):{path:J},J.params={}),ve({query:R.query,hash:R.hash,params:"path"in J?{}:R.params},J)}}function M(R,q){const N=c=A(R),J=s.value,de=R.state,f=R.force,m=R.replace===!0,g=Y(N);if(g)return M(ve(T(g),{state:typeof g=="object"?ve({},de,g.state):de,force:f,replace:m}),q||N);const x=N;x.redirectedFrom=q;let w;return!f&&Yu(n,J,N)&&(w=ml(16,{to:x,from:J}),Ue(J,J,!0,!1)),(w?Promise.resolve(w):O(x,J)).catch(P=>ft(P)?ft(P,2)?P:De(P):K(P,x,J)).then(P=>{if(P){if(ft(P,2))return M(ve({replace:m},T(P.to),{state:typeof P.to=="object"?ve({},de,P.to.state):de,force:f}),q||x)}else P=C(x,J,!0,m,de);return W(x,J,P),P})}function _(R,q){const N=v(R,q);return N?Promise.reject(N):Promise.resolve()}function F(R){const q=Ct.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(R):R()}function O(R,q){let N;const[J,de,f]=qd(R,q);N=Xn(J.reverse(),"beforeRouteLeave",R,q);for(const g of J)g.leaveGuards.forEach(x=>{N.push(Ot(x,R,q))});const m=_.bind(null,R,q);return N.push(m),Fe(N).then(()=>{N=[];for(const g of o.list())N.push(Ot(g,R,q));return N.push(m),Fe(N)}).then(()=>{N=Xn(de,"beforeRouteUpdate",R,q);for(const g of de)g.updateGuards.forEach(x=>{N.push(Ot(x,R,q))});return N.push(m),Fe(N)}).then(()=>{N=[];for(const g of f)if(g.beforeEnter)if(rt(g.beforeEnter))for(const x of g.beforeEnter)N.push(Ot(x,R,q));else N.push(Ot(g.beforeEnter,R,q));return N.push(m),Fe(N)}).then(()=>(R.matched.forEach(g=>g.enterCallbacks={}),N=Xn(f,"beforeRouteEnter",R,q),N.push(m),Fe(N))).then(()=>{N=[];for(const g of r.list())N.push(Ot(g,R,q));return N.push(m),Fe(N)}).catch(g=>ft(g,8)?g:Promise.reject(g))}function W(R,q,N){a.list().forEach(J=>F(()=>J(R,q,N)))}function C(R,q,N,J,de){const f=v(R,q);if(f)return f;const m=q===pt,g=ll?history.state:{};N&&(J||m?i.replace(R.fullPath,ve({scroll:m&&g&&g.scroll},de)):i.push(R.fullPath,de)),s.value=R,Ue(R,q,N,m),De()}let z;function ne(){z||(z=i.listen((R,q,N)=>{if(!st.listening)return;const J=A(R),de=Y(J);if(de){M(ve(de,{replace:!0}),J).catch(Pl);return}c=J;const f=s.value;ll&&ld(Ho(f.fullPath,N.delta),Nn()),O(J,f).catch(m=>ft(m,12)?m:ft(m,2)?(M(m.to,J).then(g=>{ft(g,20)&&!N.delta&&N.type===Ml.pop&&i.go(-1,!1)}).catch(Pl),Promise.reject()):(N.delta&&i.go(-N.delta,!1),K(m,J,f))).then(m=>{m=m||C(J,f,!1),m&&(N.delta&&!ft(m,8)?i.go(-N.delta,!1):N.type===Ml.pop&&ft(m,20)&&i.go(-1,!1)),W(J,f,m)}).catch(Pl)}))}let se=xl(),S=xl(),Q;function K(R,q,N){De(R);const J=S.list();return J.length?J.forEach(de=>de(R,q,N)):console.error(R),Promise.reject(R)}function Se(){return Q&&s.value!==pt?Promise.resolve():new Promise((R,q)=>{se.add([R,q])})}function De(R){return Q||(Q=!R,ne(),se.list().forEach(([q,N])=>R?N(R):q()),se.reset()),R}function Ue(R,q,N,J){const{scrollBehavior:de}=e;if(!ll||!de)return Promise.resolve();const f=!N&&nd(Ho(R.fullPath,0))||(J||!N)&&history.state&&history.state.scroll||null;return Ul().then(()=>de(R,q,f)).then(m=>m&&td(m)).catch(m=>K(m,R,q))}const Ne=R=>i.go(R);let Et;const Ct=new Set,st={currentRoute:s,listening:!0,addRoute:p,removeRoute:k,hasRoute:L,getRoutes:E,resolve:A,options:e,push:y,replace:V,go:Ne,back:()=>Ne(-1),forward:()=>Ne(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:S.add,isReady:Se,install(R){const q=this;R.component("RouterLink",Vd),R.component("RouterView",Ss),R.config.globalProperties.$router=q,Object.defineProperty(R.config.globalProperties,"$route",{enumerable:!0,get:()=>le(s)}),ll&&!Et&&s.value===pt&&(Et=!0,y(i.location).catch(de=>{}));const N={};for(const de in pt)Object.defineProperty(N,de,{get:()=>s.value[de],enumerable:!0});R.provide($n,q),R.provide(qi,Sr(N)),R.provide(vi,s);const J=R.unmount;Ct.add(R),R.unmount=function(){Ct.delete(R),Ct.size<1&&(c=pt,z&&z(),z=null,s.value=pt,Et=!1,Q=!1),J()}}};function Fe(R){return R.reduce((q,N)=>q.then(()=>F(N)),Promise.resolve())}return st}function qd(e,t){const l=[],n=[],i=[],o=Math.max(t.matched.length,e.matched.length);for(let r=0;rfl(c,a))?n.push(a):l.push(a));const s=e.matched[r];s&&(t.matched.find(c=>fl(c,s))||i.push(s))}return[l,n,i]}function Zt(){return we($n)}function Mt(){return we(qi)}const Kd=({headerLinkSelector:e,headerAnchorSelector:t,delay:l,offset:n=5})=>{const i=Zt(),r=xs(()=>{var E,L;const a=Math.max(window.scrollY,document.documentElement.scrollTop,document.body.scrollTop);if(Math.abs(a-0)h.some(T=>T.hash===A.hash));for(let A=0;A=(((E=T.parentElement)==null?void 0:E.offsetTop)??0)-n,V=!v||a<(((L=v.parentElement)==null?void 0:L.offsetTop)??0)-n;if(!(y&&V))continue;const M=decodeURIComponent(i.currentRoute.value.hash),_=decodeURIComponent(T.hash);if(M===_)return;if(d){for(let F=A+1;F{window.addEventListener("scroll",r)}),Kl(()=>{window.removeEventListener("scroll",r)})},tr=async(e,t)=>{const{scrollBehavior:l}=e.options;e.options.scrollBehavior=void 0,await e.replace({query:e.currentRoute.value.query,hash:t}).finally(()=>e.options.scrollBehavior=l)},Wd="a.sidebar-item",Yd=".header-anchor",Gd=300,Jd=5,Qd=xt({setup(){Kd({headerLinkSelector:Wd,headerAnchorSelector:Yd,delay:Gd,offset:Jd})}}),lr=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,Zd=()=>window.scrollTo({top:0,behavior:"smooth"}),Xd=he({name:"BackToTop",setup(){const e=_e(0),t=U(()=>e.value>300),l=xs(()=>{e.value=lr()},100);He(()=>{e.value=lr(),window.addEventListener("scroll",()=>l())});const n=ce("div",{class:"back-to-top",onClick:Zd});return()=>ce(Wl,{name:"back-to-top"},()=>t.value?n:null)}}),eh=xt({rootComponents:[Xd]}),th=ce("svg",{class:"external-link-icon",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"},[ce("path",{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}),ce("polygon",{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"})]),lh=he({name:"ExternalLinkIcon",props:{locales:{type:Object,required:!1,default:()=>({})}},setup(e){const t=Gl(),l=U(()=>e.locales[t.value]??{openInNewWindow:"open in new window"});return()=>ce("span",[th,ce("span",{class:"external-link-icon-sr-only"},l.value.openInNewWindow)])}});var nh={"/en/":{openInNewWindow:"open in new window"},"/zh-cn/":{openInNewWindow:"在新窗口中打开"},"/":{openInNewWindow:"open in new window"}};const ih=nh,oh=xt({enhance({app:e}){e.component("ExternalLinkIcon",ce(lh,{locales:ih}))}});/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */var Ht=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(C){function z(){}C(z,z)},i=function(C){var z=C.target;if(z===F){k();return}v.indexOf(z)!==-1&&E({target:z})},o=function(){if(!(V||!_.original)){var C=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(Y-C)>M.scrollOffset&&setTimeout(k,150)}},r=function(C){var z=C.key||C.keyCode;(z==="Escape"||z==="Esc"||z===27)&&k()},a=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},z=C;if(C.background&&(F.style.background=C.background),C.container&&C.container instanceof Object&&(z.container=Ht({},M.container,C.container)),C.template){var ne=hn(C.template)?C.template:document.querySelector(C.template);z.template=ne}return M=Ht({},M,z),v.forEach(function(se){se.dispatchEvent(tl("medium-zoom:update",{detail:{zoom:O}}))}),O},s=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(Ht({},M,C))},c=function(){for(var C=arguments.length,z=Array(C),ne=0;ne0?z.reduce(function(S,Q){return[].concat(S,ir(Q))},[]):v;return se.forEach(function(S){S.classList.remove("medium-zoom-image"),S.dispatchEvent(tl("medium-zoom:detach",{detail:{zoom:O}}))}),v=v.filter(function(S){return se.indexOf(S)===-1}),O},d=function(C,z){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return v.forEach(function(se){se.addEventListener("medium-zoom:"+C,z,ne)}),y.push({type:"medium-zoom:"+C,listener:z,options:ne}),O},h=function(C,z){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return v.forEach(function(se){se.removeEventListener("medium-zoom:"+C,z,ne)}),y=y.filter(function(se){return!(se.type==="medium-zoom:"+C&&se.listener.toString()===z.toString())}),O},p=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},z=C.target,ne=function(){var S={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},Q=void 0,K=void 0;if(M.container)if(M.container instanceof Object)S=Ht({},S,M.container),Q=S.width-S.left-S.right-M.margin*2,K=S.height-S.top-S.bottom-M.margin*2;else{var Se=hn(M.container)?M.container:document.querySelector(M.container),De=Se.getBoundingClientRect(),Ue=De.width,Ne=De.height,Et=De.left,Ct=De.top;S=Ht({},S,{width:Ue,height:Ne,left:Et,top:Ct})}Q=Q||S.width-M.margin*2,K=K||S.height-M.margin*2;var st=_.zoomedHd||_.original,Fe=nr(st)?Q:st.naturalWidth||Q,R=nr(st)?K:st.naturalHeight||K,q=st.getBoundingClientRect(),N=q.top,J=q.left,de=q.width,f=q.height,m=Math.min(Math.max(de,Fe),Q)/de,g=Math.min(Math.max(f,R),K)/f,x=Math.min(m,g),w=(-J+(Q-de)/2+M.margin+S.left)/x,P=(-N+(K-f)/2+M.margin+S.top)/x,j="scale("+x+") translate3d("+w+"px, "+P+"px, 0)";_.zoomed.style.transform=j,_.zoomedHd&&(_.zoomedHd.style.transform=j)};return new n(function(se){if(z&&v.indexOf(z)===-1){se(O);return}var S=function Ue(){V=!1,_.zoomed.removeEventListener("transitionend",Ue),_.original.dispatchEvent(tl("medium-zoom:opened",{detail:{zoom:O}})),se(O)};if(_.zoomed){se(O);return}if(z)_.original=z;else if(v.length>0){var Q=v;_.original=Q[0]}else{se(O);return}if(_.original.dispatchEvent(tl("medium-zoom:open",{detail:{zoom:O}})),Y=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,V=!0,_.zoomed=ah(_.original),document.body.appendChild(F),M.template){var K=hn(M.template)?M.template:document.querySelector(M.template);_.template=document.createElement("div"),_.template.appendChild(K.content.cloneNode(!0)),document.body.appendChild(_.template)}if(_.original.parentElement&&_.original.parentElement.tagName==="PICTURE"&&_.original.currentSrc&&(_.zoomed.src=_.original.currentSrc),document.body.appendChild(_.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),_.original.classList.add("medium-zoom-image--hidden"),_.zoomed.classList.add("medium-zoom-image--opened"),_.zoomed.addEventListener("click",k),_.zoomed.addEventListener("transitionend",S),_.original.getAttribute("data-zoom-src")){_.zoomedHd=_.zoomed.cloneNode(),_.zoomedHd.removeAttribute("srcset"),_.zoomedHd.removeAttribute("sizes"),_.zoomedHd.removeAttribute("loading"),_.zoomedHd.src=_.zoomed.getAttribute("data-zoom-src"),_.zoomedHd.onerror=function(){clearInterval(Se),console.warn("Unable to reach the zoom image target "+_.zoomedHd.src),_.zoomedHd=null,ne()};var Se=setInterval(function(){_.zoomedHd.complete&&(clearInterval(Se),_.zoomedHd.classList.add("medium-zoom-image--opened"),_.zoomedHd.addEventListener("click",k),document.body.appendChild(_.zoomedHd),ne())},10)}else if(_.original.hasAttribute("srcset")){_.zoomedHd=_.zoomed.cloneNode(),_.zoomedHd.removeAttribute("sizes"),_.zoomedHd.removeAttribute("loading");var De=_.zoomedHd.addEventListener("load",function(){_.zoomedHd.removeEventListener("load",De),_.zoomedHd.classList.add("medium-zoom-image--opened"),_.zoomedHd.addEventListener("click",k),document.body.appendChild(_.zoomedHd),ne()})}else ne()})},k=function(){return new n(function(C){if(V||!_.original){C(O);return}var z=function ne(){_.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(_.zoomed),_.zoomedHd&&document.body.removeChild(_.zoomedHd),document.body.removeChild(F),_.zoomed.classList.remove("medium-zoom-image--opened"),_.template&&document.body.removeChild(_.template),V=!1,_.zoomed.removeEventListener("transitionend",ne),_.original.dispatchEvent(tl("medium-zoom:closed",{detail:{zoom:O}})),_.original=null,_.zoomed=null,_.zoomedHd=null,_.template=null,C(O)};V=!0,document.body.classList.remove("medium-zoom--opened"),_.zoomed.style.transform="",_.zoomedHd&&(_.zoomedHd.style.transform=""),_.template&&(_.template.style.transition="opacity 150ms",_.template.style.opacity=0),_.original.dispatchEvent(tl("medium-zoom:close",{detail:{zoom:O}})),_.zoomed.addEventListener("transitionend",z)})},E=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},z=C.target;return _.original?k():p({target:z})},L=function(){return M},A=function(){return v},T=function(){return _.original},v=[],y=[],V=!1,Y=0,M=l,_={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?M=t:(t||typeof t=="string")&&c(t),M=Ht({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},M);var F=sh(M.background);document.addEventListener("click",i),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",k);var O={open:p,close:k,toggle:E,update:a,clone:s,attach:c,detach:u,on:d,off:h,getOptions:L,getImages:A,getZoomedImage:T};return O};function uh(e,t){t===void 0&&(t={});var l=t.insertAt;if(!(!e||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",l==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var dh=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";uh(dh);const hh=ch,fh=Symbol("mediumZoom");var mh={};const ph=".theme-default-content > img, .theme-default-content :not(a) > img",gh=mh,vh=300,_h=xt({enhance({app:e,router:t}){const l=hh(gh);l.refresh=(n=ph)=>{l.detach(),l.attach(n)},e.provide(fh,l),t.afterEach(()=>{setTimeout(()=>l.refresh(),vh)})}});/** + * NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT + */const fe={settings:{minimum:.08,easing:"ease",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,barSelector:'[role="bar"]',parent:"body",template:'
'},status:null,set:e=>{const t=fe.isStarted();e=ei(e,fe.settings.minimum,1),fe.status=e===1?null:e;const l=fe.render(!t),n=l.querySelector(fe.settings.barSelector),i=fe.settings.speed,o=fe.settings.easing;return l.offsetWidth,bh(r=>{sn(n,{transform:"translate3d("+or(e)+"%,0,0)",transition:"all "+i+"ms "+o}),e===1?(sn(l,{transition:"none",opacity:"1"}),l.offsetWidth,setTimeout(function(){sn(l,{transition:"all "+i+"ms linear",opacity:"0"}),setTimeout(function(){fe.remove(),r()},i)},i)):setTimeout(()=>r(),i)}),fe},isStarted:()=>typeof fe.status=="number",start:()=>{fe.status||fe.set(0);const e=()=>{setTimeout(()=>{fe.status&&(fe.trickle(),e())},fe.settings.trickleSpeed)};return fe.settings.trickle&&e(),fe},done:e=>!e&&!fe.status?fe:fe.inc(.3+.5*Math.random()).set(1),inc:e=>{let t=fe.status;return t?(typeof e!="number"&&(e=(1-t)*ei(Math.random()*t,.1,.95)),t=ei(t+e,0,.994),fe.set(t)):fe.start()},trickle:()=>fe.inc(Math.random()*fe.settings.trickleRate),render:e=>{if(fe.isRendered())return document.getElementById("nprogress");rr(document.documentElement,"nprogress-busy");const t=document.createElement("div");t.id="nprogress",t.innerHTML=fe.settings.template;const l=t.querySelector(fe.settings.barSelector),n=e?"-100":or(fe.status||0),i=document.querySelector(fe.settings.parent);return sn(l,{transition:"all 0 linear",transform:"translate3d("+n+"%,0,0)"}),i!==document.body&&rr(i,"nprogress-custom-parent"),i==null||i.appendChild(t),t},remove:()=>{sr(document.documentElement,"nprogress-busy"),sr(document.querySelector(fe.settings.parent),"nprogress-custom-parent");const e=document.getElementById("nprogress");e&&yh(e)},isRendered:()=>!!document.getElementById("nprogress")},ei=(e,t,l)=>el?l:e,or=e=>(-1+e)*100,bh=function(){const e=[];function t(){const l=e.shift();l&&l(t)}return function(l){e.push(l),e.length===1&&t()}}(),sn=function(){const e=["Webkit","O","Moz","ms"],t={};function l(r){return r.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(a,s){return s.toUpperCase()})}function n(r){const a=document.body.style;if(r in a)return r;let s=e.length;const c=r.charAt(0).toUpperCase()+r.slice(1);let u;for(;s--;)if(u=e[s]+c,u in a)return u;return r}function i(r){return r=l(r),t[r]??(t[r]=n(r))}function o(r,a,s){a=i(a),r.style[a]=s}return function(r,a){for(const s in a){const c=a[s];c!==void 0&&Object.prototype.hasOwnProperty.call(a,s)&&o(r,s,c)}}}(),Fs=(e,t)=>(typeof e=="string"?e:Ki(e)).indexOf(" "+t+" ")>=0,rr=(e,t)=>{const l=Ki(e),n=l+t;Fs(l,t)||(e.className=n.substring(1))},sr=(e,t)=>{const l=Ki(e);if(!Fs(e,t))return;const n=l.replace(" "+t+" "," ");e.className=n.substring(1,n.length-1)},Ki=e=>(" "+(e.className||"")+" ").replace(/\s+/gi," "),yh=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},kh=()=>{He(()=>{const e=Zt(),t=new Set;t.add(e.currentRoute.value.path),e.beforeEach(l=>{t.has(l.path)||fe.start()}),e.afterEach(l=>{t.add(l.path),fe.done()})})},xh=xt({setup(){kh()}}),Eh=JSON.parse(`{"logo":"/images/logo.png","repo":"https://github.com/HighCapable/YukiReflection","docsRepo":"https://github.com/HighCapable/YukiReflection","docsBranch":"master","docsDir":"docs-source/src","editLinkPattern":":repo/edit/:branch/:path","sidebar":{"/en/":[{"text":"Get Started","collapsible":true,"children":["/en/guide/home","/en/guide/quick-start"]},{"text":"Configs","collapsible":true,"children":["/en/config/api-example","/en/config/api-exception"]},{"text":"API Document","collapsible":true,"children":["/en/api/home",{"text":"Public API ","collapsible":true,"children":["/en/api/public/com/highcapable/yukireflection/YukiReflection","/en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory","/en/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory","/en/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory","/en/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory","/en/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory","/en/api/public/com/highcapable/yukireflection/log/YLog","/en/api/public/com/highcapable/yukireflection/factory/ReflectionFactory","/en/api/public/com/highcapable/yukireflection/finder/members/MethodFinder","/en/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder","/en/api/public/com/highcapable/yukireflection/finder/members/FieldFinder","/en/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules","/en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder","/en/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules","/en/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules","/en/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules","/en/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules","/en/api/public/com/highcapable/yukireflection/bean/VariousClass","/en/api/public/com/highcapable/yukireflection/bean/CurrentClass","/en/api/public/com/highcapable/yukireflection/bean/GenericClass"]},"/en/api/features"]},{"text":"About","collapsible":true,"children":["/en/about/changelog","/en/about/future","/en/about/contacts","/en/about/about"]}],"/zh-cn/":[{"text":"入门","collapsible":true,"children":["/zh-cn/guide/home","/zh-cn/guide/quick-start"]},{"text":"配置","collapsible":true,"children":["/zh-cn/config/api-example","/zh-cn/config/api-exception"]},{"text":"API 文档","collapsible":true,"children":["/zh-cn/api/home",{"text":"Public API ","collapsible":true,"children":["/zh-cn/api/public/com/highcapable/yukireflection/YukiReflection","/zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory","/zh-cn/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory","/zh-cn/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory","/zh-cn/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory","/zh-cn/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory","/zh-cn/api/public/com/highcapable/yukireflection/log/YLog","/zh-cn/api/public/com/highcapable/yukireflection/factory/ReflectionFactory","/zh-cn/api/public/com/highcapable/yukireflection/finder/members/MethodFinder","/zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder","/zh-cn/api/public/com/highcapable/yukireflection/finder/members/FieldFinder","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules","/zh-cn/api/public/com/highcapable/yukireflection/bean/VariousClass","/zh-cn/api/public/com/highcapable/yukireflection/bean/CurrentClass","/zh-cn/api/public/com/highcapable/yukireflection/bean/GenericClass"]},"/zh-cn/api/features"]},{"text":"关于","collapsible":true,"children":["/zh-cn/about/changelog","/zh-cn/about/future","/zh-cn/about/contacts","/zh-cn/about/about"]}]},"sidebarDepth":2,"locales":{"/en/":{"navbar":[{"text":"Navigation","children":[{"text":"Get Started","children":[{"text":"Introduce","link":"/en/guide/home"},{"text":"Quick Start","link":"/en/guide/quick-start"}]},{"text":"Configs","children":[{"text":"API Basic Configs","link":"/en/config/api-example"},{"text":"API Exception Handling","link":"/en/config/api-exception"}]},{"text":"API Document","children":[{"text":"Document Introduction","link":"/en/api/home"},{"text":"Public API","link":"/en/api/public/com/highcapable/yukireflection/YukiReflection","activeMatch":"/en/api/public/"},{"text":"Features","link":"/en/api/features"}]},{"text":"About","children":[{"text":"Changelog","link":"/en/about/changelog"},{"text":"Looking for Future","link":"/en/about/future"},{"text":"Contact Us","link":"/en/about/contacts"},{"text":"About this Document","link":"/en/about/about"}]}]},{"text":"Contact Us","link":"/en/about/contacts"}],"selectLanguageText":"English (US)","selectLanguageName":"English","editLinkText":"Edit this page on GitHub","tip":"Tips","warning":"Notice","danger":"Pay Attention"},"/zh-cn/":{"navbar":[{"text":"导航","children":[{"text":"入门","children":[{"text":"介绍","link":"/zh-cn/guide/home"},{"text":"快速开始","link":"/zh-cn/guide/quick-start"}]},{"text":"配置","children":[{"text":"API 基本配置","link":"/zh-cn/config/api-example"},{"text":"API 异常处理","link":"/zh-cn/config/api-exception"}]},{"text":"API 文档","children":[{"text":"文档介绍","link":"/zh-cn/api/home"},{"text":"Public API","link":"/zh-cn/api/public/com/highcapable/yukireflection/YukiReflection","activeMatch":"/zh-cn/api/public/"},{"text":"功能介绍","link":"/zh-cn/api/features"}]},{"text":"关于","children":[{"text":"更新日志","link":"/zh-cn/about/changelog"},{"text":"展望未来","link":"/zh-cn/about/future"},{"text":"联系我们","link":"/zh-cn/about/contacts"},{"text":"关于此文档","link":"/zh-cn/about/about"}]}]},{"text":"联系我们","link":"/zh-cn/about/contacts"}],"selectLanguageText":"简体中文 (CN)","selectLanguageName":"简体中文","editLinkText":"在 GitHub 上编辑此页","notFound":["这里什么都没有","我们怎么到这来了?","这是一个 404 页面","看起来我们进入了错误的链接"],"backToHome":"回到首页","contributorsText":"贡献者","lastUpdatedText":"上次更新","tip":"小提示","warning":"注意","danger":"特别注意","openInNewWindow":"在新窗口中打开","toggleColorMode":"切换颜色模式"},"/":{"selectLanguageName":"English"}},"colorMode":"auto","colorModeSwitch":true,"navbar":[],"selectLanguageText":"Languages","selectLanguageAriaLabel":"Select language","editLink":true,"editLinkText":"Edit this page","lastUpdated":true,"lastUpdatedText":"Last Updated","contributors":true,"contributorsText":"Contributors","notFound":["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],"backToHome":"Take me home","openInNewWindow":"open in new window","toggleColorMode":"toggle color mode","toggleSidebar":"toggle sidebar"}`),Ch=_e(Eh),Ds=()=>Ch,zs=Symbol(""),Rh=()=>{const e=we(zs);if(!e)throw new Error("useThemeLocaleData() is called without provider.");return e},Lh=(e,t)=>{const{locales:l,...n}=e;return{...n,...l==null?void 0:l[t]}},wh=xt({enhance({app:e}){const t=Ds(),l=e._context.provides[Vi],n=U(()=>Lh(t.value,l.value));e.provide(zs,n),Object.defineProperties(e.config.globalProperties,{$theme:{get(){return t.value}},$themeLocale:{get(){return n.value}}})}}),Th=he({__name:"Badge",props:{type:{type:String,required:!1,default:"tip"},text:{type:String,required:!1,default:""},vertical:{type:String,required:!1,default:void 0}},setup(e){return(t,l)=>(B(),ee("span",{class:Ke(["badge",e.type]),style:Vl({verticalAlign:e.vertical})},[ke(t.$slots,"default",{},()=>[ot(Oe(e.text),1)])],6))}}),Re=(e,t)=>{const l=e.__vccOpts||e;for(const[n,i]of t)l[n]=i;return l},Ah=Re(Th,[["__file","Badge.vue"]]);function ar(e,t){var l;const n=Pi();return Ur(()=>{n.value=e()},{...t,flush:(l=t==null?void 0:t.flush)!=null?l:"sync"}),jl(n)}function Ph(e,t){let l,n,i;const o=_e(!0),r=()=>{o.value=!0,i()};We(e,r,{flush:"sync"});const a=typeof t=="function"?t:t.get,s=typeof t=="function"?void 0:t.set,c=Ma((u,d)=>(n=u,i=d,{get(){return o.value&&(l=a(),o.value=!1),n(),l},set(h){s==null||s(h)}}));return Object.isExtensible(c)&&(c.trigger=r),c}function Ms(e){return xr()?(ha(e),!0):!1}function pl(e){return typeof e=="function"?e():le(e)}const Oh=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ih=Object.prototype.toString,Sh=e=>Ih.call(e)==="[object Object]",Fh=()=>{};function Dh(e,t){function l(...n){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(i).catch(o)})}return l}const Ns=e=>e();function zh(e=Ns){const t=_e(!0);function l(){t.value=!1}function n(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:jl(t),pause:l,resume:n,eventFilter:i}}function Mh(e){return e||zi()}function Nh(e,t,l={}){const{eventFilter:n=Ns,...i}=l;return We(e,Dh(n,t),i)}function $h(e,t,l={}){const{eventFilter:n,...i}=l,{eventFilter:o,pause:r,resume:a,isActive:s}=zh(n);return{stop:Nh(e,t,{...i,eventFilter:o}),pause:r,resume:a,isActive:s}}function Vh(e,t=!0,l){const n=Mh(l);n?He(e,n):t?e():Ul(e)}function Hh(e=!1,t={}){const{truthyValue:l=!0,falsyValue:n=!1}=t,i=Ve(e),o=_e(e);function r(a){if(arguments.length)return o.value=a,o.value;{const s=pl(l);return o.value=o.value===s?pl(n):s,o.value}}return i?r:[o,r]}function jh(e){var t;const l=pl(e);return(t=l==null?void 0:l.$el)!=null?t:l}const Rn=Oh?window:void 0;function cr(...e){let t,l,n,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([l,n,i]=e,t=Rn):[t,l,n,i]=e,!t)return Fh;Array.isArray(l)||(l=[l]),Array.isArray(n)||(n=[n]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,h,p)=>(u.addEventListener(d,h,p),()=>u.removeEventListener(d,h,p)),s=We(()=>[jh(t),pl(i)],([u,d])=>{if(r(),!u)return;const h=Sh(d)?{...d}:d;o.push(...l.flatMap(p=>n.map(k=>a(u,p,k,h))))},{immediate:!0,flush:"post"}),c=()=>{s(),r()};return Ms(c),c}function Bh(){const e=_e(!1);return zi()&&He(()=>{e.value=!0}),e}function Uh(e){const t=Bh();return U(()=>(t.value,!!e()))}function qh(e,t={}){const{window:l=Rn}=t,n=Uh(()=>l&&"matchMedia"in l&&typeof l.matchMedia=="function");let i;const o=_e(!1),r=c=>{o.value=c.matches},a=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",r):i.removeListener(r))},s=Ur(()=>{n.value&&(a(),i=l.matchMedia(pl(e)),"addEventListener"in i?i.addEventListener("change",r):i.addListener(r),o.value=i.matches)});return Ms(()=>{s(),a(),i=void 0}),o}const an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},cn="__vueuse_ssr_handlers__",Kh=Wh();function Wh(){return cn in an||(an[cn]=an[cn]||{}),an[cn]}function Yh(e,t){return Kh[e]||t}function Gh(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Jh={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},ur="vueuse-storage";function $s(e,t,l,n={}){var i;const{flush:o="pre",deep:r=!0,listenToStorageChanges:a=!0,writeDefaults:s=!0,mergeDefaults:c=!1,shallow:u,window:d=Rn,eventFilter:h,onError:p=F=>{console.error(F)},initOnMounted:k}=n,E=(u?Pi:_e)(typeof t=="function"?t():t);if(!l)try{l=Yh("getDefaultStorage",()=>{var F;return(F=Rn)==null?void 0:F.localStorage})()}catch(F){p(F)}if(!l)return E;const L=pl(t),A=Gh(L),T=(i=n.serializer)!=null?i:Jh[A],{pause:v,resume:y}=$h(E,()=>V(E.value),{flush:o,deep:r,eventFilter:h});return d&&a&&Vh(()=>{cr(d,"storage",_),cr(d,ur,M),k&&_()}),k||_(),E;function V(F){try{if(F==null)l.removeItem(e);else{const O=T.write(F),W=l.getItem(e);W!==O&&(l.setItem(e,O),d&&d.dispatchEvent(new CustomEvent(ur,{detail:{key:e,oldValue:W,newValue:O,storageArea:l}})))}}catch(O){p(O)}}function Y(F){const O=F?F.newValue:l.getItem(e);if(O==null)return s&&L!=null&&l.setItem(e,T.write(L)),L;if(!F&&c){const W=T.read(O);return typeof c=="function"?c(W,L):A==="object"&&!Array.isArray(W)?{...L,...W}:W}else return typeof O!="string"?O:T.read(O)}function M(F){_(F.detail)}function _(F){if(!(F&&F.storageArea!==l)){if(F&&F.key==null){E.value=L;return}if(!(F&&F.key!==e)){v();try{(F==null?void 0:F.newValue)!==T.write(E.value)&&(E.value=Y(F))}catch(O){p(O)}finally{F?Ul(y):y()}}}}}function Qh(e){return qh("(prefers-color-scheme: dark)",e)}const Zh=he({name:"CodeGroup",slots:Object,setup(e,{slots:t}){const l=_e([]),n=_e(-1),i=$s("vuepress-code-group",{}),o=U(()=>l.value.map(c=>c.innerText).join(","));He(()=>{We(()=>i.value[o.value],(c=-1)=>{n.value!==c&&(n.value=c)},{immediate:!0}),We(n,c=>{i.value[o.value]!==c&&(i.value[o.value]=c)})});const r=(c=n.value)=>{c{c>0?n.value=c-1:n.value=l.value.length-1,l.value[n.value].focus()},s=(c,u)=>{c.key===" "||c.key==="Enter"?(c.preventDefault(),n.value=u):c.key==="ArrowRight"?(c.preventDefault(),r(u)):c.key==="ArrowLeft"&&(c.preventDefault(),a(u))};return()=>{var u;const c=(((u=t.default)==null?void 0:u.call(t))||[]).filter(d=>d.type.name==="CodeGroupItem").map(d=>(d.props===null&&(d.props={}),d));return c.length===0?null:(n.value<0||n.value>c.length-1?(n.value=c.findIndex(d=>d.props.active===""||d.props.active===!0),n.value===-1&&(n.value=0)):c.forEach((d,h)=>{d.props.active=h===n.value}),ce("div",{class:"code-group"},[ce("div",{class:"code-group__nav"},ce("ul",{class:"code-group__ul"},c.map((d,h)=>{const p=h===n.value;return ce("li",{class:"code-group__li"},ce("button",{ref:k=>{k&&(l.value[h]=k)},class:{"code-group__nav-tab":!0,"code-group__nav-tab-active":p},ariaPressed:p,ariaExpanded:p,onClick:()=>n.value=h,onKeydown:k=>s(k,h)},d.props.title))}))),c]))}}}),Xh=["aria-selected"],ef=he({name:"CodeGroupItem"}),tf=he({...ef,props:{title:{type:String,required:!0},active:{type:Boolean,required:!1,default:!1}},setup(e){return(t,l)=>(B(),ee("div",{class:Ke(["code-group-item",{"code-group-item__active":e.active}]),"aria-selected":e.active},[ke(t.$slots,"default")],10,Xh))}}),lf=Re(tf,[["__file","CodeGroupItem.vue"]]),nf=()=>Ds(),Be=()=>Rh(),Vs=Symbol(""),Wi=()=>{const e=we(Vs);if(!e)throw new Error("useDarkMode() is called without provider.");return e},of=()=>{const e=Be(),t=Qh(),l=$s("vuepress-color-scheme",e.value.colorMode),n=U({get(){return e.value.colorModeSwitch?l.value==="auto"?t.value:l.value==="dark":e.value.colorMode==="dark"},set(i){i===t.value?l.value="auto":l.value=i?"dark":"light"}});Wt(Vs,n),rf(n)},rf=e=>{const t=(l=e.value)=>{const n=window==null?void 0:window.document.querySelector("html");n==null||n.classList.toggle("dark",l)};He(()=>{We(e,t,{immediate:!0})}),Dn(()=>t())},Hs=(...e)=>{const l=Zt().resolve(...e),n=l.matched[l.matched.length-1];if(!(n!=null&&n.redirect))return l;const{redirect:i}=n,o=re(i)?i(l):i,r=ge(o)?{path:o}:o;return Hs({hash:l.hash,query:l.query,params:l.params,...r})},Yi=e=>{const t=Hs(encodeURI(e));return{text:t.meta.title||e,link:t.name==="404"?e:t.fullPath}};let ti=null,El=null;const sf={wait:()=>ti,pending:()=>{ti=new Promise(e=>El=e)},resolve:()=>{El==null||El(),ti=null,El=null}},js=()=>sf,Bs=Symbol("sidebarItems"),Gi=()=>{const e=we(Bs);if(!e)throw new Error("useSidebarItems() is called without provider.");return e},af=()=>{const e=Be(),t=_t(),l=U(()=>cf(t.value,e.value));Wt(Bs,l)},cf=(e,t)=>{const l=e.sidebar??t.sidebar??"auto",n=e.sidebarDepth??t.sidebarDepth??2;return e.home||l===!1?[]:l==="auto"?df(n):te(l)?Us(l,n):$i(l)?hf(l,n):[]},uf=(e,t)=>({text:e.title,link:e.link,children:Ji(e.children,t)}),Ji=(e,t)=>t>0?e.map(l=>uf(l,t-1)):[],df=e=>{const t=Gt();return[{text:t.value.title,children:Ji(t.value.headers,e)}]},Us=(e,t)=>{const l=Mt(),n=Gt(),i=o=>{var a;let r;if(ge(o)?r=Yi(o):r=o,r.children)return{...r,children:r.children.map(s=>i(s))};if(r.link===l.path){const s=((a=n.value.headers[0])==null?void 0:a.level)===1?n.value.headers[0].children:n.value.headers;return{...r,children:Ji(s,t)}}return r};return e.map(o=>i(o))},hf=(e,t)=>{const l=Mt(),n=fs(e,l.path),i=e[n]??[];return Us(i,t)},ff="719px",mf={mobile:ff};var Nl;(function(e){e.MOBILE="mobile"})(Nl||(Nl={}));var pr;const pf={[Nl.MOBILE]:Number.parseInt((pr=mf.mobile)==null?void 0:pr.replace("px",""),10)},qs=(e,t)=>{const l=pf[e];Number.isInteger(l)&&He(()=>{t(l),window.addEventListener("resize",()=>t(l),!1),window.addEventListener("orientationchange",()=>t(l),!1)})},gf={},vf={class:"theme-default-content"};function _f(e,t){const l=yt("Content");return B(),ee("div",vf,[ie(l)])}const bf=Re(gf,[["render",_f],["__file","HomeContent.vue"]]),yf={key:0,class:"features"},kf=he({__name:"HomeFeatures",setup(e){const t=_t(),l=U(()=>te(t.value.features)?t.value.features:[]);return(n,i)=>l.value.length?(B(),ee("div",yf,[(B(!0),ee(xe,null,Dt(l.value,o=>(B(),ee("div",{key:o.title,class:"feature"},[ue("h2",null,Oe(o.title),1),ue("p",null,Oe(o.details),1)]))),128))])):Le("v-if",!0)}}),xf=Re(kf,[["__file","HomeFeatures.vue"]]),Ef=["innerHTML"],Cf=["textContent"],Rf=he({__name:"HomeFooter",setup(e){const t=_t(),l=U(()=>t.value.footer),n=U(()=>t.value.footerHtml);return(i,o)=>l.value?(B(),ee(xe,{key:0},[Le(" eslint-disable-next-line vue/no-v-html "),n.value?(B(),ee("div",{key:0,class:"footer",innerHTML:l.value},null,8,Ef)):(B(),ee("div",{key:1,class:"footer",textContent:Oe(l.value)},null,8,Cf))],64)):Le("v-if",!0)}}),Lf=Re(Rf,[["__file","HomeFooter.vue"]]),wf=["href","rel","target","aria-label"],Tf=he({inheritAttrs:!1}),Af=he({...Tf,__name:"AutoLink",props:{item:{type:Object,required:!0}},setup(e){const t=e,l=Mt(),n=ys(),{item:i}=Pn(t),o=U(()=>Yl(i.value.link)),r=U(()=>!o.value&&Iu(i.value.link)),a=U(()=>{if(!r.value){if(i.value.target)return i.value.target;if(o.value)return"_blank"}}),s=U(()=>a.value==="_blank"),c=U(()=>!o.value&&!r.value&&!s.value),u=U(()=>{if(!r.value){if(i.value.rel)return i.value.rel;if(s.value)return"noopener noreferrer"}}),d=U(()=>i.value.ariaLabel||i.value.text),h=U(()=>{const E=Object.keys(n.value.locales);return E.length?!E.some(L=>L===i.value.link):i.value.link!=="/"}),p=U(()=>h.value?l.path.startsWith(i.value.link):!1),k=U(()=>c.value?i.value.activeMatch?new RegExp(i.value.activeMatch).test(l.path):p.value:!1);return(E,L)=>{const A=yt("RouterLink"),T=yt("AutoLinkExternalIcon");return c.value?(B(),Ae(A,fi({key:0,class:{"router-link-active":k.value},to:le(i).link,"aria-label":d.value},E.$attrs),{default:ze(()=>[ke(E.$slots,"before"),ot(" "+Oe(le(i).text)+" ",1),ke(E.$slots,"after")]),_:3},16,["class","to","aria-label"])):(B(),ee("a",fi({key:1,class:"external-link",href:le(i).link,rel:u.value,target:a.value,"aria-label":d.value},E.$attrs),[ke(E.$slots,"before"),ot(" "+Oe(le(i).text)+" ",1),s.value?(B(),Ae(T,{key:0})):Le("v-if",!0),ke(E.$slots,"after")],16,wf))}}}),bt=Re(Af,[["__file","AutoLink.vue"]]),Pf={class:"hero"},Of={key:0,id:"main-title"},If={key:1,class:"description"},Sf={key:2,class:"actions"},Ff=he({__name:"HomeHero",setup(e){const t=_t(),l=Hi(),n=Wi(),i=U(()=>n.value&&t.value.heroImageDark!==void 0?t.value.heroImageDark:t.value.heroImage),o=U(()=>t.value.heroAlt||a.value||"hero"),r=U(()=>t.value.heroHeight||280),a=U(()=>t.value.heroText===null?null:t.value.heroText||l.value.title||"Hello"),s=U(()=>t.value.tagline===null?null:t.value.tagline||l.value.description||"Welcome to your VuePress site"),c=U(()=>te(t.value.actions)?t.value.actions.map(({text:d,link:h,type:p="primary"})=>({text:d,link:h,type:p})):[]),u=()=>{if(!i.value)return null;const d=ce("img",{src:Bi(i.value),alt:o.value,height:r.value});return t.value.heroImageDark===void 0?d:ce(ji,()=>d)};return(d,h)=>(B(),ee("header",Pf,[ie(u),a.value?(B(),ee("h1",Of,Oe(a.value),1)):Le("v-if",!0),s.value?(B(),ee("p",If,Oe(s.value),1)):Le("v-if",!0),c.value.length?(B(),ee("p",Sf,[(B(!0),ee(xe,null,Dt(c.value,p=>(B(),Ae(bt,{key:p.text,class:Ke(["action-button",[p.type]]),item:p},null,8,["class","item"]))),128))])):Le("v-if",!0)]))}}),Df=Re(Ff,[["__file","HomeHero.vue"]]),zf={class:"home"},Mf=he({__name:"Home",setup(e){return(t,l)=>(B(),ee("main",zf,[ie(Df),ie(xf),ie(bf),ie(Lf)]))}}),Nf=Re(Mf,[["__file","Home.vue"]]),$f=he({__name:"NavbarBrand",setup(e){const t=Gl(),l=Hi(),n=Be(),i=Wi(),o=U(()=>n.value.home||t.value),r=U(()=>l.value.title),a=U(()=>i.value&&n.value.logoDark!==void 0?n.value.logoDark:n.value.logo),s=()=>{if(!a.value)return null;const c=ce("img",{class:"logo",src:Bi(a.value),alt:r.value});return n.value.logoDark===void 0?c:ce(ji,()=>c)};return(c,u)=>{const d=yt("RouterLink");return B(),Ae(d,{to:o.value},{default:ze(()=>[ie(s),r.value?(B(),ee("span",{key:0,class:Ke(["site-name",{"can-hide":a.value}])},Oe(r.value),3)):Le("v-if",!0)]),_:1},8,["to"])}}}),Vf=Re($f,[["__file","NavbarBrand.vue"]]),Hf=he({__name:"DropdownTransition",setup(e){const t=n=>{n.style.height=n.scrollHeight+"px"},l=n=>{n.style.height=""};return(n,i)=>(B(),Ae(Wl,{name:"dropdown",onEnter:t,onAfterEnter:l,onBeforeLeave:t},{default:ze(()=>[ke(n.$slots,"default")]),_:3}))}}),Ks=Re(Hf,[["__file","DropdownTransition.vue"]]),jf=["aria-label"],Bf={class:"title"},Uf=ue("span",{class:"arrow down"},null,-1),qf=["aria-label"],Kf={class:"title"},Wf={class:"navbar-dropdown"},Yf={class:"navbar-dropdown-subtitle"},Gf={key:1},Jf={class:"navbar-dropdown-subitem-wrapper"},Qf=he({__name:"NavbarDropdown",props:{item:{type:Object,required:!0}},setup(e){const t=e,{item:l}=Pn(t),n=U(()=>l.value.ariaLabel||l.value.text),i=_e(!1),o=Mt();We(()=>o.path,()=>{i.value=!1});const r=s=>{s.detail===0?i.value=!i.value:i.value=!1},a=(s,c)=>c[c.length-1]===s;return(s,c)=>(B(),ee("div",{class:Ke(["navbar-dropdown-wrapper",{open:i.value}])},[ue("button",{class:"navbar-dropdown-title",type:"button","aria-label":n.value,onClick:r},[ue("span",Bf,Oe(le(l).text),1),Uf],8,jf),ue("button",{class:"navbar-dropdown-title-mobile",type:"button","aria-label":n.value,onClick:c[0]||(c[0]=u=>i.value=!i.value)},[ue("span",Kf,Oe(le(l).text),1),ue("span",{class:Ke(["arrow",i.value?"down":"right"])},null,2)],8,qf),ie(Ks,null,{default:ze(()=>[_n(ue("ul",Wf,[(B(!0),ee(xe,null,Dt(le(l).children,u=>(B(),ee("li",{key:u.text,class:"navbar-dropdown-item"},[u.children?(B(),ee(xe,{key:0},[ue("h4",Yf,[u.link?(B(),Ae(bt,{key:0,item:u,onFocusout:d=>a(u,le(l).children)&&u.children.length===0&&(i.value=!1)},null,8,["item","onFocusout"])):(B(),ee("span",Gf,Oe(u.text),1))]),ue("ul",Jf,[(B(!0),ee(xe,null,Dt(u.children,d=>(B(),ee("li",{key:d.link,class:"navbar-dropdown-subitem"},[ie(bt,{item:d,onFocusout:h=>a(d,u.children)&&a(u,le(l).children)&&(i.value=!1)},null,8,["item","onFocusout"])]))),128))])],64)):(B(),Ae(bt,{key:1,item:u,onFocusout:d=>a(u,le(l).children)&&(i.value=!1)},null,8,["item","onFocusout"]))]))),128))],512),[[En,i.value]])]),_:1})],2))}}),Zf=Re(Qf,[["__file","NavbarDropdown.vue"]]),dr=e=>decodeURI(e).replace(/#.*$/,"").replace(/(index)?\.(md|html)$/,""),Xf=(e,t)=>{if(t.hash===e)return!0;const l=dr(t.path),n=dr(e);return l===n},Ws=(e,t)=>e.link&&Xf(e.link,t)?!0:e.children?e.children.some(l=>Ws(l,t)):!1,Ys=e=>!Yl(e)||/github\.com/.test(e)?"GitHub":/bitbucket\.org/.test(e)?"Bitbucket":/gitlab\.com/.test(e)?"GitLab":/gitee\.com/.test(e)?"Gitee":null,em={GitHub:":repo/edit/:branch/:path",GitLab:":repo/-/edit/:branch/:path",Gitee:":repo/edit/:branch/:path",Bitbucket:":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default"},tm=({docsRepo:e,editLinkPattern:t})=>{if(t)return t;const l=Ys(e);return l!==null?em[l]:null},lm=({docsRepo:e,docsBranch:t,docsDir:l,filePathRelative:n,editLinkPattern:i})=>{if(!n)return null;const o=tm({docsRepo:e,editLinkPattern:i});return o?o.replace(/:repo/,Yl(e)?e:`https://github.com/${e}`).replace(/:branch/,t).replace(/:path/,hs(`${ds(l)}/${n}`)):null},nm={key:0,class:"navbar-items"},im=he({__name:"NavbarItems",setup(e){const t=()=>{const u=Zt(),d=Gl(),h=ys(),p=Hi(),k=nf(),E=Be();return U(()=>{const L=Object.keys(h.value.locales);if(L.length<2)return[];const A=u.currentRoute.value.path,T=u.currentRoute.value.fullPath;return[{text:`${E.value.selectLanguageText}`,ariaLabel:`${E.value.selectLanguageAriaLabel??E.value.selectLanguageText}`,children:L.map(y=>{var O,W;const V=((O=h.value.locales)==null?void 0:O[y])??{},Y=((W=k.value.locales)==null?void 0:W[y])??{},M=`${V.lang}`,_=Y.selectLanguageName??M;let F;if(M===p.value.lang)F=T;else{const C=A.replace(d.value,y);u.getRoutes().some(z=>z.path===C)?F=T.replace(A,C):F=Y.home??y}return{text:_,link:F}})}]})},l=()=>{const u=Be(),d=U(()=>u.value.repo),h=U(()=>d.value?Ys(d.value):null),p=U(()=>d.value&&!Yl(d.value)?`https://github.com/${d.value}`:d.value),k=U(()=>p.value?u.value.repoLabel?u.value.repoLabel:h.value===null?"Source":h.value:null);return U(()=>!p.value||!k.value?[]:[{text:k.value,link:p.value}])},n=u=>ge(u)?Yi(u):u.children?{...u,children:u.children.map(n)}:u,i=()=>{const u=Be();return U(()=>(u.value.navbar||[]).map(n))},o=_e(!1),r=i(),a=t(),s=l(),c=U(()=>[...r.value,...a.value,...s.value]);return qs(Nl.MOBILE,u=>{window.innerWidthc.value.length?(B(),ee("nav",nm,[(B(!0),ee(xe,null,Dt(c.value,h=>(B(),ee("div",{key:h.text,class:"navbar-item"},[h.children?(B(),Ae(Zf,{key:0,item:h,class:Ke(o.value?"mobile":"")},null,8,["item","class"])):(B(),Ae(bt,{key:1,item:h},null,8,["item"]))]))),128))])):Le("v-if",!0)}}),Gs=Re(im,[["__file","NavbarItems.vue"]]),om=["title"],rm={class:"icon",focusable:"false",viewBox:"0 0 32 32"},sm=Nc('',9),am=[sm],cm={class:"icon",focusable:"false",viewBox:"0 0 32 32"},um=ue("path",{d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z",fill:"currentColor"},null,-1),dm=[um],hm=he({__name:"ToggleColorModeButton",setup(e){const t=Be(),l=Wi(),n=()=>{l.value=!l.value};return(i,o)=>(B(),ee("button",{class:"toggle-color-mode-button",title:le(t).toggleColorMode,onClick:n},[_n((B(),ee("svg",rm,am,512)),[[En,!le(l)]]),_n((B(),ee("svg",cm,dm,512)),[[En,le(l)]])],8,om))}}),fm=Re(hm,[["__file","ToggleColorModeButton.vue"]]),mm=["title"],pm=ue("div",{class:"icon","aria-hidden":"true"},[ue("span"),ue("span"),ue("span")],-1),gm=[pm],vm=he({__name:"ToggleSidebarButton",emits:["toggle"],setup(e){const t=Be();return(l,n)=>(B(),ee("div",{class:"toggle-sidebar-button",title:le(t).toggleSidebar,"aria-expanded":"false",role:"button",tabindex:"0",onClick:n[0]||(n[0]=i=>l.$emit("toggle"))},gm,8,mm))}}),_m=Re(vm,[["__file","ToggleSidebarButton.vue"]]),bm=he({__name:"Navbar",emits:["toggle-sidebar"],setup(e){const t=Be(),l=_e(null),n=_e(null),i=_e(0),o=U(()=>i.value?{maxWidth:i.value+"px"}:{});qs(Nl.MOBILE,a=>{var c;const s=r(l.value,"paddingLeft")+r(l.value,"paddingRight");window.innerWidth{const c=yt("NavbarSearch");return B(),ee("header",{ref_key:"navbar",ref:l,class:"navbar"},[ie(_m,{onToggle:s[0]||(s[0]=u=>a.$emit("toggle-sidebar"))}),ue("span",{ref_key:"navbarBrand",ref:n},[ie(Vf)],512),ue("div",{class:"navbar-items-wrapper",style:Vl(o.value)},[ke(a.$slots,"before"),ie(Gs,{class:"can-hide"}),ke(a.$slots,"after"),le(t).colorModeSwitch?(B(),Ae(fm,{key:0})):Le("v-if",!0),ie(c)],4)],512)}}}),ym=Re(bm,[["__file","Navbar.vue"]]),km={class:"page-meta"},xm={key:0,class:"meta-item edit-link"},Em={key:1,class:"meta-item last-updated"},Cm={class:"meta-item-label"},Rm={class:"meta-item-info"},Lm={key:2,class:"meta-item contributors"},wm={class:"meta-item-label"},Tm={class:"meta-item-info"},Am=["title"],Pm=he({__name:"PageMeta",setup(e){const t=()=>{const s=Be(),c=Gt(),u=_t();return U(()=>{if(!(u.value.editLink??s.value.editLink??!0))return null;const{repo:h,docsRepo:p=h,docsBranch:k="main",docsDir:E="",editLinkText:L}=s.value;if(!p)return null;const A=lm({docsRepo:p,docsBranch:k,docsDir:E,filePathRelative:c.value.filePathRelative,editLinkPattern:u.value.editLinkPattern??s.value.editLinkPattern});return A?{text:L??"Edit this page",link:A}:null})},l=()=>{const s=Be(),c=Gt(),u=_t();return U(()=>{var p,k;return!(u.value.lastUpdated??s.value.lastUpdated??!0)||!((p=c.value.git)!=null&&p.updatedTime)?null:new Date((k=c.value.git)==null?void 0:k.updatedTime).toLocaleString()})},n=()=>{const s=Be(),c=Gt(),u=_t();return U(()=>{var h;return u.value.contributors??s.value.contributors??!0?((h=c.value.git)==null?void 0:h.contributors)??null:null})},i=Be(),o=t(),r=l(),a=n();return(s,c)=>{const u=yt("ClientOnly");return B(),ee("footer",km,[le(o)?(B(),ee("div",xm,[ie(bt,{class:"meta-item-label",item:le(o)},null,8,["item"])])):Le("v-if",!0),le(r)?(B(),ee("div",Em,[ue("span",Cm,Oe(le(i).lastUpdatedText)+": ",1),ie(u,null,{default:ze(()=>[ue("span",Rm,Oe(le(r)),1)]),_:1})])):Le("v-if",!0),le(a)&&le(a).length?(B(),ee("div",Lm,[ue("span",wm,Oe(le(i).contributorsText)+": ",1),ue("span",Tm,[(B(!0),ee(xe,null,Dt(le(a),(d,h)=>(B(),ee(xe,{key:h},[ue("span",{class:"contributor",title:`email: ${d.email}`},Oe(d.name),9,Am),h!==le(a).length-1?(B(),ee(xe,{key:0},[ot(", ")],64)):Le("v-if",!0)],64))),128))])])):Le("v-if",!0)])}}}),Om=Re(Pm,[["__file","PageMeta.vue"]]),Im={key:0,class:"page-nav"},Sm={class:"inner"},Fm={key:0,class:"prev"},Dm={key:1,class:"next"},zm=he({__name:"PageNav",setup(e){const t=s=>s===!1?null:ge(s)?Yi(s):$i(s)?s:!1,l=(s,c,u)=>{const d=s.findIndex(h=>h.link===c);if(d!==-1){const h=s[d+u];return h!=null&&h.link?h:null}for(const h of s)if(h.children){const p=l(h.children,c,u);if(p)return p}return null},n=_t(),i=Gi(),o=Mt(),r=U(()=>{const s=t(n.value.prev);return s!==!1?s:l(i.value,o.path,-1)}),a=U(()=>{const s=t(n.value.next);return s!==!1?s:l(i.value,o.path,1)});return(s,c)=>r.value||a.value?(B(),ee("nav",Im,[ue("p",Sm,[r.value?(B(),ee("span",Fm,[ie(bt,{item:r.value},null,8,["item"])])):Le("v-if",!0),a.value?(B(),ee("span",Dm,[ie(bt,{item:a.value},null,8,["item"])])):Le("v-if",!0)])])):Le("v-if",!0)}}),Mm=Re(zm,[["__file","PageNav.vue"]]),Nm={class:"page"},$m={class:"theme-default-content"},Vm=he({__name:"Page",setup(e){return(t,l)=>{const n=yt("Content");return B(),ee("main",Nm,[ke(t.$slots,"top"),ue("div",$m,[ke(t.$slots,"content-top"),ie(n),ke(t.$slots,"content-bottom")]),ie(Om),ie(Mm),ke(t.$slots,"bottom")])}}}),Hm=Re(Vm,[["__file","Page.vue"]]),jm={class:"sidebar-item-children"},Bm=he({__name:"SidebarItem",props:{item:{type:Object,required:!0},depth:{type:Number,required:!1,default:0}},setup(e){const t=e,{item:l,depth:n}=Pn(t),i=Mt(),o=Zt(),r=U(()=>Ws(l.value,i)),a=U(()=>({"sidebar-item":!0,"sidebar-heading":n.value===0,active:r.value,collapsible:l.value.collapsible})),s=U(()=>l.value.collapsible?r.value:!0),[c,u]=Hh(s.value),d=p=>{l.value.collapsible&&(p.preventDefault(),u())},h=o.afterEach(p=>{Ul(()=>{c.value=s.value})});return Kl(()=>{h()}),(p,k)=>{var L;const E=yt("SidebarItem",!0);return B(),ee("li",null,[le(l).link?(B(),Ae(bt,{key:0,class:Ke(a.value),item:le(l)},null,8,["class","item"])):(B(),ee("p",{key:1,tabindex:"0",class:Ke(a.value),onClick:d,onKeydown:ku(d,["enter"])},[ot(Oe(le(l).text)+" ",1),le(l).collapsible?(B(),ee("span",{key:0,class:Ke(["arrow",le(c)?"down":"right"])},null,2)):Le("v-if",!0)],34)),(L=le(l).children)!=null&&L.length?(B(),Ae(Ks,{key:2},{default:ze(()=>[_n(ue("ul",jm,[(B(!0),ee(xe,null,Dt(le(l).children,A=>(B(),Ae(E,{key:`${le(n)}${A.text}${A.link}`,item:A,depth:le(n)+1},null,8,["item","depth"]))),128))],512),[[En,le(c)]])]),_:1})):Le("v-if",!0)])}}}),Um=Re(Bm,[["__file","SidebarItem.vue"]]),qm={key:0,class:"sidebar-items"},Km=he({__name:"SidebarItems",setup(e){const t=Mt(),l=Gi();return He(()=>{We(()=>t.hash,n=>{const i=document.querySelector(".sidebar");if(!i)return;const o=document.querySelector(`.sidebar a.sidebar-item[href="${t.path}${n}"]`);if(!o)return;const{top:r,height:a}=i.getBoundingClientRect(),{top:s,height:c}=o.getBoundingClientRect();sr+a&&o.scrollIntoView(!1)})}),(n,i)=>le(l).length?(B(),ee("ul",qm,[(B(!0),ee(xe,null,Dt(le(l),o=>(B(),Ae(Um,{key:`${o.text}${o.link}`,item:o},null,8,["item"]))),128))])):Le("v-if",!0)}}),Wm=Re(Km,[["__file","SidebarItems.vue"]]),Ym={class:"sidebar"},Gm=he({__name:"Sidebar",setup(e){return(t,l)=>(B(),ee("aside",Ym,[ie(Gs),ke(t.$slots,"top"),ie(Wm),ke(t.$slots,"bottom")]))}}),Jm=Re(Gm,[["__file","Sidebar.vue"]]),Qm=he({__name:"Layout",setup(e){const t=Gt(),l=_t(),n=Be(),i=U(()=>l.value.navbar!==!1&&n.value.navbar!==!1),o=Gi(),r=_e(!1),a=L=>{r.value=typeof L=="boolean"?L:!r.value},s={x:0,y:0},c=L=>{s.x=L.changedTouches[0].clientX,s.y=L.changedTouches[0].clientY},u=L=>{const A=L.changedTouches[0].clientX-s.x,T=L.changedTouches[0].clientY-s.y;Math.abs(A)>Math.abs(T)&&Math.abs(A)>40&&(A>0&&s.x<=80?a(!0):a(!1))},d=U(()=>[{"no-navbar":!i.value,"no-sidebar":!o.value.length,"sidebar-open":r.value},l.value.pageClass]);let h;He(()=>{h=Zt().afterEach(()=>{a(!1)})}),Dn(()=>{h()});const p=js(),k=p.resolve,E=p.pending;return(L,A)=>(B(),ee("div",{class:Ke(["theme-container",d.value]),onTouchstart:c,onTouchend:u},[ke(L.$slots,"navbar",{},()=>[i.value?(B(),Ae(ym,{key:0,onToggleSidebar:a},{before:ze(()=>[ke(L.$slots,"navbar-before")]),after:ze(()=>[ke(L.$slots,"navbar-after")]),_:3})):Le("v-if",!0)]),ue("div",{class:"sidebar-mask",onClick:A[0]||(A[0]=T=>a(!1))}),ke(L.$slots,"sidebar",{},()=>[ie(Jm,null,{top:ze(()=>[ke(L.$slots,"sidebar-top")]),bottom:ze(()=>[ke(L.$slots,"sidebar-bottom")]),_:3})]),ke(L.$slots,"page",{},()=>[le(l).home?(B(),Ae(Nf,{key:0})):(B(),Ae(Wl,{key:1,name:"fade-slide-y",mode:"out-in",onBeforeEnter:le(k),onBeforeLeave:le(E)},{default:ze(()=>[(B(),Ae(Hm,{key:le(t).path},{top:ze(()=>[ke(L.$slots,"page-top")]),"content-top":ze(()=>[ke(L.$slots,"page-content-top")]),"content-bottom":ze(()=>[ke(L.$slots,"page-content-bottom")]),bottom:ze(()=>[ke(L.$slots,"page-bottom")]),_:3}))]),_:3},8,["onBeforeEnter","onBeforeLeave"]))])],34))}}),Zm=Re(Qm,[["__file","Layout.vue"]]),Xm={class:"theme-container"},ep={class:"page"},tp={class:"theme-default-content"},lp=ue("h1",null,"404",-1),np=he({__name:"NotFound",setup(e){const t=Gl(),l=Be(),n=l.value.notFound??["Not Found"],i=()=>n[Math.floor(Math.random()*n.length)],o=l.value.home??t.value,r=l.value.backToHome??"Back to home";return(a,s)=>{const c=yt("RouterLink");return B(),ee("div",Xm,[ue("main",ep,[ue("div",tp,[lp,ue("blockquote",null,Oe(i()),1),ie(c,{to:le(o)},{default:ze(()=>[ot(Oe(le(r)),1)]),_:1},8,["to"])])])])}}}),ip=Re(np,[["__file","NotFound.vue"]]),op=xt({enhance({app:e,router:t}){e.component("Badge",Ah),e.component("CodeGroup",Zh),e.component("CodeGroupItem",lf),e.component("AutoLinkExternalIcon",()=>{const n=e.component("ExternalLinkIcon");return n?ce(n):null}),e.component("NavbarSearch",()=>{const n=e.component("Docsearch")||e.component("SearchBox");return n?ce(n):null});const l=t.options.scrollBehavior;t.options.scrollBehavior=async(...n)=>(await js().wait(),l(...n))},setup(){of(),af()},layouts:{Layout:Zm,NotFound:ip}}),rp=e=>e instanceof Element?document.activeElement===e&&(["TEXTAREA","SELECT","INPUT"].includes(e.tagName)||e.hasAttribute("contenteditable")):!1,sp=(e,t)=>t.some(l=>{if(ge(l))return l===e.key;const{key:n,ctrl:i=!1,shift:o=!1,alt:r=!1}=l;return n===e.key&&i===e.ctrlKey&&o===e.shiftKey&&r===e.altKey}),ap=/[^\x00-\x7F]/,cp=e=>e.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t),hr=e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),fr=(e,t)=>{const l=t.join(" "),n=cp(e);if(ap.test(e))return n.some(r=>l.toLowerCase().indexOf(r)>-1);const i=e.endsWith(" ");return new RegExp(n.map((r,a)=>n.length===a+1&&!i?`(?=.*\\b${hr(r)})`:`(?=.*\\b${hr(r)}\\b)`).join("")+".+","gi").test(l)},up=({input:e,hotKeys:t})=>{if(t.value.length===0)return;const l=n=>{e.value&&sp(n,t.value)&&!rp(n.target)&&(n.preventDefault(),e.value.focus())};He(()=>{document.addEventListener("keydown",l)}),Kl(()=>{document.removeEventListener("keydown",l)})},dp=[{title:"Home",headers:[{level:3,title:"Bring it on! Let reflection become poetic and picturesque",slug:"bring-it-on-let-reflection-become-poetic-and-picturesque",link:"#bring-it-on-let-reflection-become-poetic-and-picturesque",children:[]}],path:"/en/",pathLocale:"/en/",extraFields:[]},{title:"首页",headers:[{level:3,title:"来吧!让反射也变得诗情画意",slug:"来吧-让反射也变得诗情画意",link:"#来吧-让反射也变得诗情画意",children:[]}],path:"/zh-cn/",pathLocale:"/zh-cn/",extraFields:[]},{title:"About This Document",headers:[{level:2,title:"License",slug:"license",link:"#license",children:[]}],path:"/en/about/about.html",pathLocale:"/en/",extraFields:[]},{title:"Changelog",headers:[{level:3,title:"1.0.3 | 2023.10.07",slug:"_1-0-3-2023-10-07",link:"#_1-0-3-2023-10-07",children:[]},{level:3,title:"1.0.2 | 2023.04.25",slug:"_1-0-2-2023-04-25",link:"#_1-0-2-2023-04-25",children:[]},{level:3,title:"1.0.1 | 2023.04.16",slug:"_1-0-1-2023-04-16",link:"#_1-0-1-2023-04-16",children:[]},{level:3,title:"1.0.0 | 2023.01.26",slug:"_1-0-0-2023-01-26",link:"#_1-0-0-2023-01-26",children:[]}],path:"/en/about/changelog.html",pathLocale:"/en/",extraFields:[]},{title:"Contact Us",headers:[{level:2,title:"Help with Maintenance",slug:"help-with-maintenance",link:"#help-with-maintenance",children:[]}],path:"/en/about/contacts.html",pathLocale:"/en/",extraFields:[]},{title:"Looking for Future",headers:[{level:2,title:"Future Plans",slug:"future-plans",link:"#future-plans",children:[{level:3,title:"Automatically Generate Reflection Code",slug:"automatically-generate-reflection-code",link:"#automatically-generate-reflection-code",children:[]},{level:3,title:"Automatically Generate Directly Called Class Objects",slug:"automatically-generate-directly-called-class-objects",link:"#automatically-generate-directly-called-class-objects",children:[]}]}],path:"/en/about/future.html",pathLocale:"/en/",extraFields:[]},{title:"Features",headers:[{level:2,title:"Class Extensions",slug:"class-extensions",link:"#class-extensions",children:[{level:3,title:"Object Conversion",slug:"object-conversion",link:"#object-conversion",children:[]},{level:3,title:"Lazy Loading",slug:"lazy-loading",link:"#lazy-loading",children:[]},{level:3,title:"Existential Judgment",slug:"existential-judgment",link:"#existential-judgment",children:[]},{level:3,title:"Vague Search",slug:"vague-search",link:"#vague-search",children:[]}]},{level:2,title:"Member Extensions",slug:"member-extensions",link:"#member-extensions",children:[{level:3,title:"Find and Reflection",slug:"find-and-reflection",link:"#find-and-reflection",children:[]},{level:3,title:"Optional Find Conditions",slug:"optional-find-conditions",link:"#optional-find-conditions",children:[]},{level:3,title:"Find in Super Class",slug:"find-in-super-class",link:"#find-in-super-class",children:[]},{level:3,title:"Vague Find",slug:"vague-find",link:"#vague-find",children:[]},{level:3,title:"Multiple Find",slug:"multiple-find",link:"#multiple-find",children:[]},{level:3,title:"Static Bytecode",slug:"static-bytecode",link:"#static-bytecode",children:[]},{level:3,title:"Obfuscated Bytecode",slug:"obfuscated-bytecode",link:"#obfuscated-bytecode",children:[]},{level:3,title:"Directly Called",slug:"directly-called",link:"#directly-called",children:[]},{level:3,title:"Find Again",slug:"find-again",link:"#find-again",children:[]},{level:3,title:"Relative Matching",slug:"relative-matching",link:"#relative-matching",children:[]},{level:3,title:"Calling Generics",slug:"calling-generics",link:"#calling-generics",children:[]},{level:3,title:"Pay Attention of Trap",slug:"pay-attention-of-trap",link:"#pay-attention-of-trap",children:[]}]},{level:2,title:"Common Type Extensions",slug:"common-type-extensions",link:"#common-type-extensions",children:[]}],path:"/en/api/features.html",pathLocale:"/en/",extraFields:[]},{title:"Document Introduce",headers:[{level:2,title:"Function Description",slug:"function-description",link:"#function-description",children:[]},{level:2,title:"Function Example Description",slug:"function-example-description",link:"#function-example-description",children:[]},{level:2,title:"Change Record Description",slug:"change-record-description",link:"#change-record-description",children:[]},{level:2,title:"Related Symbols Description",slug:"related-symbols-description",link:"#related-symbols-description",children:[]}],path:"/en/api/home.html",pathLocale:"/en/",extraFields:[]},{title:"API Basic Configs",headers:[{level:2,title:"Get the API Tag & Version",slug:"get-the-api-tag-version",link:"#get-the-api-tag-version",children:[]},{level:2,title:"Configure API Related Functions",slug:"configure-api-related-functions",link:"#configure-api-related-functions",children:[{level:3,title:"Custom Debug Log Tag",slug:"custom-debug-log-tag",link:"#custom-debug-log-tag",children:[]},{level:3,title:"Enable or Disable Debug Mode",slug:"enable-or-disable-debug-mode",link:"#enable-or-disable-debug-mode",children:[]},{level:3,title:"Enable or Disable Debug Logs",slug:"enable-or-disable-debug-logs",link:"#enable-or-disable-debug-logs",children:[]},{level:3,title:"Use the configs Method to Configure",slug:"use-the-configs-method-to-configure",link:"#use-the-configs-method-to-configure",children:[]}]}],path:"/en/config/api-example.html",pathLocale:"/en/",extraFields:[]},{title:"API Exception Handling",headers:[{level:2,title:"Non-Blocking Exceptions",slug:"non-blocking-exceptions",link:"#non-blocking-exceptions",children:[]},{level:2,title:"Blocking Exceptions",slug:"blocking-exceptions",link:"#blocking-exceptions",children:[]}],path:"/en/config/api-exception.html",pathLocale:"/en/",extraFields:[]},{title:"Introduce",headers:[{level:2,title:"Background",slug:"background",link:"#background",children:[]},{level:2,title:"Usage",slug:"usage",link:"#usage",children:[]},{level:2,title:"Language Requirement",slug:"language-requirement",link:"#language-requirement",children:[]},{level:2,title:"Source of Inspiration",slug:"source-of-inspiration",link:"#source-of-inspiration",children:[]}],path:"/en/guide/home.html",pathLocale:"/en/",extraFields:[]},{title:"Quick Start",headers:[{level:2,title:"Environment Requirements",slug:"environment-requirements",link:"#environment-requirements",children:[]},{level:2,title:"Project Requirements",slug:"project-requirements",link:"#project-requirements",children:[]},{level:2,title:"Integration Dependencies",slug:"integration-dependencies",link:"#integration-dependencies",children:[]}],path:"/en/guide/quick-start.html",pathLocale:"/en/",extraFields:[]},{title:"关于此文档",headers:[{level:2,title:"许可证",slug:"许可证",link:"#许可证",children:[]}],path:"/zh-cn/about/about.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"更新日志",headers:[{level:3,title:"1.0.3 | 2023.10.07",slug:"_1-0-3-2023-10-07",link:"#_1-0-3-2023-10-07",children:[]},{level:3,title:"1.0.2 | 2023.04.25",slug:"_1-0-2-2023-04-25",link:"#_1-0-2-2023-04-25",children:[]},{level:3,title:"1.0.1 | 2023.04.16",slug:"_1-0-1-2023-04-16",link:"#_1-0-1-2023-04-16",children:[]},{level:3,title:"1.0.0 | 2023.01.26",slug:"_1-0-0-2023-01-26",link:"#_1-0-0-2023-01-26",children:[]}],path:"/zh-cn/about/changelog.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"联系我们",headers:[{level:2,title:"助力维护",slug:"助力维护",link:"#助力维护",children:[]}],path:"/zh-cn/about/contacts.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"展望未来",headers:[{level:2,title:"未来的计划",slug:"未来的计划",link:"#未来的计划",children:[{level:3,title:"自动生成反射代码",slug:"自动生成反射代码",link:"#自动生成反射代码",children:[]},{level:3,title:"自动生成可直接调用的 Class 对象",slug:"自动生成可直接调用的-class-对象",link:"#自动生成可直接调用的-class-对象",children:[]}]}],path:"/zh-cn/about/future.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"功能介绍",headers:[{level:2,title:"Class 扩展",slug:"class-扩展",link:"#class-扩展",children:[{level:3,title:"对象转换",slug:"对象转换",link:"#对象转换",children:[]},{level:3,title:"延迟装载",slug:"延迟装载",link:"#延迟装载",children:[]},{level:3,title:"存在判断",slug:"存在判断",link:"#存在判断",children:[]},{level:3,title:"模糊查找",slug:"模糊查找",link:"#模糊查找",children:[]}]},{level:2,title:"Member 扩展",slug:"member-扩展",link:"#member-扩展",children:[{level:3,title:"查找与反射调用",slug:"查找与反射调用",link:"#查找与反射调用",children:[]},{level:3,title:"可选的查找条件",slug:"可选的查找条件",link:"#可选的查找条件",children:[]},{level:3,title:"在父类查找",slug:"在父类查找",link:"#在父类查找",children:[]},{level:3,title:"模糊查找",slug:"模糊查找-1",link:"#模糊查找-1",children:[]},{level:3,title:"多重查找",slug:"多重查找-1",link:"#多重查找-1",children:[]},{level:3,title:"静态字节码",slug:"静态字节码",link:"#静态字节码",children:[]},{level:3,title:"混淆的字节码",slug:"混淆的字节码",link:"#混淆的字节码",children:[]},{level:3,title:"直接调用",slug:"直接调用",link:"#直接调用",children:[]},{level:3,title:"再次查找",slug:"再次查找",link:"#再次查找",children:[]},{level:3,title:"相对匹配",slug:"相对匹配",link:"#相对匹配",children:[]},{level:3,title:"调用泛型",slug:"调用泛型",link:"#调用泛型",children:[]},{level:3,title:"注意误区",slug:"注意误区",link:"#注意误区",children:[]}]},{level:2,title:"常用类型扩展",slug:"常用类型扩展",link:"#常用类型扩展",children:[]}],path:"/zh-cn/api/features.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"文档介绍",headers:[{level:2,title:"功能描述说明",slug:"功能描述说明",link:"#功能描述说明",children:[]},{level:2,title:"功能示例说明",slug:"功能示例说明",link:"#功能示例说明",children:[]},{level:2,title:"变更记录说明",slug:"变更记录说明",link:"#变更记录说明",children:[]},{level:2,title:"相关符号说明",slug:"相关符号说明",link:"#相关符号说明",children:[]}],path:"/zh-cn/api/home.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"API 基本配置",headers:[{level:2,title:"获取 API 标签 & 版本",slug:"获取-api-标签-版本",link:"#获取-api-标签-版本",children:[]},{level:2,title:"配置 API 相关功能",slug:"配置-api-相关功能",link:"#配置-api-相关功能",children:[{level:3,title:"自定义调试日志标签",slug:"自定义调试日志标签",link:"#自定义调试日志标签",children:[]},{level:3,title:"启用或禁用 Debug 模式",slug:"启用或禁用-debug-模式",link:"#启用或禁用-debug-模式",children:[]},{level:3,title:"启用或禁用调试日志的输出功能",slug:"启用或禁用调试日志的输出功能",link:"#启用或禁用调试日志的输出功能",children:[]},{level:3,title:"使用 configs 方法配置",slug:"使用-configs-方法配置",link:"#使用-configs-方法配置",children:[]}]}],path:"/zh-cn/config/api-example.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"API 异常处理",headers:[{level:2,title:"非阻断异常",slug:"非阻断异常",link:"#非阻断异常",children:[]},{level:2,title:"阻断异常",slug:"阻断异常",link:"#阻断异常",children:[]}],path:"/zh-cn/config/api-exception.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"介绍",headers:[{level:2,title:"背景",slug:"背景",link:"#背景",children:[]},{level:2,title:"用途",slug:"用途",link:"#用途",children:[]},{level:2,title:"语言要求",slug:"语言要求",link:"#语言要求",children:[]},{level:2,title:"灵感来源",slug:"灵感来源",link:"#灵感来源",children:[]}],path:"/zh-cn/guide/home.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"快速开始",headers:[{level:2,title:"环境要求",slug:"环境要求",link:"#环境要求",children:[]},{level:2,title:"项目要求",slug:"项目要求",link:"#项目要求",children:[{level:3,title:"集成依赖",slug:"集成依赖",link:"#集成依赖",children:[]}]}],path:"/zh-cn/guide/quick-start.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"YukiReflection - object",headers:[{level:2,title:"TAG - field",slug:"tag-field",link:"#tag-field",children:[]},{level:2,title:"VERSION - field",slug:"version-field",link:"#version-field",children:[]},{level:2,title:"Configs - object",slug:"configs-object",link:"#configs-object",children:[{level:3,title:"debugLog - method",slug:"debuglog-method",link:"#debuglog-method",children:[]},{level:3,title:"isDebug - field",slug:"isdebug-field",link:"#isdebug-field",children:[]}]},{level:2,title:"configs - method",slug:"configs-method",link:"#configs-method",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/YukiReflection.html",pathLocale:"/en/",extraFields:[]},{title:"YukiReflection - object",headers:[{level:2,title:"TAG - field",slug:"tag-field",link:"#tag-field",children:[]},{level:2,title:"VERSION - field",slug:"version-field",link:"#version-field",children:[]},{level:2,title:"Configs - object",slug:"configs-object",link:"#configs-object",children:[{level:3,title:"debugLog - method",slug:"debuglog-method",link:"#debuglog-method",children:[]},{level:3,title:"isDebug - field",slug:"isdebug-field",link:"#isdebug-field",children:[]}]},{level:2,title:"configs - method",slug:"configs-method",link:"#configs-method",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/YukiReflection.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"CurrentClass - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"simpleName - field",slug:"simplename-field",link:"#simplename-field",children:[]},{level:2,title:"generic - method",slug:"generic-method",link:"#generic-method",children:[]},{level:2,title:"generic - method",slug:"generic-method-1",link:"#generic-method-1",children:[]},{level:2,title:"superClass - method",slug:"superclass-method",link:"#superclass-method",children:[]},{level:2,title:"field - method",slug:"field-method",link:"#field-method",children:[]},{level:2,title:"method - method",slug:"method-method",link:"#method-method",children:[]},{level:2,title:"SuperClass - class",slug:"superclass-class",link:"#superclass-class",children:[{level:3,title:"name - field",slug:"name-field-1",link:"#name-field-1",children:[]},{level:3,title:"simpleName - field",slug:"simplename-field-1",link:"#simplename-field-1",children:[]},{level:3,title:"generic - method",slug:"generic-method-2",link:"#generic-method-2",children:[]},{level:3,title:"generic - method",slug:"generic-method-3",link:"#generic-method-3",children:[]},{level:3,title:"field - method",slug:"field-method-1",link:"#field-method-1",children:[]},{level:3,title:"method - method",slug:"method-method-1",link:"#method-method-1",children:[]}]}],path:"/en/api/public/com/highcapable/yukireflection/bean/CurrentClass.html",pathLocale:"/en/",extraFields:[]},{title:"GenericClass - class",headers:[{level:2,title:"argument - method",slug:"argument-method",link:"#argument-method",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/bean/GenericClass.html",pathLocale:"/en/",extraFields:[]},{title:"VariousClass - class",headers:[{level:2,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:2,title:"getOrNull - method",slug:"getornull-method",link:"#getornull-method",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/bean/VariousClass.html",pathLocale:"/en/",extraFields:[]},{title:"ReflectionFactory - kt",headers:[{level:2,title:"LazyClass - class",slug:"lazyclass-class",link:"#lazyclass-class",children:[]},{level:2,title:"ClassLoader.listOfClasses - ext-method",slug:"classloader-listofclasses-ext-method",link:"#classloader-listofclasses-ext-method",children:[]},{level:2,title:"ClassLoader.searchClass - ext-method",slug:"classloader-searchclass-ext-method",link:"#classloader-searchclass-ext-method",children:[]},{level:2,title:"Class.hasExtends - ext-field",slug:"class-hasextends-ext-field",link:"#class-hasextends-ext-field",children:[]},{level:2,title:"Class?.extends - ext-method",slug:"class-extends-ext-method",link:"#class-extends-ext-method",children:[]},{level:2,title:"Class?.notExtends - ext-method",slug:"class-notextends-ext-method",link:"#class-notextends-ext-method",children:[]},{level:2,title:"Class?.implements - ext-method",slug:"class-implements-ext-method",link:"#class-implements-ext-method",children:[]},{level:2,title:"Class?.notImplements - ext-method",slug:"class-notimplements-ext-method",link:"#class-notimplements-ext-method",children:[]},{level:2,title:"Class.toJavaPrimitiveType - ext-method",slug:"class-tojavaprimitivetype-ext-method",link:"#class-tojavaprimitivetype-ext-method",children:[]},{level:2,title:"String.toClass - ext-method",slug:"string-toclass-ext-method",link:"#string-toclass-ext-method",children:[]},{level:2,title:"String.toClassOrNull - ext-method",slug:"string-toclassornull-ext-method",link:"#string-toclassornull-ext-method",children:[]},{level:2,title:"classOf - method",slug:"classof-method",link:"#classof-method",children:[]},{level:2,title:"lazyClass - method",slug:"lazyclass-method",link:"#lazyclass-method",children:[]},{level:2,title:"lazyClassOrNull - method",slug:"lazyclassornull-method",link:"#lazyclassornull-method",children:[]},{level:2,title:"String.hasClass - ext-method",slug:"string-hasclass-ext-method",link:"#string-hasclass-ext-method",children:[]},{level:2,title:"Class.hasField - ext-method",slug:"class-hasfield-ext-method",link:"#class-hasfield-ext-method",children:[]},{level:2,title:"Class.hasMethod - ext-method",slug:"class-hasmethod-ext-method",link:"#class-hasmethod-ext-method",children:[]},{level:2,title:"Class.hasConstructor - ext-method",slug:"class-hasconstructor-ext-method",link:"#class-hasconstructor-ext-method",children:[]},{level:2,title:"Member.hasModifiers - ext-method",slug:"member-hasmodifiers-ext-method",link:"#member-hasmodifiers-ext-method",children:[]},{level:2,title:"Class.hasModifiers - ext-method",slug:"class-hasmodifiers-ext-method",link:"#class-hasmodifiers-ext-method",children:[]},{level:2,title:"Class.field - ext-method",slug:"class-field-ext-method",link:"#class-field-ext-method",children:[]},{level:2,title:"Class.method - ext-method",slug:"class-method-ext-method",link:"#class-method-ext-method",children:[]},{level:2,title:"Class.constructor - ext-method",slug:"class-constructor-ext-method",link:"#class-constructor-ext-method",children:[]},{level:2,title:"Class.generic - ext-method",slug:"class-generic-ext-method",link:"#class-generic-ext-method",children:[]},{level:2,title:"Class.generic - ext-method",slug:"class-generic-ext-method-1",link:"#class-generic-ext-method-1",children:[]},{level:2,title:"Any.current - ext-method",slug:"any-current-ext-method",link:"#any-current-ext-method",children:[]},{level:2,title:"Class.buildOf - ext-method",slug:"class-buildof-ext-method",link:"#class-buildof-ext-method",children:[]},{level:2,title:"Class.allMethods - ext-method",slug:"class-allmethods-ext-method",link:"#class-allmethods-ext-method",children:[]},{level:2,title:"Class.allConstructors - ext-method",slug:"class-allconstructors-ext-method",link:"#class-allconstructors-ext-method",children:[]},{level:2,title:"Class.allFields - ext-method",slug:"class-allfields-ext-method",link:"#class-allfields-ext-method",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html",pathLocale:"/en/",extraFields:[]},{title:"YLog - object",headers:[{level:2,title:"Configs - object",slug:"configs-object",link:"#configs-object",children:[{level:3,title:"tag - field",slug:"tag-field",link:"#tag-field",children:[]},{level:3,title:"isEnable - field",slug:"isenable-field",link:"#isenable-field",children:[]}]}],path:"/en/api/public/com/highcapable/yukireflection/log/YLog.html",pathLocale:"/en/",extraFields:[]},{title:"CurrentClass - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"simpleName - field",slug:"simplename-field",link:"#simplename-field",children:[]},{level:2,title:"generic - method",slug:"generic-method",link:"#generic-method",children:[]},{level:2,title:"generic - method",slug:"generic-method-1",link:"#generic-method-1",children:[]},{level:2,title:"superClass - method",slug:"superclass-method",link:"#superclass-method",children:[]},{level:2,title:"field - method",slug:"field-method",link:"#field-method",children:[]},{level:2,title:"method - method",slug:"method-method",link:"#method-method",children:[]},{level:2,title:"SuperClass - class",slug:"superclass-class",link:"#superclass-class",children:[{level:3,title:"name - field",slug:"name-field-1",link:"#name-field-1",children:[]},{level:3,title:"simpleName - field",slug:"simplename-field-1",link:"#simplename-field-1",children:[]},{level:3,title:"generic - method",slug:"generic-method-2",link:"#generic-method-2",children:[]},{level:3,title:"generic - method",slug:"generic-method-3",link:"#generic-method-3",children:[]},{level:3,title:"field - method",slug:"field-method-1",link:"#field-method-1",children:[]},{level:3,title:"method - method",slug:"method-method-1",link:"#method-method-1",children:[]}]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/bean/CurrentClass.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"GenericClass - class",headers:[{level:2,title:"argument - method",slug:"argument-method",link:"#argument-method",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/bean/GenericClass.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"VariousClass - class",headers:[{level:2,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:2,title:"getOrNull - method",slug:"getornull-method",link:"#getornull-method",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/bean/VariousClass.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"ReflectionFactory - kt",headers:[{level:2,title:"LazyClass - class",slug:"lazyclass-class",link:"#lazyclass-class",children:[]},{level:2,title:"ClassLoader.listOfClasses - ext-method",slug:"classloader-listofclasses-ext-method",link:"#classloader-listofclasses-ext-method",children:[]},{level:2,title:"ClassLoader.searchClass - ext-method",slug:"classloader-searchclass-ext-method",link:"#classloader-searchclass-ext-method",children:[]},{level:2,title:"Class.hasExtends - ext-field",slug:"class-hasextends-ext-field",link:"#class-hasextends-ext-field",children:[]},{level:2,title:"Class?.extends - ext-method",slug:"class-extends-ext-method",link:"#class-extends-ext-method",children:[]},{level:2,title:"Class?.notExtends - ext-method",slug:"class-notextends-ext-method",link:"#class-notextends-ext-method",children:[]},{level:2,title:"Class?.implements - ext-method",slug:"class-implements-ext-method",link:"#class-implements-ext-method",children:[]},{level:2,title:"Class?.notImplements - ext-method",slug:"class-notimplements-ext-method",link:"#class-notimplements-ext-method",children:[]},{level:2,title:"Class.toJavaPrimitiveType - ext-method",slug:"class-tojavaprimitivetype-ext-method",link:"#class-tojavaprimitivetype-ext-method",children:[]},{level:2,title:"String.toClass - ext-method",slug:"string-toclass-ext-method",link:"#string-toclass-ext-method",children:[]},{level:2,title:"String.toClassOrNull - ext-method",slug:"string-toclassornull-ext-method",link:"#string-toclassornull-ext-method",children:[]},{level:2,title:"classOf - method",slug:"classof-method",link:"#classof-method",children:[]},{level:2,title:"lazyClass - method",slug:"lazyclass-method",link:"#lazyclass-method",children:[]},{level:2,title:"lazyClassOrNull - method",slug:"lazyclassornull-method",link:"#lazyclassornull-method",children:[]},{level:2,title:"String.hasClass - ext-method",slug:"string-hasclass-ext-method",link:"#string-hasclass-ext-method",children:[]},{level:2,title:"Class.hasField - ext-method",slug:"class-hasfield-ext-method",link:"#class-hasfield-ext-method",children:[]},{level:2,title:"Class.hasMethod - ext-method",slug:"class-hasmethod-ext-method",link:"#class-hasmethod-ext-method",children:[]},{level:2,title:"Class.hasConstructor - ext-method",slug:"class-hasconstructor-ext-method",link:"#class-hasconstructor-ext-method",children:[]},{level:2,title:"Member.hasModifiers - ext-method",slug:"member-hasmodifiers-ext-method",link:"#member-hasmodifiers-ext-method",children:[]},{level:2,title:"Class.hasModifiers - ext-method",slug:"class-hasmodifiers-ext-method",link:"#class-hasmodifiers-ext-method",children:[]},{level:2,title:"Class.field - ext-method",slug:"class-field-ext-method",link:"#class-field-ext-method",children:[]},{level:2,title:"Class.method - ext-method",slug:"class-method-ext-method",link:"#class-method-ext-method",children:[]},{level:2,title:"Class.constructor - ext-method",slug:"class-constructor-ext-method",link:"#class-constructor-ext-method",children:[]},{level:2,title:"Class.generic - ext-method",slug:"class-generic-ext-method",link:"#class-generic-ext-method",children:[]},{level:2,title:"Class.generic - ext-method",slug:"class-generic-ext-method-1",link:"#class-generic-ext-method-1",children:[]},{level:2,title:"Any.current - ext-method",slug:"any-current-ext-method",link:"#any-current-ext-method",children:[]},{level:2,title:"Class.buildOf - ext-method",slug:"class-buildof-ext-method",link:"#class-buildof-ext-method",children:[]},{level:2,title:"Class.allMethods - ext-method",slug:"class-allmethods-ext-method",link:"#class-allmethods-ext-method",children:[]},{level:2,title:"Class.allConstructors - ext-method",slug:"class-allconstructors-ext-method",link:"#class-allconstructors-ext-method",children:[]},{level:2,title:"Class.allFields - ext-method",slug:"class-allfields-ext-method",link:"#class-allfields-ext-method",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"YLog - object",headers:[{level:2,title:"Configs - object",slug:"configs-object",link:"#configs-object",children:[{level:3,title:"tag - field",slug:"tag-field",link:"#tag-field",children:[]},{level:3,title:"isEnable - field",slug:"isenable-field",link:"#isenable-field",children:[]}]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/log/YLog.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"BaseFinder - class",headers:[{level:2,title:"BaseFinder.IndexTypeCondition - class",slug:"basefinder-indextypecondition-class",link:"#basefinder-indextypecondition-class",children:[{level:3,title:"index - method",slug:"index-method",link:"#index-method",children:[]},{level:3,title:"index - method",slug:"index-method-1",link:"#index-method-1",children:[]},{level:3,title:"IndexTypeConditionSort - class",slug:"indextypeconditionsort-class",link:"#indextypeconditionsort-class",children:[]}]}],path:"/en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html",pathLocale:"/en/",extraFields:[]},{title:"DexClassFinder - class",headers:[{level:2,title:"companion object - object",slug:"companion-object-object",link:"#companion-object-object",children:[{level:3,title:"clearCache - method",slug:"clearcache-method",link:"#clearcache-method",children:[]}]},{level:2,title:"fullName - field",slug:"fullname-field",link:"#fullname-field",children:[]},{level:2,title:"simpleName - field",slug:"simplename-field",link:"#simplename-field",children:[]},{level:2,title:"singleName - field",slug:"singlename-field",link:"#singlename-field",children:[]},{level:2,title:"from - method",slug:"from-method",link:"#from-method",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"fullName - method",slug:"fullname-method",link:"#fullname-method",children:[]},{level:2,title:"simpleName - method",slug:"simplename-method",link:"#simplename-method",children:[]},{level:2,title:"singleName - method",slug:"singlename-method",link:"#singlename-method",children:[]},{level:2,title:"fullName - method",slug:"fullname-method-1",link:"#fullname-method-1",children:[]},{level:2,title:"simpleName - method",slug:"simplename-method-1",link:"#simplename-method-1",children:[]},{level:2,title:"singleName - method",slug:"singlename-method-1",link:"#singlename-method-1",children:[]},{level:2,title:"extends - method",slug:"extends-method",link:"#extends-method",children:[]},{level:2,title:"extends - method",slug:"extends-method-1",link:"#extends-method-1",children:[]},{level:2,title:"implements - method",slug:"implements-method",link:"#implements-method",children:[]},{level:2,title:"implements - method",slug:"implements-method-1",link:"#implements-method-1",children:[]},{level:2,title:"anonymous - method",slug:"anonymous-method",link:"#anonymous-method",children:[]},{level:2,title:"noExtends - method",slug:"noextends-method",link:"#noextends-method",children:[]},{level:2,title:"noImplements - method",slug:"noimplements-method",link:"#noimplements-method",children:[]},{level:2,title:"noSuper - method",slug:"nosuper-method",link:"#nosuper-method",children:[]},{level:2,title:"enclosing - method",slug:"enclosing-method",link:"#enclosing-method",children:[]},{level:2,title:"enclosing - method",slug:"enclosing-method-1",link:"#enclosing-method-1",children:[]},{level:2,title:"FromPackageRules - class",slug:"frompackagerules-class",link:"#frompackagerules-class",children:[{level:3,title:"absolute - method",slug:"absolute-method",link:"#absolute-method",children:[]}]},{level:2,title:"ClassNameRules - class",slug:"classnamerules-class",link:"#classnamerules-class",children:[{level:3,title:"optional - method",slug:"optional-method",link:"#optional-method",children:[]}]},{level:2,title:"member - method",slug:"member-method",link:"#member-method",children:[]},{level:2,title:"field - method",slug:"field-method",link:"#field-method",children:[]},{level:2,title:"method - method",slug:"method-method",link:"#method-method",children:[]},{level:2,title:"constructor - method",slug:"constructor-method",link:"#constructor-method",children:[]},{level:2,title:"Result - class",slug:"result-class",link:"#result-class",children:[{level:3,title:"result - method",slug:"result-method",link:"#result-method",children:[]},{level:3,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:3,title:"all - method",slug:"all-method",link:"#all-method",children:[]},{level:3,title:"all - method",slug:"all-method-1",link:"#all-method-1",children:[]},{level:3,title:"wait - method",slug:"wait-method",link:"#wait-method",children:[]},{level:3,title:"waitAll - method",slug:"waitall-method",link:"#waitall-method",children:[]},{level:3,title:"onNoClassDefFoundError - method",slug:"onnoclassdeffounderror-method",link:"#onnoclassdeffounderror-method",children:[]},{level:3,title:"ignored - method",slug:"ignored-method",link:"#ignored-method",children:[]}]}],path:"/en/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html",pathLocale:"/en/",extraFields:[]},{title:"ConstructorFinder - class",headers:[{level:2,title:"paramCount - field",slug:"paramcount-field",link:"#paramcount-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"emptyParam - method",slug:"emptyparam-method",link:"#emptyparam-method",children:[]},{level:2,title:"param - method",slug:"param-method",link:"#param-method",children:[]},{level:2,title:"param - method",slug:"param-method-1",link:"#param-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method",link:"#paramcount-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-1",link:"#paramcount-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-2",link:"#paramcount-method-2",children:[]},{level:2,title:"superClass - method",slug:"superclass-method",link:"#superclass-method",children:[]},{level:2,title:"RemedyPlan - class",slug:"remedyplan-class",link:"#remedyplan-class",children:[{level:3,title:"constructor - method",slug:"constructor-method",link:"#constructor-method",children:[]},{level:3,title:"Result - class",slug:"result-class",link:"#result-class",children:[]}]},{level:2,title:"Result - class",slug:"result-class-1",link:"#result-class-1",children:[{level:3,title:"result - method",slug:"result-method",link:"#result-method",children:[]},{level:3,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:3,title:"all - method",slug:"all-method",link:"#all-method",children:[]},{level:3,title:"give - method",slug:"give-method",link:"#give-method",children:[]},{level:3,title:"giveAll - method",slug:"giveall-method",link:"#giveall-method",children:[]},{level:3,title:"wait - method",slug:"wait-method",link:"#wait-method",children:[]},{level:3,title:"waitAll - method",slug:"waitall-method",link:"#waitall-method",children:[]},{level:3,title:"remedys - method",slug:"remedys-method",link:"#remedys-method",children:[]},{level:3,title:"onNoSuchConstructor - method",slug:"onnosuchconstructor-method",link:"#onnosuchconstructor-method",children:[]},{level:3,title:"ignored - method",slug:"ignored-method",link:"#ignored-method",children:[]},{level:3,title:"Instance - class",slug:"instance-class",link:"#instance-class",children:[]}]}],path:"/en/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html",pathLocale:"/en/",extraFields:[]},{title:"FieldFinder - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"type - field",slug:"type-field",link:"#type-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"order - method",slug:"order-method",link:"#order-method",children:[]},{level:2,title:"name - method",slug:"name-method",link:"#name-method",children:[]},{level:2,title:"name - method",slug:"name-method-1",link:"#name-method-1",children:[]},{level:2,title:"type - method",slug:"type-method",link:"#type-method",children:[]},{level:2,title:"type - method",slug:"type-method-1",link:"#type-method-1",children:[]},{level:2,title:"superClass - method",slug:"superclass-method",link:"#superclass-method",children:[]},{level:2,title:"RemedyPlan - class",slug:"remedyplan-class",link:"#remedyplan-class",children:[{level:3,title:"field - method",slug:"field-method",link:"#field-method",children:[]},{level:3,title:"Result - class",slug:"result-class",link:"#result-class",children:[]}]},{level:2,title:"Result - class",slug:"result-class-1",link:"#result-class-1",children:[{level:3,title:"result - method",slug:"result-method",link:"#result-method",children:[]},{level:3,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:3,title:"all - method",slug:"all-method",link:"#all-method",children:[]},{level:3,title:"give - method",slug:"give-method",link:"#give-method",children:[]},{level:3,title:"giveAll - method",slug:"giveall-method",link:"#giveall-method",children:[]},{level:3,title:"wait - method",slug:"wait-method",link:"#wait-method",children:[]},{level:3,title:"waitAll - method",slug:"waitall-method",link:"#waitall-method",children:[]},{level:3,title:"remedys - method",slug:"remedys-method",link:"#remedys-method",children:[]},{level:3,title:"onNoSuchField - method",slug:"onnosuchfield-method",link:"#onnosuchfield-method",children:[]},{level:3,title:"ignored - method",slug:"ignored-method",link:"#ignored-method",children:[]},{level:3,title:"Instance - class",slug:"instance-class",link:"#instance-class",children:[]}]}],path:"/en/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html",pathLocale:"/en/",extraFields:[]},{title:"MethodFinder - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"paramCount - field",slug:"paramcount-field",link:"#paramcount-field",children:[]},{level:2,title:"returnType - field",slug:"returntype-field",link:"#returntype-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"emptyParam - method",slug:"emptyparam-method",link:"#emptyparam-method",children:[]},{level:2,title:"param - method",slug:"param-method",link:"#param-method",children:[]},{level:2,title:"param - method",slug:"param-method-1",link:"#param-method-1",children:[]},{level:2,title:"order - method",slug:"order-method",link:"#order-method",children:[]},{level:2,title:"name - method",slug:"name-method",link:"#name-method",children:[]},{level:2,title:"name - method",slug:"name-method-1",link:"#name-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method",link:"#paramcount-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-1",link:"#paramcount-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-2",link:"#paramcount-method-2",children:[]},{level:2,title:"returnType - method",slug:"returntype-method",link:"#returntype-method",children:[]},{level:2,title:"returnType - method",slug:"returntype-method-1",link:"#returntype-method-1",children:[]},{level:2,title:"superClass - method",slug:"superclass-method",link:"#superclass-method",children:[]},{level:2,title:"RemedyPlan - class",slug:"remedyplan-class",link:"#remedyplan-class",children:[{level:3,title:"method - method",slug:"method-method",link:"#method-method",children:[]},{level:3,title:"Result - class",slug:"result-class",link:"#result-class",children:[]}]},{level:2,title:"Result - class",slug:"result-class-1",link:"#result-class-1",children:[{level:3,title:"result - method",slug:"result-method",link:"#result-method",children:[]},{level:3,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:3,title:"all - method",slug:"all-method",link:"#all-method",children:[]},{level:3,title:"give - method",slug:"give-method",link:"#give-method",children:[]},{level:3,title:"giveAll - method",slug:"giveall-method",link:"#giveall-method",children:[]},{level:3,title:"wait - method",slug:"wait-method",link:"#wait-method",children:[]},{level:3,title:"waitAll - method",slug:"waitall-method",link:"#waitall-method",children:[]},{level:3,title:"remedys - method",slug:"remedys-method",link:"#remedys-method",children:[]},{level:3,title:"onNoSuchMethod - method",slug:"onnosuchmethod-method",link:"#onnosuchmethod-method",children:[]},{level:3,title:"ignored - method",slug:"ignored-method",link:"#ignored-method",children:[]},{level:3,title:"Instance - class",slug:"instance-class",link:"#instance-class",children:[]},{level:3,title:"array - method",slug:"array-method",link:"#array-method",children:[]},{level:3,title:"list - method",slug:"list-method",link:"#list-method",children:[]}]}],path:"/en/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html",pathLocale:"/en/",extraFields:[]},{title:"ComponentTypeFactory - kt",headers:[],path:"/en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html",pathLocale:"/en/",extraFields:[]},{title:"GraphicsTypeFactory - kt",headers:[],path:"/en/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html",pathLocale:"/en/",extraFields:[]},{title:"ViewTypeFactory - kt",headers:[],path:"/en/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html",pathLocale:"/en/",extraFields:[]},{title:"DefinedTypeFactory - kt",headers:[{level:2,title:"VagueType - field",slug:"vaguetype-field",link:"#vaguetype-field",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html",pathLocale:"/en/",extraFields:[]},{title:"VariableTypeFactory - kt",headers:[],path:"/en/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html",pathLocale:"/en/",extraFields:[]},{title:"BaseFinder - class",headers:[{level:2,title:"BaseFinder.IndexTypeCondition - class",slug:"basefinder-indextypecondition-class",link:"#basefinder-indextypecondition-class",children:[{level:3,title:"index - method",slug:"index-method",link:"#index-method",children:[]},{level:3,title:"index - method",slug:"index-method-1",link:"#index-method-1",children:[]},{level:3,title:"IndexTypeConditionSort - class",slug:"indextypeconditionsort-class",link:"#indextypeconditionsort-class",children:[]}]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"DexClassFinder - class",headers:[{level:2,title:"companion object - object",slug:"companion-object-object",link:"#companion-object-object",children:[{level:3,title:"clearCache - method",slug:"clearcache-method",link:"#clearcache-method",children:[]}]},{level:2,title:"fullName - field",slug:"fullname-field",link:"#fullname-field",children:[]},{level:2,title:"simpleName - field",slug:"simplename-field",link:"#simplename-field",children:[]},{level:2,title:"singleName - field",slug:"singlename-field",link:"#singlename-field",children:[]},{level:2,title:"from - method",slug:"from-method",link:"#from-method",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"fullName - method",slug:"fullname-method",link:"#fullname-method",children:[]},{level:2,title:"simpleName - method",slug:"simplename-method",link:"#simplename-method",children:[]},{level:2,title:"singleName - method",slug:"singlename-method",link:"#singlename-method",children:[]},{level:2,title:"fullName - method",slug:"fullname-method-1",link:"#fullname-method-1",children:[]},{level:2,title:"simpleName - method",slug:"simplename-method-1",link:"#simplename-method-1",children:[]},{level:2,title:"singleName - method",slug:"singlename-method-1",link:"#singlename-method-1",children:[]},{level:2,title:"extends - method",slug:"extends-method",link:"#extends-method",children:[]},{level:2,title:"extends - method",slug:"extends-method-1",link:"#extends-method-1",children:[]},{level:2,title:"implements - method",slug:"implements-method",link:"#implements-method",children:[]},{level:2,title:"implements - method",slug:"implements-method-1",link:"#implements-method-1",children:[]},{level:2,title:"anonymous - method",slug:"anonymous-method",link:"#anonymous-method",children:[]},{level:2,title:"noExtends - method",slug:"noextends-method",link:"#noextends-method",children:[]},{level:2,title:"noImplements - method",slug:"noimplements-method",link:"#noimplements-method",children:[]},{level:2,title:"noSuper - method",slug:"nosuper-method",link:"#nosuper-method",children:[]},{level:2,title:"enclosing - method",slug:"enclosing-method",link:"#enclosing-method",children:[]},{level:2,title:"enclosing - method",slug:"enclosing-method-1",link:"#enclosing-method-1",children:[]},{level:2,title:"FromPackageRules - class",slug:"frompackagerules-class",link:"#frompackagerules-class",children:[{level:3,title:"absolute - method",slug:"absolute-method",link:"#absolute-method",children:[]}]},{level:2,title:"ClassNameRules - class",slug:"classnamerules-class",link:"#classnamerules-class",children:[{level:3,title:"optional - method",slug:"optional-method",link:"#optional-method",children:[]}]},{level:2,title:"member - method",slug:"member-method",link:"#member-method",children:[]},{level:2,title:"field - method",slug:"field-method",link:"#field-method",children:[]},{level:2,title:"method - method",slug:"method-method",link:"#method-method",children:[]},{level:2,title:"constructor - method",slug:"constructor-method",link:"#constructor-method",children:[]},{level:2,title:"Result - class",slug:"result-class",link:"#result-class",children:[{level:3,title:"result - method",slug:"result-method",link:"#result-method",children:[]},{level:3,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:3,title:"all - method",slug:"all-method",link:"#all-method",children:[]},{level:3,title:"all - method",slug:"all-method-1",link:"#all-method-1",children:[]},{level:3,title:"wait - method",slug:"wait-method",link:"#wait-method",children:[]},{level:3,title:"waitAll - method",slug:"waitall-method",link:"#waitall-method",children:[]},{level:3,title:"onNoClassDefFoundError - method",slug:"onnoclassdeffounderror-method",link:"#onnoclassdeffounderror-method",children:[]},{level:3,title:"ignored - method",slug:"ignored-method",link:"#ignored-method",children:[]}]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"ConstructorFinder - class",headers:[{level:2,title:"paramCount - field",slug:"paramcount-field",link:"#paramcount-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"emptyParam - method",slug:"emptyparam-method",link:"#emptyparam-method",children:[]},{level:2,title:"param - method",slug:"param-method",link:"#param-method",children:[]},{level:2,title:"param - method",slug:"param-method-1",link:"#param-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method",link:"#paramcount-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-1",link:"#paramcount-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-2",link:"#paramcount-method-2",children:[]},{level:2,title:"superClass - method",slug:"superclass-method",link:"#superclass-method",children:[]},{level:2,title:"RemedyPlan - class",slug:"remedyplan-class",link:"#remedyplan-class",children:[{level:3,title:"constructor - method",slug:"constructor-method",link:"#constructor-method",children:[]},{level:3,title:"Result - class",slug:"result-class",link:"#result-class",children:[]}]},{level:2,title:"Result - class",slug:"result-class-1",link:"#result-class-1",children:[{level:3,title:"result - method",slug:"result-method",link:"#result-method",children:[]},{level:3,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:3,title:"all - method",slug:"all-method",link:"#all-method",children:[]},{level:3,title:"give - method",slug:"give-method",link:"#give-method",children:[]},{level:3,title:"giveAll - method",slug:"giveall-method",link:"#giveall-method",children:[]},{level:3,title:"wait - method",slug:"wait-method",link:"#wait-method",children:[]},{level:3,title:"waitAll - method",slug:"waitall-method",link:"#waitall-method",children:[]},{level:3,title:"remedys - method",slug:"remedys-method",link:"#remedys-method",children:[]},{level:3,title:"onNoSuchConstructor - method",slug:"onnosuchconstructor-method",link:"#onnosuchconstructor-method",children:[]},{level:3,title:"ignored - method",slug:"ignored-method",link:"#ignored-method",children:[]},{level:3,title:"Instance - class",slug:"instance-class",link:"#instance-class",children:[]}]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"FieldFinder - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"type - field",slug:"type-field",link:"#type-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"order - method",slug:"order-method",link:"#order-method",children:[]},{level:2,title:"name - method",slug:"name-method",link:"#name-method",children:[]},{level:2,title:"name - method",slug:"name-method-1",link:"#name-method-1",children:[]},{level:2,title:"type - method",slug:"type-method",link:"#type-method",children:[]},{level:2,title:"type - method",slug:"type-method-1",link:"#type-method-1",children:[]},{level:2,title:"superClass - method",slug:"superclass-method",link:"#superclass-method",children:[]},{level:2,title:"RemedyPlan - class",slug:"remedyplan-class",link:"#remedyplan-class",children:[{level:3,title:"field - method",slug:"field-method",link:"#field-method",children:[]},{level:3,title:"Result - class",slug:"result-class",link:"#result-class",children:[]}]},{level:2,title:"Result - class",slug:"result-class-1",link:"#result-class-1",children:[{level:3,title:"result - method",slug:"result-method",link:"#result-method",children:[]},{level:3,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:3,title:"all - method",slug:"all-method",link:"#all-method",children:[]},{level:3,title:"give - method",slug:"give-method",link:"#give-method",children:[]},{level:3,title:"giveAll - method",slug:"giveall-method",link:"#giveall-method",children:[]},{level:3,title:"wait - method",slug:"wait-method",link:"#wait-method",children:[]},{level:3,title:"waitAll - method",slug:"waitall-method",link:"#waitall-method",children:[]},{level:3,title:"remedys - method",slug:"remedys-method",link:"#remedys-method",children:[]},{level:3,title:"onNoSuchField - method",slug:"onnosuchfield-method",link:"#onnosuchfield-method",children:[]},{level:3,title:"ignored - method",slug:"ignored-method",link:"#ignored-method",children:[]},{level:3,title:"Instance - class",slug:"instance-class",link:"#instance-class",children:[]}]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"MethodFinder - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"paramCount - field",slug:"paramcount-field",link:"#paramcount-field",children:[]},{level:2,title:"returnType - field",slug:"returntype-field",link:"#returntype-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"emptyParam - method",slug:"emptyparam-method",link:"#emptyparam-method",children:[]},{level:2,title:"param - method",slug:"param-method",link:"#param-method",children:[]},{level:2,title:"param - method",slug:"param-method-1",link:"#param-method-1",children:[]},{level:2,title:"order - method",slug:"order-method",link:"#order-method",children:[]},{level:2,title:"name - method",slug:"name-method",link:"#name-method",children:[]},{level:2,title:"name - method",slug:"name-method-1",link:"#name-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method",link:"#paramcount-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-1",link:"#paramcount-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-2",link:"#paramcount-method-2",children:[]},{level:2,title:"returnType - method",slug:"returntype-method",link:"#returntype-method",children:[]},{level:2,title:"returnType - method",slug:"returntype-method-1",link:"#returntype-method-1",children:[]},{level:2,title:"superClass - method",slug:"superclass-method",link:"#superclass-method",children:[]},{level:2,title:"RemedyPlan - class",slug:"remedyplan-class",link:"#remedyplan-class",children:[{level:3,title:"method - method",slug:"method-method",link:"#method-method",children:[]},{level:3,title:"Result - class",slug:"result-class",link:"#result-class",children:[]}]},{level:2,title:"Result - class",slug:"result-class-1",link:"#result-class-1",children:[{level:3,title:"result - method",slug:"result-method",link:"#result-method",children:[]},{level:3,title:"get - method",slug:"get-method",link:"#get-method",children:[]},{level:3,title:"all - method",slug:"all-method",link:"#all-method",children:[]},{level:3,title:"give - method",slug:"give-method",link:"#give-method",children:[]},{level:3,title:"giveAll - method",slug:"giveall-method",link:"#giveall-method",children:[]},{level:3,title:"wait - method",slug:"wait-method",link:"#wait-method",children:[]},{level:3,title:"waitAll - method",slug:"waitall-method",link:"#waitall-method",children:[]},{level:3,title:"remedys - method",slug:"remedys-method",link:"#remedys-method",children:[]},{level:3,title:"onNoSuchMethod - method",slug:"onnosuchmethod-method",link:"#onnosuchmethod-method",children:[]},{level:3,title:"ignored - method",slug:"ignored-method",link:"#ignored-method",children:[]},{level:3,title:"Instance - class",slug:"instance-class",link:"#instance-class",children:[]},{level:3,title:"array - method",slug:"array-method",link:"#array-method",children:[]},{level:3,title:"list - method",slug:"list-method",link:"#list-method",children:[]}]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"ComponentTypeFactory - kt",headers:[],path:"/zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"GraphicsTypeFactory - kt",headers:[],path:"/zh-cn/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"ViewTypeFactory - kt",headers:[],path:"/zh-cn/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"DefinedTypeFactory - kt",headers:[{level:2,title:"VagueType - field",slug:"vaguetype-field",link:"#vaguetype-field",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"VariableTypeFactory - kt",headers:[],path:"/zh-cn/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"CountRules - class",headers:[{level:2,title:"Int.isZero - i-ext-method",slug:"int-iszero-i-ext-method",link:"#int-iszero-i-ext-method",children:[]},{level:2,title:"Int.moreThan - i-ext-method",slug:"int-morethan-i-ext-method",link:"#int-morethan-i-ext-method",children:[]},{level:2,title:"Int.lessThan - i-ext-method",slug:"int-lessthan-i-ext-method",link:"#int-lessthan-i-ext-method",children:[]},{level:2,title:"Int.inInterval - i-ext-method",slug:"int-ininterval-i-ext-method",link:"#int-ininterval-i-ext-method",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html",pathLocale:"/en/",extraFields:[]},{title:"ModifierRules - class",headers:[{level:2,title:"isPublic - i-ext-field",slug:"ispublic-i-ext-field",link:"#ispublic-i-ext-field",children:[]},{level:2,title:"isPrivate - i-ext-field",slug:"isprivate-i-ext-field",link:"#isprivate-i-ext-field",children:[]},{level:2,title:"isProtected - i-ext-field",slug:"isprotected-i-ext-field",link:"#isprotected-i-ext-field",children:[]},{level:2,title:"isStatic - i-ext-field",slug:"isstatic-i-ext-field",link:"#isstatic-i-ext-field",children:[]},{level:2,title:"isFinal - i-ext-field",slug:"isfinal-i-ext-field",link:"#isfinal-i-ext-field",children:[]},{level:2,title:"isSynchronized - i-ext-field",slug:"issynchronized-i-ext-field",link:"#issynchronized-i-ext-field",children:[]},{level:2,title:"isVolatile - i-ext-field",slug:"isvolatile-i-ext-field",link:"#isvolatile-i-ext-field",children:[]},{level:2,title:"isTransient - i-ext-field",slug:"istransient-i-ext-field",link:"#istransient-i-ext-field",children:[]},{level:2,title:"isNative - i-ext-field",slug:"isnative-i-ext-field",link:"#isnative-i-ext-field",children:[]},{level:2,title:"isInterface - i-ext-field",slug:"isinterface-i-ext-field",link:"#isinterface-i-ext-field",children:[]},{level:2,title:"isAbstract - i-ext-field",slug:"isabstract-i-ext-field",link:"#isabstract-i-ext-field",children:[]},{level:2,title:"isStrict - i-ext-field",slug:"isstrict-i-ext-field",link:"#isstrict-i-ext-field",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html",pathLocale:"/en/",extraFields:[]},{title:"NameRules - class",headers:[{level:2,title:"String.isSynthetic - i-ext-method",slug:"string-issynthetic-i-ext-method",link:"#string-issynthetic-i-ext-method",children:[]},{level:2,title:"String.isOnlySymbols - i-ext-method",slug:"string-isonlysymbols-i-ext-method",link:"#string-isonlysymbols-i-ext-method",children:[]},{level:2,title:"String.isOnlyLetters - i-ext-method",slug:"string-isonlyletters-i-ext-method",link:"#string-isonlyletters-i-ext-method",children:[]},{level:2,title:"String.isOnlyNumbers - i-ext-method",slug:"string-isonlynumbers-i-ext-method",link:"#string-isonlynumbers-i-ext-method",children:[]},{level:2,title:"String.isOnlyLettersNumbers - i-ext-method",slug:"string-isonlylettersnumbers-i-ext-method",link:"#string-isonlylettersnumbers-i-ext-method",children:[]},{level:2,title:"String.isOnlyLowercase - i-ext-method",slug:"string-isonlylowercase-i-ext-method",link:"#string-isonlylowercase-i-ext-method",children:[]},{level:2,title:"String.isOnlyUppercase - i-ext-method",slug:"string-isonlyuppercase-i-ext-method",link:"#string-isonlyuppercase-i-ext-method",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html",pathLocale:"/en/",extraFields:[]},{title:"ObjectRules - class",headers:[],path:"/en/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html",pathLocale:"/en/",extraFields:[]},{title:"ConstructorRules - class",headers:[{level:2,title:"paramCount - field",slug:"paramcount-field",link:"#paramcount-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"emptyParam - method",slug:"emptyparam-method",link:"#emptyparam-method",children:[]},{level:2,title:"param - method",slug:"param-method",link:"#param-method",children:[]},{level:2,title:"param - method",slug:"param-method-1",link:"#param-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method",link:"#paramcount-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-1",link:"#paramcount-method-1",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html",pathLocale:"/en/",extraFields:[]},{title:"FieldRules - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"type - field",slug:"type-field",link:"#type-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"name - method",slug:"name-method",link:"#name-method",children:[]},{level:2,title:"type - method",slug:"type-method",link:"#type-method",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html",pathLocale:"/en/",extraFields:[]},{title:"MemberRules - class",headers:[{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html",pathLocale:"/en/",extraFields:[]},{title:"MethodRules - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"paramCount - field",slug:"paramcount-field",link:"#paramcount-field",children:[]},{level:2,title:"returnType - field",slug:"returntype-field",link:"#returntype-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"emptyParam - method",slug:"emptyparam-method",link:"#emptyparam-method",children:[]},{level:2,title:"param - method",slug:"param-method",link:"#param-method",children:[]},{level:2,title:"param - method",slug:"param-method-1",link:"#param-method-1",children:[]},{level:2,title:"name - method",slug:"name-method",link:"#name-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method",link:"#paramcount-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-1",link:"#paramcount-method-1",children:[]},{level:2,title:"returnType - method",slug:"returntype-method",link:"#returntype-method",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html",pathLocale:"/en/",extraFields:[]},{title:"CountRules - class",headers:[{level:2,title:"Int.isZero - i-ext-method",slug:"int-iszero-i-ext-method",link:"#int-iszero-i-ext-method",children:[]},{level:2,title:"Int.moreThan - i-ext-method",slug:"int-morethan-i-ext-method",link:"#int-morethan-i-ext-method",children:[]},{level:2,title:"Int.lessThan - i-ext-method",slug:"int-lessthan-i-ext-method",link:"#int-lessthan-i-ext-method",children:[]},{level:2,title:"Int.inInterval - i-ext-method",slug:"int-ininterval-i-ext-method",link:"#int-ininterval-i-ext-method",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"ModifierRules - class",headers:[{level:2,title:"isPublic - i-ext-field",slug:"ispublic-i-ext-field",link:"#ispublic-i-ext-field",children:[]},{level:2,title:"isPrivate - i-ext-field",slug:"isprivate-i-ext-field",link:"#isprivate-i-ext-field",children:[]},{level:2,title:"isProtected - i-ext-field",slug:"isprotected-i-ext-field",link:"#isprotected-i-ext-field",children:[]},{level:2,title:"isStatic - i-ext-field",slug:"isstatic-i-ext-field",link:"#isstatic-i-ext-field",children:[]},{level:2,title:"isFinal - i-ext-field",slug:"isfinal-i-ext-field",link:"#isfinal-i-ext-field",children:[]},{level:2,title:"isSynchronized - i-ext-field",slug:"issynchronized-i-ext-field",link:"#issynchronized-i-ext-field",children:[]},{level:2,title:"isVolatile - i-ext-field",slug:"isvolatile-i-ext-field",link:"#isvolatile-i-ext-field",children:[]},{level:2,title:"isTransient - i-ext-field",slug:"istransient-i-ext-field",link:"#istransient-i-ext-field",children:[]},{level:2,title:"isNative - i-ext-field",slug:"isnative-i-ext-field",link:"#isnative-i-ext-field",children:[]},{level:2,title:"isInterface - i-ext-field",slug:"isinterface-i-ext-field",link:"#isinterface-i-ext-field",children:[]},{level:2,title:"isAbstract - i-ext-field",slug:"isabstract-i-ext-field",link:"#isabstract-i-ext-field",children:[]},{level:2,title:"isStrict - i-ext-field",slug:"isstrict-i-ext-field",link:"#isstrict-i-ext-field",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"NameRules - class",headers:[{level:2,title:"String.isSynthetic - i-ext-method",slug:"string-issynthetic-i-ext-method",link:"#string-issynthetic-i-ext-method",children:[]},{level:2,title:"String.isOnlySymbols - i-ext-method",slug:"string-isonlysymbols-i-ext-method",link:"#string-isonlysymbols-i-ext-method",children:[]},{level:2,title:"String.isOnlyLetters - i-ext-method",slug:"string-isonlyletters-i-ext-method",link:"#string-isonlyletters-i-ext-method",children:[]},{level:2,title:"String.isOnlyNumbers - i-ext-method",slug:"string-isonlynumbers-i-ext-method",link:"#string-isonlynumbers-i-ext-method",children:[]},{level:2,title:"String.isOnlyLettersNumbers - i-ext-method",slug:"string-isonlylettersnumbers-i-ext-method",link:"#string-isonlylettersnumbers-i-ext-method",children:[]},{level:2,title:"String.isOnlyLowercase - i-ext-method",slug:"string-isonlylowercase-i-ext-method",link:"#string-isonlylowercase-i-ext-method",children:[]},{level:2,title:"String.isOnlyUppercase - i-ext-method",slug:"string-isonlyuppercase-i-ext-method",link:"#string-isonlyuppercase-i-ext-method",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"ObjectRules - class",headers:[],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"ConstructorRules - class",headers:[{level:2,title:"paramCount - field",slug:"paramcount-field",link:"#paramcount-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"emptyParam - method",slug:"emptyparam-method",link:"#emptyparam-method",children:[]},{level:2,title:"param - method",slug:"param-method",link:"#param-method",children:[]},{level:2,title:"param - method",slug:"param-method-1",link:"#param-method-1",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method",link:"#paramcount-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-1",link:"#paramcount-method-1",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"FieldRules - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"type - field",slug:"type-field",link:"#type-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"name - method",slug:"name-method",link:"#name-method",children:[]},{level:2,title:"type - method",slug:"type-method",link:"#type-method",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"MemberRules - class",headers:[{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"MethodRules - class",headers:[{level:2,title:"name - field",slug:"name-field",link:"#name-field",children:[]},{level:2,title:"paramCount - field",slug:"paramcount-field",link:"#paramcount-field",children:[]},{level:2,title:"returnType - field",slug:"returntype-field",link:"#returntype-field",children:[]},{level:2,title:"modifiers - method",slug:"modifiers-method",link:"#modifiers-method",children:[]},{level:2,title:"emptyParam - method",slug:"emptyparam-method",link:"#emptyparam-method",children:[]},{level:2,title:"param - method",slug:"param-method",link:"#param-method",children:[]},{level:2,title:"param - method",slug:"param-method-1",link:"#param-method-1",children:[]},{level:2,title:"name - method",slug:"name-method",link:"#name-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method",link:"#paramcount-method",children:[]},{level:2,title:"paramCount - method",slug:"paramcount-method-1",link:"#paramcount-method-1",children:[]},{level:2,title:"returnType - method",slug:"returntype-method",link:"#returntype-method",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"MemberRulesResult - class",headers:[{level:2,title:"none - method",slug:"none-method",link:"#none-method",children:[]},{level:2,title:"count - method",slug:"count-method",link:"#count-method",children:[]},{level:2,title:"count - method",slug:"count-method-1",link:"#count-method-1",children:[]},{level:2,title:"count - method",slug:"count-method-2",link:"#count-method-2",children:[]}],path:"/en/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html",pathLocale:"/en/",extraFields:[]},{title:"MemberRulesResult - class",headers:[{level:2,title:"none - method",slug:"none-method",link:"#none-method",children:[]},{level:2,title:"count - method",slug:"count-method",link:"#count-method",children:[]},{level:2,title:"count - method",slug:"count-method-1",link:"#count-method-1",children:[]},{level:2,title:"count - method",slug:"count-method-2",link:"#count-method-2",children:[]}],path:"/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html",pathLocale:"/zh-cn/",extraFields:[]},{title:"",headers:[],path:"/404.html",pathLocale:"/",extraFields:[]}],hp=_e(dp),fp=()=>hp,mp=({searchIndex:e,routeLocale:t,query:l,maxSuggestions:n})=>{const i=U(()=>e.value.filter(o=>o.pathLocale===t.value));return U(()=>{const o=l.value.trim().toLowerCase();if(!o)return[];const r=[],a=(s,c)=>{fr(o,[c.title])&&r.push({link:`${s.path}#${c.slug}`,title:s.title,header:c.title});for(const u of c.children){if(r.length>=n.value)return;a(s,u)}};for(const s of i.value){if(r.length>=n.value)break;if(fr(o,[s.title,...s.extraFields])){r.push({link:s.path,title:s.title});continue}for(const c of s.headers){if(r.length>=n.value)break;a(s,c)}}return r})},pp=e=>{const t=_e(0);return{focusIndex:t,focusNext:()=>{t.value{t.value>0?t.value-=1:t.value=e.value.length-1}}},gp=he({name:"SearchBox",props:{locales:{type:Object,required:!1,default:()=>({})},hotKeys:{type:Array,required:!1,default:()=>[]},maxSuggestions:{type:Number,required:!1,default:5}},setup(e){const{locales:t,hotKeys:l,maxSuggestions:n}=Pn(e),i=Zt(),o=Gl(),r=fp(),a=_e(null),s=_e(!1),c=_e(""),u=U(()=>t.value[o.value]??{}),d=mp({searchIndex:r,routeLocale:o,query:c,maxSuggestions:n}),{focusIndex:h,focusNext:p,focusPrev:k}=pp(d);up({input:a,hotKeys:l});const E=U(()=>s.value&&!!d.value.length),L=()=>{E.value&&k()},A=()=>{E.value&&p()},T=v=>{if(!E.value)return;const y=d.value[v];y&&i.push(y.link).then(()=>{c.value="",h.value=0})};return()=>ce("form",{class:"search-box",role:"search"},[ce("input",{ref:a,type:"search",placeholder:u.value.placeholder,autocomplete:"off",spellcheck:!1,value:c.value,onFocus:()=>s.value=!0,onBlur:()=>s.value=!1,onInput:v=>c.value=v.target.value,onKeydown:v=>{switch(v.key){case"ArrowUp":{L();break}case"ArrowDown":{A();break}case"Enter":{v.preventDefault(),T(h.value);break}}}}),E.value&&ce("ul",{class:"suggestions",onMouseleave:()=>h.value=-1},d.value.map(({link:v,title:y,header:V},Y)=>ce("li",{class:["suggestion",{focus:h.value===Y}],onMouseenter:()=>h.value=Y,onMousedown:()=>T(Y)},ce("a",{href:v,onClick:M=>M.preventDefault()},[ce("span",{class:"page-title"},y),V&&ce("span",{class:"page-header"},`> ${V}`)]))))])}});var vp=["s","/"],_p={"/en/":{placeholder:"Search"},"/zh-cn/":{placeholder:"搜索"}};const bp=_p,yp=vp,kp=5,xp=xt({enhance({app:e}){e.component("SearchBox",t=>ce(gp,{locales:bp,hotKeys:yp,maxSuggestions:kp,...t}))}}),Ep={},Js=e=>(Ya("data-v-25c96c98"),e=e(),Ga(),e),Cp={class:"deprecated-banner"},Rp=Js(()=>ue("a",{href:"https://github.com/HighCapable/KavaRef",target:"_blank",rel:"noopener"},"KavaRef",-1)),Lp=Js(()=>ue("a",{href:"https://github.com/HighCapable/KavaRef/blob/main/README-zh-CN.md",target:"_blank",rel:"noopener"},"KavaRef",-1));function wp(e,t){return B(),ee("div",Cp,[ot(" YukiReflection is deprecated, Start trying "),Rp,ot(" now!  YukiReflection 已被弃用,立即尝试 "),Lp,ot(" 吧! ")])}const Tp=Re(Ep,[["render",wp],["__scopeId","data-v-25c96c98"],["__file","DeprecatedBanner.vue"]]),Ap=xt({rootComponents:[()=>ce(Tp)],setup(){const e=Mt(),t=()=>{requestAnimationFrame(()=>{const l=document.querySelector(".deprecated-banner"),n=(l==null?void 0:l.clientHeight)??0,i=document.querySelector(".theme-container"),o=document.querySelector(".navbar"),r=document.querySelector(".sidebar");n>0&&(i&&(i.style.paddingTop=`${n}px`),o&&(o.style.marginTop=`${n}px`),r&&(r.style.marginTop=`${n}px`))})};He(()=>{t()}),We(()=>e.path,()=>{t()})}}),un=[Qd,eh,oh,_h,xh,wh,op,xp,Ap],Pp=[["v-8daa1a0e","/",{title:""},["/index.md"]],["v-2d0a870d","/en/",{title:"Home"},["/en/index.md"]],["v-c0c85b84","/zh-cn/",{title:"首页"},["/zh-cn/index.md"]],["v-7a15fe3b","/en/about/about.html",{title:"About This Document"},[":md"]],["v-3f851d14","/en/about/changelog.html",{title:"Changelog"},[":md"]],["v-193cf592","/en/about/contacts.html",{title:"Contact Us"},[":md"]],["v-ae7b83f2","/en/about/future.html",{title:"Looking for Future"},[":md"]],["v-c557cfcc","/en/api/features.html",{title:"Features"},[":md"]],["v-64fc7bb8","/en/api/home.html",{title:"Document Introduce"},[":md"]],["v-9cfea7fc","/en/config/api-example.html",{title:"API Basic Configs"},[":md"]],["v-72c12b7d","/en/config/api-exception.html",{title:"API Exception Handling"},[":md"]],["v-efb45d4c","/en/guide/home.html",{title:"Introduce"},[":md"]],["v-72889797","/en/guide/quick-start.html",{title:"Quick Start"},[":md"]],["v-41967128","/zh-cn/about/about.html",{title:"关于此文档"},[":md"]],["v-0e6c3476","/zh-cn/about/changelog.html",{title:"更新日志"},[":md"]],["v-6cf86266","/zh-cn/about/contacts.html",{title:"联系我们"},[":md"]],["v-3106ca14","/zh-cn/about/future.html",{title:"展望未来"},[":md"]],["v-47e315ee","/zh-cn/api/features.html",{title:"功能介绍"},[":md"]],["v-c8deafb2","/zh-cn/api/home.html",{title:"文档介绍"},[":md"]],["v-c6114c9e","/zh-cn/config/api-example.html",{title:"API 基本配置"},[":md"]],["v-5b43296c","/zh-cn/config/api-exception.html",{title:"API 异常处理"},[":md"]],["v-6a609e09","/zh-cn/guide/home.html",{title:"介绍"},[":md"]],["v-24840ff0","/zh-cn/guide/quick-start.html",{title:"快速开始"},[":md"]],["v-23f4d2be","/en/api/public/com/highcapable/yukireflection/YukiReflection.html",{title:"YukiReflection - object"},[":md"]],["v-c088ede0","/zh-cn/api/public/com/highcapable/yukireflection/YukiReflection.html",{title:"YukiReflection - object"},[":md"]],["v-47f17664","/en/api/public/com/highcapable/yukireflection/bean/CurrentClass.html",{title:"CurrentClass - class"},[":md"]],["v-38df33ac","/en/api/public/com/highcapable/yukireflection/bean/GenericClass.html",{title:"GenericClass - class"},[":md"]],["v-3a8666c0","/en/api/public/com/highcapable/yukireflection/bean/VariousClass.html",{title:"VariousClass - class"},[":md"]],["v-728f231c","/en/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html",{title:"ReflectionFactory - kt"},[":md"]],["v-0f70fc50","/en/api/public/com/highcapable/yukireflection/log/YLog.html",{title:"YLog - object"},[":md"]],["v-406687ff","/zh-cn/api/public/com/highcapable/yukireflection/bean/CurrentClass.html",{title:"CurrentClass - class"},[":md"]],["v-c5831246","/zh-cn/api/public/com/highcapable/yukireflection/bean/GenericClass.html",{title:"GenericClass - class"},[":md"]],["v-c234ac1e","/zh-cn/api/public/com/highcapable/yukireflection/bean/VariousClass.html",{title:"VariousClass - class"},[":md"]],["v-b3841eba","/zh-cn/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html",{title:"ReflectionFactory - kt"},[":md"]],["v-736d2dff","/zh-cn/api/public/com/highcapable/yukireflection/log/YLog.html",{title:"YLog - object"},[":md"]],["v-740d06da","/en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html",{title:"BaseFinder - class"},[":md"]],["v-6d6cd473","/en/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html",{title:"DexClassFinder - class"},[":md"]],["v-b3220076","/en/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html",{title:"ConstructorFinder - class"},[":md"]],["v-4b907076","/en/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html",{title:"FieldFinder - class"},[":md"]],["v-012ee5a6","/en/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html",{title:"MethodFinder - class"},[":md"]],["v-7f47f9f8","/en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html",{title:"ComponentTypeFactory - kt"},[":md"]],["v-5a1019d6","/en/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html",{title:"GraphicsTypeFactory - kt"},[":md"]],["v-be0e3220","/en/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html",{title:"ViewTypeFactory - kt"},[":md"]],["v-30e525ac","/en/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html",{title:"DefinedTypeFactory - kt"},[":md"]],["v-12f074b0","/en/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html",{title:"VariableTypeFactory - kt"},[":md"]],["v-c945cb6e","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html",{title:"BaseFinder - class"},[":md"]],["v-2d13d624","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html",{title:"DexClassFinder - class"},[":md"]],["v-722cd474","/zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html",{title:"ConstructorFinder - class"},[":md"]],["v-293ae898","/zh-cn/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html",{title:"FieldFinder - class"},[":md"]],["v-155c9f97","/zh-cn/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html",{title:"MethodFinder - class"},[":md"]],["v-6c58c435","/zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html",{title:"ComponentTypeFactory - kt"},[":md"]],["v-25cdee85","/zh-cn/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html",{title:"GraphicsTypeFactory - kt"},[":md"]],["v-12826b1f","/zh-cn/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html",{title:"ViewTypeFactory - kt"},[":md"]],["v-597ac69b","/zh-cn/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html",{title:"DefinedTypeFactory - kt"},[":md"]],["v-5ad1133e","/zh-cn/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html",{title:"VariableTypeFactory - kt"},[":md"]],["v-6f96d791","/en/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html",{title:"CountRules - class"},[":md"]],["v-56071599","/en/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html",{title:"ModifierRules - class"},[":md"]],["v-4ea9e766","/en/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html",{title:"NameRules - class"},[":md"]],["v-3045c7fe","/en/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html",{title:"ObjectRules - class"},[":md"]],["v-cce2b7b6","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html",{title:"ConstructorRules - class"},[":md"]],["v-82a85036","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html",{title:"FieldRules - class"},[":md"]],["v-71ecb893","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html",{title:"MemberRules - class"},[":md"]],["v-5e7e121a","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html",{title:"MethodRules - class"},[":md"]],["v-3dbf4880","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html",{title:"CountRules - class"},[":md"]],["v-701721ec","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html",{title:"ModifierRules - class"},[":md"]],["v-264e7384","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html",{title:"NameRules - class"},[":md"]],["v-b0f7c49c","/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html",{title:"ObjectRules - class"},[":md"]],["v-ec153654","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html",{title:"ConstructorRules - class"},[":md"]],["v-30993156","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html",{title:"FieldRules - class"},[":md"]],["v-3daa8d42","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html",{title:"MemberRules - class"},[":md"]],["v-2a3be6c9","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html",{title:"MethodRules - class"},[":md"]],["v-4f47dfda","/en/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html",{title:"MemberRulesResult - class"},[":md"]],["v-503f5f8b","/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html",{title:"MemberRulesResult - class"},[":md"]],["v-3706649a","/404.html",{title:""},[]]];var mr=he({name:"Vuepress",setup(){const e=Nu();return()=>ce(e.value)}}),Op=()=>Pp.reduce((e,[t,l,n,i])=>(e.push({name:t,path:l,component:mr,meta:n},{path:l.endsWith("/")?l+"index.html":l.substring(0,l.length-5),redirect:l},...i.map(o=>({path:o===":md"?l.substring(0,l.length-5)+".md":o,redirect:l}))),e),[{name:"404",path:"/:catchAll(.*)",component:mr}]),Ip=sd,Sp=()=>{const e=Ud({history:Ip(ds("/YukiReflection/")),routes:Op(),scrollBehavior:(t,l,n)=>n||(t.hash?{el:t.hash}:{top:0})});return e.beforeResolve(async(t,l)=>{var n;(t.path!==l.path||l===pt)&&([t.meta._data]=await Promise.all([mt.resolvePageData(t.name),(n=ms[t.name])==null?void 0:n.__asyncLoader()]))}),e},Fp=e=>{e.component("ClientOnly",ji),e.component("Content",Bu)},Dp=(e,t,l)=>{const n=ar(()=>t.currentRoute.value.path),i=ar(()=>mt.resolveRouteLocale(nl.value.locales,n.value)),o=Ph(n,()=>t.currentRoute.value.meta._data),r=U(()=>mt.resolveLayouts(l)),a=U(()=>mt.resolveSiteLocaleData(nl.value,i.value)),s=U(()=>mt.resolvePageFrontmatter(o.value)),c=U(()=>mt.resolvePageHeadTitle(o.value,a.value)),u=U(()=>mt.resolvePageHead(c.value,s.value,a.value)),d=U(()=>mt.resolvePageLang(o.value,a.value)),h=U(()=>mt.resolvePageLayout(o.value,r.value));return e.provide(Su,r),e.provide(ps,o),e.provide(gs,s),e.provide(zu,c),e.provide(vs,u),e.provide(_s,d),e.provide(bs,h),e.provide(Vi,i),e.provide(ks,a),Object.defineProperties(e.config.globalProperties,{$frontmatter:{get:()=>s.value},$head:{get:()=>u.value},$headTitle:{get:()=>c.value},$lang:{get:()=>d.value},$page:{get:()=>o.value},$routeLocale:{get:()=>i.value},$site:{get:()=>nl.value},$siteLocale:{get:()=>a.value},$withBase:{get:()=>Bi}}),{layouts:r,pageData:o,pageFrontmatter:s,pageHead:u,pageHeadTitle:c,pageLang:d,pageLayout:h,routeLocale:i,siteData:nl,siteLocaleData:a}},zp=()=>{const e=Du(),t=Mu(),l=_e([]),n=()=>{e.value.forEach(o=>{const r=Mp(o);r&&l.value.push(r)})},i=()=>{document.documentElement.lang=t.value,l.value.forEach(o=>{o.parentNode===document.head&&document.head.removeChild(o)}),l.value.splice(0,l.value.length),e.value.forEach(o=>{const r=Np(o);r!==null&&(document.head.appendChild(r),l.value.push(r))})};Wt(Vu,i),He(()=>{n(),i(),We(()=>e.value,i)})},Mp=([e,t,l=""])=>{const n=Object.entries(t).map(([a,s])=>ge(s)?`[${a}=${JSON.stringify(s)}]`:s===!0?`[${a}]`:"").join(""),i=`head > ${e}${n}`;return Array.from(document.querySelectorAll(i)).find(a=>a.innerText===l)||null},Np=([e,t,l])=>{if(!ge(e))return null;const n=document.createElement(e);return $i(t)&&Object.entries(t).forEach(([i,o])=>{ge(o)?n.setAttribute(i,o):o===!0&&n.setAttribute(i,"")}),ge(l)&&n.appendChild(document.createTextNode(l)),n},$p=Cu,Vp=async()=>{var l;const e=$p({name:"VuepressApp",setup(){var n;zp();for(const i of un)(n=i.setup)==null||n.call(i);return()=>[ce(Ss),...un.flatMap(({rootComponents:i=[]})=>i.map(o=>ce(o)))]}}),t=Sp();Fp(e),Dp(e,t,un);for(const n of un)await((l=n.enhance)==null?void 0:l.call(n,{app:e,router:t,siteData:nl}));return e.use(t),{app:e,router:t}};Vp().then(({app:e,router:t})=>{t.isReady().then(()=>{e.mount("#app")})});export{Re as _,Nc as a,ue as b,ee as c,Vp as createVueApp,ot as d,ie as e,B as o,yt as r,ze as w}; +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = [] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} \ No newline at end of file diff --git a/assets/changelog.html-2qAsS2UI.js b/assets/changelog.html-2qAsS2UI.js new file mode 100644 index 0000000..36c7bcc --- /dev/null +++ b/assets/changelog.html-2qAsS2UI.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-0e6c3476","path":"/zh-cn/about/changelog.html","title":"更新日志","lang":"zh-CN","frontmatter":{},"headers":[{"level":3,"title":"1.0.3 | 2023.10.07","slug":"_1-0-3-2023-10-07","link":"#_1-0-3-2023-10-07","children":[]},{"level":3,"title":"1.0.2 | 2023.04.25","slug":"_1-0-2-2023-04-25","link":"#_1-0-2-2023-04-25","children":[]},{"level":3,"title":"1.0.1 | 2023.04.16","slug":"_1-0-1-2023-04-16","link":"#_1-0-1-2023-04-16","children":[]},{"level":3,"title":"1.0.0 | 2023.01.26","slug":"_1-0-0-2023-01-26","link":"#_1-0-0-2023-01-26","children":[]}],"git":{"updatedTime":1696672955000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"zh-cn/about/changelog.md"}');export{e as data}; diff --git a/assets/changelog.html-P4l7oFKE.js b/assets/changelog.html-P4l7oFKE.js new file mode 100644 index 0000000..f854459 --- /dev/null +++ b/assets/changelog.html-P4l7oFKE.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-3f851d14","path":"/en/about/changelog.html","title":"Changelog","lang":"en-US","frontmatter":{},"headers":[{"level":3,"title":"1.0.3 | 2023.10.07","slug":"_1-0-3-2023-10-07","link":"#_1-0-3-2023-10-07","children":[]},{"level":3,"title":"1.0.2 | 2023.04.25","slug":"_1-0-2-2023-04-25","link":"#_1-0-2-2023-04-25","children":[]},{"level":3,"title":"1.0.1 | 2023.04.16","slug":"_1-0-1-2023-04-16","link":"#_1-0-1-2023-04-16","children":[]},{"level":3,"title":"1.0.0 | 2023.01.26","slug":"_1-0-0-2023-01-26","link":"#_1-0-0-2023-01-26","children":[]}],"git":{"updatedTime":1696672955000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"en/about/changelog.md"}');export{e as data}; diff --git a/assets/changelog.html-W-b8mvsm.js b/assets/changelog.html-W-b8mvsm.js new file mode 100644 index 0000000..fd6351e --- /dev/null +++ b/assets/changelog.html-W-b8mvsm.js @@ -0,0 +1 @@ +import{_ as s,r as l,o as d,c,b as e,d as o,e as t,a}from"./app-Un_zyw_U.js";const r={},h=a('

Changelog

The version update history of YukiReflection is recorded here.

Pay Attention

We will only maintain the latest API version, if you are using an outdate API version, you voluntarily renounce any possibility of maintenance.

Notice

To avoid translation time consumption, Changelog will use Google Translation from Chinese to English, please refer to the original text for actual reference.

Time zone of version release date: UTC+8

',4),u={id:"_1-0-3-2023-10-07",tabindex:"-1"},_=e("a",{class:"header-anchor",href:"#_1-0-3-2023-10-07","aria-hidden":"true"},"#",-1),f=e("li",null,[o("The license agreement has been changed from "),e("code",null,"MIT"),o(" to "),e("code",null,"Apache-2.0"),o(", subsequent versions will be distributed under this license agreement, you should change the relevant license agreement after using this version")],-1),g=e("li",null,[o("Change the type of dependency library from "),e("strong",null,"Android Library"),o(" (aar) back to "),e("strong",null,"Java Library"),o(" (jar)")],-1),p=e("li",null,"Adapt and support the native Java platform (some functions are only available on the Android platform)",-1),m={href:"https://github.com/HighCapable/YukiHookAPI/pull/38",target:"_blank",rel:"noopener noreferrer"},b=e("code",null,"YukiReflection",-1),y=a("
  • Deprecated isAllowPrintingLogs, please start using the debugLog method
  • Added YukiReflection.TAG
  • Obsolete YukiReflection.API_VERSION_NAME, YukiReflection.API_VERSION_CODE, merged into YukiReflection.VERSION
  • Refactored remendy functionality in find methods, which now prints exceptions in steps
  • The multi-method find result type is changed from HashSet to MutableList
  • Added method(), constructor(), field() to directly obtain all object functions in the class
  • constructor() no longer behaves like constructor { emptyParam() }
  • Added lazyClass and lazyClassOrNull methods to lazily load Class
  • ",8),v={id:"_1-0-2-2023-04-25",tabindex:"-1"},k=e("a",{class:"header-anchor",href:"#_1-0-2-2023-04-25","aria-hidden":"true"},"#",-1),x=e("code",null,"Member",-1),A={href:"https://github.com/Art-Chen",target:"_blank",rel:"noopener noreferrer"},C=e("li",null,[o("Remove the direct cache function of "),e("code",null,"Member"),o(" and deprecated "),e("s",null,[e("code",null,"YukiReflection.Configs.isEnableMemberCache")]),o(", keep the cache function of "),e("code",null,"Class")],-1),R=e("li",null,[o("Modified finder to "),e("code",null,"Sequence"),o(", optimize the finding speed and performance of "),e("code",null,"Member")],-1),w={id:"_1-0-1-2023-04-16",tabindex:"-1"},I=e("a",{class:"header-anchor",href:"#_1-0-1-2023-04-16","aria-hidden":"true"},"#",-1),T=e("ul",null,[e("li",null,[o("Change the type of dependency library from "),e("strong",null,"Java Library"),o(" (jar) to "),e("strong",null,"Android Library"),o(" (aar)")]),e("li",null,[o("Removed wrong "),e("code",null,"Class"),o(" object declaration in Android "),e("code",null,"type")])],-1),E={id:"_1-0-0-2023-01-26",tabindex:"-1"},M=e("a",{class:"header-anchor",href:"#_1-0-0-2023-01-26","aria-hidden":"true"},"#",-1),N=e("ul",null,[e("li",null,"The first version is submitted to Maven")],-1);function L(O,P){const n=l("Badge"),i=l("ExternalLinkIcon");return d(),c("div",null,[h,e("h3",u,[_,o(" 1.0.3 | 2023.10.07  "),t(n,{type:"tip",text:"latest",vertical:"middle"})]),e("ul",null,[f,g,p,e("li",null,[o("Fixed "),e("a",m,[o("fix get interfaces of class"),t(i)]),o(" issue and merged into "),b]),y]),e("h3",v,[k,o(" 1.0.2 | 2023.04.25  "),t(n,{type:"warning",text:"stale",vertical:"middle"})]),e("ul",null,[e("li",null,[o("Fixed a critical issue where the "),x,o(" cache did not take effect and persistent storage eventually caused app out of memory (OOM), thanks to "),e("a",A,[o("Art-Chen"),t(i)])]),C,R]),e("h3",w,[I,o(" 1.0.1 | 2023.04.16  "),t(n,{type:"warning",text:"stale",vertical:"middle"})]),T,e("h3",E,[M,o(" 1.0.0 | 2023.01.26  "),t(n,{type:"warning",text:"stale",vertical:"middle"})]),N])}const V=s(r,[["render",L],["__file","changelog.html.vue"]]);export{V as default}; diff --git a/assets/changelog.html-rt4TZTG3.js b/assets/changelog.html-rt4TZTG3.js new file mode 100644 index 0000000..96ba662 --- /dev/null +++ b/assets/changelog.html-rt4TZTG3.js @@ -0,0 +1 @@ +import{_ as i,r as n,o as a,c as s,b as e,d as o,e as l,a as d}from"./app-Un_zyw_U.js";const r={},_=e("h1",{id:"更新日志",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#更新日志","aria-hidden":"true"},"#"),o(" 更新日志")],-1),h=e("blockquote",null,[e("p",null,[o("这里记录了 "),e("code",null,"YukiReflection"),o(" 的版本更新历史。")])],-1),u=e("div",{class:"custom-container danger"},[e("p",{class:"custom-container-title"},"特别注意"),e("p",null,"我们只会对最新的 API 版本进行维护,若你正在使用过时的 API 版本则代表你自愿放弃一切维护的可能性。")],-1),f={id:"_1-0-3-2023-10-07",tabindex:"-1"},g=e("a",{class:"header-anchor",href:"#_1-0-3-2023-10-07","aria-hidden":"true"},"#",-1),m=e("li",null,[o("许可协议由 "),e("code",null,"MIT"),o(" 变更为 "),e("code",null,"Apache-2.0"),o(",在此之后的版本将由此许可协议进行分发,您在使用此版本后应变更相关许可协议")],-1),p=e("li",null,[o("将依赖库的类型由 "),e("strong",null,"Android Library"),o(" (aar) 修改回 "),e("strong",null,"Java Library"),o(" (jar)")],-1),b=e("li",null,"适配并支持原生 Java 平台 (部分功能仅限 Android 平台)",-1),k={href:"https://github.com/HighCapable/YukiHookAPI/pull/38",target:"_blank",rel:"noopener noreferrer"},x=e("code",null,"YukiReflection",-1),A=d("
  • 作废了 isAllowPrintingLogs,请开始使用 debugLog 方法
  • 新增 YukiReflection.TAG
  • 作废了 YukiReflection.API_VERSION_NAMEYukiReflection.API_VERSION_CODE,统一合并到 YukiReflection.VERSION
  • 重构方法查找中的 remendy 功能,现在可以对其进行分步打印异常
  • 多重方法查找结果类型由 HashSet 改为 MutableList
  • 新增使用 method()constructor()field() 可直接获取到类中的所有对象功能
  • constructor() 的行为不再是 constructor { emptyParam() }
  • 新增 lazyClasslazyClassOrNull 方法,可延迟装载 Class
  • ",8),y={id:"_1-0-2-2023-04-25",tabindex:"-1"},v=e("a",{class:"header-anchor",href:"#_1-0-2-2023-04-25","aria-hidden":"true"},"#",-1),C=e("code",null,"Member",-1),I={href:"https://github.com/Art-Chen",target:"_blank",rel:"noopener noreferrer"},R=d("
  • 移除 Member 的直接缓存功能并作废 YukiReflection.Configs.isEnableMemberCache,保留 Class 的缓存功能
  • 对接查找功能到 Sequence,优化 Member 的查找速度与性能
  • ",2),E={id:"_1-0-1-2023-04-16",tabindex:"-1"},L=e("a",{class:"header-anchor",href:"#_1-0-1-2023-04-16","aria-hidden":"true"},"#",-1),M=e("ul",null,[e("li",null,[o("将依赖库的类型由 "),e("strong",null,"Java Library"),o(" (jar) 修改为 "),e("strong",null,"Android Library"),o(" (aar)")]),e("li",null,[o("移除了 Android "),e("code",null,"type"),o(" 中的错误 "),e("code",null,"Class"),o(" 对象声明")])],-1),N={id:"_1-0-0-2023-01-26",tabindex:"-1"},P=e("a",{class:"header-anchor",href:"#_1-0-0-2023-01-26","aria-hidden":"true"},"#",-1),Y=e("ul",null,[e("li",null,"首个版本提交至 Maven")],-1);function O(V,S){const t=n("Badge"),c=n("ExternalLinkIcon");return a(),s("div",null,[_,h,u,e("h3",f,[g,o(" 1.0.3 | 2023.10.07  "),l(t,{type:"tip",text:"最新",vertical:"middle"})]),e("ul",null,[m,p,b,e("li",null,[o("修复 "),e("a",k,[o("fix get interfaces of class"),l(c)]),o(" 问题并合并到 "),x]),A]),e("h3",y,[v,o(" 1.0.2 | 2023.04.25  "),l(t,{type:"warning",text:"过旧",vertical:"middle"})]),e("ul",null,[e("li",null,[o("修复一个严重问题,"),C,o(" 缓存未生效且持续存储最终引发 APP 内存溢出 (OOM),感谢 "),e("a",I,[o("Art-Chen"),l(c)])]),R]),e("h3",E,[L,o(" 1.0.1 | 2023.04.16  "),l(t,{type:"warning",text:"过旧",vertical:"middle"})]),M,e("h3",N,[P,o(" 1.0.0 | 2023.01.26  "),l(t,{type:"warning",text:"过旧",vertical:"middle"})]),Y])}const w=i(r,[["render",O],["__file","changelog.html.vue"]]);export{w as default}; diff --git a/assets/contacts.html-0oJDLEja.js b/assets/contacts.html-0oJDLEja.js new file mode 100644 index 0000000..9c71dad --- /dev/null +++ b/assets/contacts.html-0oJDLEja.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-6cf86266","path":"/zh-cn/about/contacts.html","title":"联系我们","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"助力维护","slug":"助力维护","link":"#助力维护","children":[]}],"git":{"updatedTime":1704138385000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"zh-cn/about/contacts.md"}');export{t as data}; diff --git a/assets/contacts.html-6Q6LT5CM.js b/assets/contacts.html-6Q6LT5CM.js new file mode 100644 index 0000000..0cb11f1 --- /dev/null +++ b/assets/contacts.html-6Q6LT5CM.js @@ -0,0 +1 @@ +import{_ as r,r as l,o as a,c as s,b as e,d as t,e as o}from"./app-Un_zyw_U.js";const c={},i=e("h1",{id:"联系我们",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#联系我们","aria-hidden":"true"},"#"),t(" 联系我们")],-1),_=e("blockquote",null,[e("p",null,"如在使用中有任何问题,或有任何建设性的建议,都可以联系我们。")],-1),h=e("p",null,"加入我们的开发者群组。",-1),d={href:"https://t.me/YukiReflection",target:"_blank",rel:"noopener noreferrer"},u={href:"https://t.me/HighCapable_Dev",target:"_blank",rel:"noopener noreferrer"},p={href:"https://qm.qq.com/cgi-bin/qm/qr?k=Pnsc5RY6N2mBKFjOLPiYldbAbprAU3V7&jump_from=webapi&authKey=X5EsOVzLXt1dRunge8ryTxDRrh9/IiW1Pua75eDLh9RE3KXE+bwXIYF5cWri/9lf",target:"_blank",rel:"noopener noreferrer"},f=e("strong",null,"酷安",-1),m={href:"http://www.coolapk.com/u/876977",target:"_blank",rel:"noopener noreferrer"},b=e("h2",{id:"助力维护",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#助力维护","aria-hidden":"true"},"#"),t(" 助力维护")],-1),k=e("p",null,[t("感谢您选择并使用 "),e("code",null,"YukiReflection"),t(",如有代码相关的建议和请求,可在 GitHub 提交 Pull Request。")],-1);function g(x,q){const n=l("ExternalLinkIcon");return a(),s("div",null,[i,_,h,e("ul",null,[e("li",null,[e("a",d,[t("点击加入 Telegram 群组"),o(n)])]),e("li",null,[e("a",u,[t("点击加入 Telegram 群组 (开发者)"),o(n)])]),e("li",null,[e("a",p,[t("点击加入 QQ 群 (开发者)"),o(n)])])]),e("p",null,[t("在 "),f,t(" 找到我 "),e("a",m,[t("@星夜不荟"),o(n)]),t("。")]),b,k])}const E=r(c,[["render",g],["__file","contacts.html.vue"]]);export{E as default}; diff --git a/assets/contacts.html-C8LAv6xu.js b/assets/contacts.html-C8LAv6xu.js new file mode 100644 index 0000000..7d83c21 --- /dev/null +++ b/assets/contacts.html-C8LAv6xu.js @@ -0,0 +1 @@ +import{_ as a,r as s,o as r,c,b as e,d as n,e as o}from"./app-Un_zyw_U.js";const l={},i=e("h1",{id:"contact-us",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contact-us","aria-hidden":"true"},"#"),n(" Contact Us")],-1),u=e("blockquote",null,[e("p",null,"If you have any questions in use, or have any constructive suggestions, you can contact us.")],-1),h=e("p",null,"Join our developers group.",-1),_={href:"https://t.me/YukiReflection",target:"_blank",rel:"noopener noreferrer"},d={href:"https://t.me/HighCapable_Dev",target:"_blank",rel:"noopener noreferrer"},p=e("strong",null,"Twitter",-1),f={href:"https://twitter.com/fankesyooni",target:"_blank",rel:"noopener noreferrer"},m=e("h2",{id:"help-with-maintenance",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#help-with-maintenance","aria-hidden":"true"},"#"),n(" Help with Maintenance")],-1),g=e("p",null,[n("Thank you for choosing and using "),e("code",null,"YukiReflection"),n(".")],-1),k=e("p",null,"If you have code-related suggestions and requests, you can submit a Pull Request on GitHub.",-1);function b(v,y){const t=s("ExternalLinkIcon");return r(),c("div",null,[i,u,h,e("ul",null,[e("li",null,[e("a",_,[n("Click to join Telegram group"),o(t)])]),e("li",null,[e("a",d,[n("Click to join Telegram group (Developer)"),o(t)])])]),e("p",null,[n("Find me on "),p,n(),e("a",f,[n("@fankesyooni"),o(t)]),n(".")]),m,g,k])}const w=a(l,[["render",b],["__file","contacts.html.vue"]]);export{w as default}; diff --git a/assets/contacts.html-iNJWt8MD.js b/assets/contacts.html-iNJWt8MD.js new file mode 100644 index 0000000..8425f57 --- /dev/null +++ b/assets/contacts.html-iNJWt8MD.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-193cf592","path":"/en/about/contacts.html","title":"Contact Us","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Help with Maintenance","slug":"help-with-maintenance","link":"#help-with-maintenance","children":[]}],"git":{"updatedTime":1704138385000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"en/about/contacts.md"}');export{t as data}; diff --git a/assets/features.html-SzPF_JgZ.js b/assets/features.html-SzPF_JgZ.js new file mode 100644 index 0000000..71337ec --- /dev/null +++ b/assets/features.html-SzPF_JgZ.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-47e315ee","path":"/zh-cn/api/features.html","title":"功能介绍","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"Class 扩展","slug":"class-扩展","link":"#class-扩展","children":[{"level":3,"title":"对象转换","slug":"对象转换","link":"#对象转换","children":[]},{"level":3,"title":"延迟装载","slug":"延迟装载","link":"#延迟装载","children":[]},{"level":3,"title":"存在判断","slug":"存在判断","link":"#存在判断","children":[]},{"level":3,"title":"模糊查找","slug":"模糊查找","link":"#模糊查找","children":[]}]},{"level":2,"title":"Member 扩展","slug":"member-扩展","link":"#member-扩展","children":[{"level":3,"title":"查找与反射调用","slug":"查找与反射调用","link":"#查找与反射调用","children":[]},{"level":3,"title":"可选的查找条件","slug":"可选的查找条件","link":"#可选的查找条件","children":[]},{"level":3,"title":"在父类查找","slug":"在父类查找","link":"#在父类查找","children":[]},{"level":3,"title":"模糊查找","slug":"模糊查找-1","link":"#模糊查找-1","children":[]},{"level":3,"title":"多重查找","slug":"多重查找-1","link":"#多重查找-1","children":[]},{"level":3,"title":"静态字节码","slug":"静态字节码","link":"#静态字节码","children":[]},{"level":3,"title":"混淆的字节码","slug":"混淆的字节码","link":"#混淆的字节码","children":[]},{"level":3,"title":"直接调用","slug":"直接调用","link":"#直接调用","children":[]},{"level":3,"title":"再次查找","slug":"再次查找","link":"#再次查找","children":[]},{"level":3,"title":"相对匹配","slug":"相对匹配","link":"#相对匹配","children":[]},{"level":3,"title":"调用泛型","slug":"调用泛型","link":"#调用泛型","children":[]},{"level":3,"title":"注意误区","slug":"注意误区","link":"#注意误区","children":[]}]},{"level":2,"title":"常用类型扩展","slug":"常用类型扩展","link":"#常用类型扩展","children":[]}],"git":{"updatedTime":1696670135000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":7}]},"filePathRelative":"zh-cn/api/features.md"}');export{l as data}; diff --git a/assets/features.html-UPAlRPRa.js b/assets/features.html-UPAlRPRa.js new file mode 100644 index 0000000..9d64649 --- /dev/null +++ b/assets/features.html-UPAlRPRa.js @@ -0,0 +1,794 @@ +import{_ as t,r as e,o as c,c as i,b as s,d as n,e as l,a}from"./app-Un_zyw_U.js";const r={},d=a(`

    Features

    This page contains usage examples for all core features of YukiReflection.

    Class Extensions

    Here are the extension functions related to the Class object itself.

    Object Conversion

    Suppose we want to get a Class that cannot be called directly.

    Normally, we can use the standard reflection API to find this Class.

    The following example

    // Class in the default ClassLoader environment
    +var instance = Class.forName("com.demo.Test")
    +// Specify the Class in the ClassLoader environment
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var instance = customClassLoader?.loadClass("com.demo.Test")
    +

    This is probably not very friendly, and YukiReflection provides you with a syntactic sugar that can be used anywhere.

    The above writing can be written as YukiReflection as follows.

    The following example

    // Get this Class directly
    +var instance = "com.demo.Test".toClass()
    +// ClassLoader where the custom Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var instance = "com.demo.Test".toClass(customClassLoader)
    +

    If the current Class does not exist, using the above method will throw an exception.

    If you are not sure whether the Class exists, you can refer to the following solutions.

    The following example

    // Get this Class directly
    +// If not available, the result will be null but no exception will be thrown
    +var instance = "com.demo.Test".toClassOrNull()
    +// ClassLoader where the custom Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +// If not available, the result will be null but no exception will be thrown
    +var instance = "com.demo.Test".toClassOrNull(customClassLoader)
    +

    We can also get an existing Class object by mapping.

    The following example

    // Assume this Class can be obtained directly
    +var instance = classOf<Test>()
    +// We can also customize the ClassLoader where the Class is located, which is very effective for stubs
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var instance = classOf<Test>(customClassLoader)
    +

    Tips

    For more functions, please refer to classOf, String.toClass, String.toClassOrNull methods.

    Lazy Loading

    Suppose we want to get a Class that cannot be called directly, but we do not need this Class immediately.

    At this time, you can use lazyClass to complete this function.

    The following example

    // Lazy loading of this Class
    +val instance by lazyClass("com.demo.Test")
    +// Customize the ClassLoader where the Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +val instance by lazyClass("com.demo.Test") { customClassLoader }
    +// Call this Class at the appropriate time
    +instance.method {
    +    // ...
    +}
    +

    If the current Class does not exist, using the above method will throw an exception.

    If you are not sure whether Class exists, you can refer to the following solution.

    The following example

    // Lazy loading of this Class
    +// If not available, the result will be null but no exception will be thrown
    +val instance by lazyClassOrNull("com.demo.Test")
    +// Customize the ClassLoader where the Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +// If not available, the result will be null but no exception will be thrown
    +val instance by lazyClassOrNull("com.demo.Test") { customClassLoader }
    +// Call this Class at the appropriate time
    +instance?.method {
    +    // ...
    +}
    +

    Tips

    For more functions, please refer to lazyClass, lazyClassOrNull methods.

    Existential Judgment

    Suppose we want to determine whether a Class exists.

    Usually, we can use the standard reflection API to find this Class to determine whether it exists by exception.

    The following example

    // Class in the default ClassLoader environment
    +var isExist = try {
    +    Class.forName("com.demo.Test")
    +    true
    +} catch (_: Throwable) {
    +    false
    +}
    +// Specify the Class in the ClassLoader environment
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var isExist = try {
    +    customClassLoader?.loadClass("com.demo.Test")
    +    true
    +} catch (_: Throwable) {
    +    false
    +}
    +

    This is probably not very friendly, and YukiReflection provides you with a syntactic sugar that can be used anywhere.

    The above writing can be written as YukiReflection as follows.

    The following example

    // Check if this class exists
    +var isExist = "com.demo.Test".hasClass()
    +// ClassLoader where the custom Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var isExist = "com.demo.Test".hasClass(customClassLoader)
    +

    Tips

    For more functions, please refer to String.hasClass method.

    `,41),y={id:"vague-search",tabindex:"-1"},A=s("a",{class:"header-anchor",href:"#vague-search","aria-hidden":"true"},"#",-1),u=a('

    The Class name in the current app's Dex after being obfuscated by tools such as R8 will be difficult to distinguish.

    Its correct position is uncertain, and cannot be obtained directly through Object Conversion.

    At this point, there is DexClassFinder, its role is to determine the instance of this Class by the bytecode features in the Class that need to be searched.

    Notice

    This feature is only available on the Android platform.

    At present, the function of DexClassFinder is still in the experimental stage.

    Since the search function is only implemented through the Java layer, the performance may not reach the optimal level when there are too many current app's Class.

    If something got wrong welcome to feedback.

    Since it is a reflection-level API, currently it can only locate the specified Class through the characteristics of Class and Member, and cannot locate it by specifying the string and method content characteristics in the bytecode.

    The speed of searching Class depends on the performance of the current device.

    At present, the mainstream mobile processors are in the 3~10s range when the conditions are not complicated in the 10~15w number of Class, the fastest speed can reach within 25s under slightly complex conditions.

    Please note that the more the same type Class is matched, the slower the speed.

    ',4),D={class:"custom-container danger"},B=s("p",{class:"custom-container-title"},"Pay Attention",-1),C=s("p",null,[n("After "),s("strong",null,"YukiHookAPI"),n(),s("strong",null,"2.0.0"),n(" released, this function will be deprecated and will be removed directly from "),s("strong",null,"YukiReflection"),n(".")],-1),m={href:"https://github.com/LuckyPray/DexKit",target:"_blank",rel:"noopener noreferrer"},v=s("strong",null,"Dex",-1),h=a(`

    Get Started

    Below is a simple usage example.

    Suppose the following Class is what we want, the names are obfuscated and may be different in each version.

    The following example

    package com.demo;
    +
    +public class a extends Activity implements Serializable {
    +
    +    public a(String var1) {
    +        // ...
    +    }
    +
    +    private String a;
    +
    +    private String b;
    +
    +    private boolean a;
    +
    +    protected void onCreate(Bundle var1) {
    +        // ...
    +    }
    +
    +    private static void a(String var1) {
    +        // ...
    +    }
    +
    +    private String a(boolean var1, String var2) {
    +        // ...
    +    }
    +
    +    private void a() {
    +        // ...
    +    }
    +
    +    public void a(boolean var1, a var2, b var3, String var4) {
    +        // ...
    +    }
    +}
    +

    At this point, we want to get this Class, you can use the ClassLoader.searchClass method directly.

    Each of the conditions demonstrated below is optional, and the more complex the conditions, the more accurate the positioning and the worse the performance.

    The following example

    searchClass {
    +    // Start the search from the specified package name range
    +    // In actual use, you can specify multiple package name ranges at the same time
    +    from("com.demo")
    +    // Specify the result of getSimpleName of the current Class
    +    // You can directly make logical judgments on this string
    +    // Here we are not sure whether its name is a, we can only judge the length of the string
    +    simpleName { it.length == 1 }
    +    // Specify the inherited parent class object
    +    // If it is an existing stub, it can be directly represented by generics
    +    extends<Activity>()
    +    // Specify the inherited parent class object
    +    // Which can be written directly as the full class name
    +    // And you can also specify multiple objects at the same time
    +    extends("android.app.Activity")
    +    // Specify the implemented interface
    +    // If it exists stub, can be directly represented by generics
    +    implements<Serializable>()
    +    // Specify the implemented interface
    +    // Which can be written directly as a full class name, or you can specify multiple at the same time
    +    implements("java.io.Serializable")
    +    // Specify the type and style of the constructor
    +    // And the number count that exists in the current class
    +    constructor { param(StringClass) }.count(num = 1)
    +    // Specify the type and style of the variable
    +    // And the number that exists in the current class count
    +    field { type = StringClass }.count(num = 2)
    +    // Specify the type and style of the variable
    +    // And the number that exists in the current class count
    +    field { type = BooleanType }.count(num = 1)
    +    // Directly specify the number of all variables that exist in the current class count
    +    field().count(num = 3)
    +    // If you think the number of variables is indeterminate
    +    // You can also use the following custom conditions
    +    field().count(1..3)
    +    field().count { it >= 3 }
    +    // Specify the type and style of the method
    +    // And the number that exists in the current class count
    +    method {
    +        name = "onCreate"
    +        param(BundleClass)
    +    }.count(num = 1)
    +    // Specify the type and style of the method
    +    // Specify the modifier, and the number count in the current class
    +    method {
    +        modifiers { isStatic && isPrivate }
    +        param(StringClass)
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // Specify the type and style of the method
    +    // Specify the modifier, and the number count in the current class
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        param(BooleanType, StringClass)
    +        returnType = StringClass
    +    }.count(num = 1)
    +    // Specify the type and style of the method
    +    // Specify the modifier, and the number count in the current class
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        emptyParam()
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // Specify the type and style of the method
    +    // As well as the modifier and VagueType
    +    // And the number count that exists in the current class
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        param(BooleanType, VagueType, VagueType, StringClass)
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // Directly specify the number of all methods that exist in the current class count
    +    method().count(num = 5)
    +    // If you think the number of methods is uncertain, you can also use the following custom conditions
    +    method().count(1..5)
    +    method().count { it >= 5 }
    +    // Directly specify the number of all members existing in the current class count
    +    // Members include: Field, Method, Constructor
    +    member().count(num = 9)
    +    // There must be a static modifier in all members, you can add this condition like this
    +    member {
    +        modifiers { isStatic }
    +    }
    +}.get() // Get the instance of this Class itself, if not found, it will return null
    +

    Tips

    The conditional usage of Field, Method, Constructor in the above usage is consistent with the related usage in Member Extensions, with only minor differences.

    For more functions, please refer to MemberRules, FieldRules, MethodRules, ConstructorRules.

    By default, DexClassFinder will use synchronous mode to search Class, which will block the current thread until it finds or finds an exception.

    If the search takes too long, it may cause ANR problems to the current app.

    In response to the above problems, we can enable asynchronous, just add the parameter async = true, which will not require you to start a thread again, the API has already handled the related problems for you.

    Notice

    To use this function, you need to pass in the Context of the current app as the first method parameter.

    For the asynchronous case you need to use the wait method to get the result, the get method will no longer work.

    The following example

    val context: Context // Assume this is the Context of the current app
    +searchClass(context, async = true) {
    +    // ...
    +}.wait { class1 ->
    +    // Get asynchronous result
    +}
    +searchClass(context, async = true) {
    +    // ...
    +}.wait { class2 ->
    +    // Get asynchronous result
    +}
    +

    In this way, our search process runs asynchronously, it will not block the main thread, and each search will be performed in a separate thread at the same time, which can achieve the effect of parallel tasks.

    Local Cache

    Since the search is performed again every time the current app is reopened, this is a waste of repetitive performance when the current app's version is unchanged.

    At this point, we can locally cache the search results of the current app's version by specifying the name parameter.

    Next time, the found class name will be directly read from the local cache.

    The local cache uses SharedPreferences, which will be saved to the app's data directory and will be re-cached after the app's version is updated.

    After enabling the local cache, async = true will be set at the same time, you don't need to set it manually.

    Notice

    To use this function, you need to pass in the Context of the current app as the first method parameter.

    The following example

    val context: Context // Assume this is the Context of the current app
    +searchClass(context, name = "com.demo.class1") {
    +    // ...
    +}.wait { class1 ->
    +    // Get asynchronous result
    +}
    +searchClass(context, name = "com.demo.class2") {
    +    // ...
    +}.wait { class2 ->
    +    // Get asynchronous result
    +}
    +

    If you want to clear the local cache manually, you can use the following method to clear the current version of the current app's cache.

    The following example

    val context: Context // Assume this is the Context of the current app
    +DexClassFinder.clearCache(context)
    +

    You can also clear the app's cache for a specific version.

    The following example

    val context: Context // Assume this is the Context of the current app
    +DexClassFinder.clearCache(context, versionName = "1.0", versionCode = 1)
    +

    If you need to search a set of Class at the same time using a fixed condition, then you only need to use the all or waitAll method to get the result.

    // Synchronous search, use all to get all the results found by the conditions
    +searchClass {
    +    // ...
    +}.all().forEach { clazz ->
    +    // Get each result
    +}
    +// Synchronous search, using all { ... } to iterate over each result
    +searchClass {
    +    // ...
    +}.all { clazz ->
    +    // Get each result
    +}
    +// Asynchronous search, use waitAll to get all the results found by the conditions
    +val context: Context // Assume this is the Context of the current app
    +searchClass(context, async = true) {
    +    // ...
    +}.waitAll { classes ->
    +    classes.forEach {
    +        // Get each result
    +    }
    +}
    +

    Tips

    For more functions, please refer to ClassLoader.searchClass method.

    Member Extensions

    Here are the extension functions related to the Class bytecode member variables Field, Method, Constructor.

    Tips

    Member is the interface description object of Field, Method, Constructor, which is the general term for the bytecode members in Class in Java reflection.

    Suppose there is such a Class.

    The following example

    package com.demo;
    +
    +public class BaseTest {
    +
    +    public BaseTest() {
    +        // ...
    +    }
    +
    +    public BaseTest(boolean isInit) {
    +        // ...
    +    }
    +
    +    private void doBaseTask(String taskName) {
    +        // ...
    +    }
    +}
    +
    package com.demo;
    +
    +public class Test extends BaseTest {
    +
    +    public Test() {
    +        // ...
    +    }
    +
    +    public Test(boolean isInit) {
    +        // ...
    +    }
    +
    +    private static TAG = "Test";
    +
    +    private BaseTest baseInstance;
    +
    +    private String a;
    +
    +    private boolean a;
    +
    +    private boolean isTaskRunning = false;
    +
    +    private static void init() {
    +        // ...
    +    }
    +
    +    private void doTask(String taskName) {
    +        // ...
    +    }
    +
    +    private void release(String taskName, Function<boolean, String> task, boolean isFinish) {
    +        // ...
    +    }
    +
    +    private void stop() {
    +        // ...
    +    }
    +
    +    private String getName() {
    +        // ...
    +    }
    +
    +    private void b() {
    +        // ...
    +    }
    +
    +    private void b(String a) {
    +        // ...
    +    }
    +}
    +

    Find and Reflection

    Suppose we want to get the doTask method of Test and execute it.

    Normally, we can use the standard reflection API to find this method.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using reflection API
    +Test::class.java
    +    .getDeclaredMethod("doTask", String::class.java)
    +    .apply { isAccessible = true }
    +    .invoke(instance, "task_name")
    +

    This is probably not very friendly, and YukiReflection provides you with a syntactic sugar that can be used anywhere.

    The above writing can be written as YukiReflection as follows.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doTask"
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    Tips

    For more features, please refer to MethodFinder.

    Similarly, we need to get the isTaskRunning field can also be written as follows.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.field {
    +    name = "isTaskRunning"
    +    type = BooleanType
    +}.get(instance).any() // Any instantiates an object of any type of Field
    +

    Tips

    For more features, please refer to FieldFinder.

    Maybe you also want to get the current Class constructor, the same can be achieved.

    The following example

    Test::class.java.constructor {
    +    param(BooleanType)
    +}.get().call(true) // Can create a new instance
    +

    If you want to get the no-argument constructor of Class, you can write it as follows.

    The following example

    Test::class.java.constructor().get().call() // Create a new instance
    +

    Tips

    For more features, please refer to ConstructorFinder.

    Optional Find Conditions

    Suppose we want to get the getName method in Class, which can be implemented as follows.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "getName"
    +    emptyParam()
    +    returnType = StringClass
    +}.get(instance).string() // Get the result of the method
    +

    Through observation, it is found that there is only one method named getName in this Class, so can we make it simpler?

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "getName"
    +    emptyParam()
    +}.get(instance).string() // Get the result of the method
    +

    Yes, you can refine your find criteria for methods that do not change exactly.

    When using only get or wait methods to get results, YukiReflection will match the first found result in bytecode order by default.

    The problem comes again, this Class has a release method, but its method parameters are very long, and some types may not be directly available.

    Normally we would use param(...) to find this method, but is there an easier way.

    At this point, after determining the uniqueness of the method, you can use paramCount to find the method.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "release"
    +    // At this point
    +    // We don't have to determine the specific type of method parameters, just write the number
    +    paramCount = 3
    +}.get(instance) // Get this method
    +

    Although the above example can be successfully matched, it is not accurate.

    At this time, you can also use VagueType to fill in the method parameter type that you do not want to fill in.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "release"
    +    // Use VagueType to fill in the type you don't want to fill in
    +    // While ensuring that other types can match
    +    param(StringClass, VagueType, BooleanType)
    +}.get(instance) // Get this method
    +

    If you are not sure about the type of each parameter, you can create a conditional method body with the param { ... } method.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +     name = "release"
    +     // Get the it (Class) method parameter type array instance
    +     // To only determine the known type and its position
    +     param { it[0] == StringClass && it[2] == BooleanType }
    +}.get(instance) // Get this method
    +

    Tips

    Use param { ... } to create a conditional method body, where the variable it is the Class type array instance of the current method parameter, and you can freely use Class all objects and their methods in.

    The condition at the end of the method body needs to return a Boolean, which is the final condition judgment result.

    For more functions, please refer to FieldFinder.type, MethodFinder.param, MethodFinder.returnType, ConstructorFinder.param method.

    Find in Super Class

    You will notice that Test extends BaseTest, now we want to get the doBaseTask method of BaseTest, how do we do it without knowing the name of the super class?

    Referring to the above find conditions, we only need to add a superClass to the find conditions to achieve this function.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doBaseTask"
    +    param(StringClass)
    +    // Just add this condition
    +    superClass()
    +}.get(instance).call("task_name")
    +

    At this time, we can get this method in the super class.

    superClass has a parameter isOnlySuperClass, when set to true, you can skip the current Class and only find the super class of the current Class.

    Since we now know that the doBaseTask method only exists in the super class, this condition can be added to save finding time.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doBaseTask"
    +    param(StringClass)
    +    // Add a find condition
    +    superClass(isOnlySuperClass = true)
    +}.get(instance).call("task_name")
    +

    At this time, we can also get this method in the super class.

    Once superClass is set, it will automatically cycle backward to find out whether this method exists in all extends super classes, until it finds that the target has no super class (the extends is java.lang.Object).

    Tips

    For more functions, please refer to MethodFinder.superClass, ConstructorFinder.superClass, FieldFinder.superClass methods.

    Pay Attention

    The currently founded Method can only find the Method of the current Class unless the superClass condition is specified, which is the default behavior of the Java Reflection API.

    Vague Find

    If we want to find a method name, but are not sure if it has changed in each release, we can use vague find.

    Suppose we want to get the doTask method in Class, which can be implemented as follows.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name {
    +        // Set name is case insensitive
    +        it.equals("dotask", isIgnoreCase = true)
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    Knowing that there is currently only one doTask method in Class, we can also judge that the method name contains only the characters specified in it.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name {
    +        // Only contains oTas
    +        it.contains("oTas")
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    We can also judge based on the first and last strings.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name {
    +        // Contains do at the beginning and Task at the end
    +        it.startsWith("do") && it.endsWith("Task")
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    By observing that this method name contains only letters, we can add a precise search condition.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name {
    +        // Start with do, end with Task, just letters
    +        it.startsWith("do") && it.endsWith("Task") && it.isOnlyLetters()
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    Tips

    Use name { ... } to create a conditional method body, where the variable it is the string of the current name, and you can freely use it in the extension method of NameRules function.

    The condition at the end of the method body needs to return a Boolean, which is the final condition judgment result.

    For more functions, please refer to FieldFinder.name, MethodFinder.name methods and NameRules.

    Multiple Find

    Sometimes, we may need to find a set of methods, constructors, and fields with the same characteristics in a Class.

    At this time, we can use relative condition matching to complete.

    Based on the result of the find condition, we only need to replace get with all to get all the bytecodes that match the condition.

    Suppose this time we want to get all methods in Class with the number of method parameters in the range 1..3, you can use the following implementation.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    paramCount(1..3)
    +}.all(instance).forEach { instance ->
    +    // Call and execute each method
    +    instance.call(...)
    +}
    +

    The above example can be perfectly matched to the following 3 methods.

    private void doTask(String taskName)

    private void release(String taskName, Function<boolean, String> task, boolean isFinish)

    private void b(String a)

    If you want to define the conditions for the range of the number of parameters more freely, you can use the following implementation.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    paramCount { it < 3 }
    +}.all(instance).forEach { instance ->
    +    // Call and execute each method
    +    instance.call(...)
    +}
    +

    The above example can be perfectly matched to the following 6 methods.

    private static void init()

    private void doTask(String taskName)

    private void stop(String a)

    private void getName(String a)

    private void b()

    private void b(String a)

    By observing that there are two methods named b in Class, you can use the following implementation.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "b"
    +}.all(instance).forEach { instance ->
    +    // Call and execute each method
    +    instance.call(...)
    +}
    +

    The above example can be perfectly matched to the following 2 methods.

    private void b()

    private void b(String a)

    Tips

    Use paramCount { ... } to create a conditional method body, where the variable it is the integer of the current number of parameters, and you can use it freely in the extension method of CountRules function in it.

    The condition at the end of the method body needs to return a Boolean, which is the final condition judgment result.

    For more functions, please refer to MethodFinder.paramCount, ConstructorFinder.paramCount methods and CountRules.

    Static Bytecode

    Some methods and fields are statically implemented in Class, at this time, we can call them without passing in an instance.

    Suppose we want to get the contents of the static field TAG this time.

    The following example

    Test::class.java.field {
    +    name = "TAG"
    +    type = StringClass
    +}.get().string() // The type of Field is string and can be cast directly
    +

    Assuming that there is a non-static TAG field with the same name in Class, what should I do at this time?

    Just add a filter.

    The following example

    Test::class.java.field {
    +    name = "TAG"
    +    type = StringClass
    +    // This field to identify the lookup needs to be static
    +    modifiers { isStatic }
    +}.get().string() // The type of Field is string and can be cast directly
    +

    We can also call a static method called init.

    The following example

    Test::class.java.method {
    +    name = "init"
    +    emptyParam()
    +}.get().call()
    +

    Likewise, you can identify it as a static.

    The following example

    Test::class.java.method {
    +    name = "init"
    +    emptyParam()
    +    // This method of identity find needs to be static
    +    modifiers { isStatic }
    +}.get().call()
    +

    Tips

    Use modifiers { ... } to create a conditional method body, at which point you can freely use its functionality in ModifierRules.

    The condition at the end of the method body needs to return a Boolean, which is the final condition judgment result.

    For more functions, please refer to FieldFinder.modifiers, MethodFinder.modifiers, ConstructorFinder.modifiers methods and ModifierRules.

    Obfuscated Bytecode

    You may have noticed that the example Class given here has two obfuscated field names, both of which are a, how do we get them at this time?

    There are two options.

    The first option is to determine the name and type of the field.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.field {
    +    name = "a"
    +    type = BooleanType
    +}.get(instance).any() // Get a field named a with type Boolean
    +

    The second option is to determine where the type of the field is located.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.field {
    +    type(BooleanType).index().first()
    +}.get(instance).any() // Get the first field of type Boolean
    +

    In the above two cases, the corresponding field private boolean a can be obtained.

    Likewise, there are two obfuscated method names in this Class, both of which are b.

    You can also have two options to get them.

    The first option is to determine the method name and method parameters.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "b"
    +    param(StringClass)
    +}.get(instance).call("test_string") // Get the method whose name is b and whose parameter is [String]
    +

    The second option is to determine where the parameters of the method are located.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    param(StringClass).index().first()
    +}.get(instance).call("test_string") // Get the method whose first method parameter is [String]
    +

    Since it is observed that this method is last in Class, then we have an alternative.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    order().index().last()
    +}.get(instance).call("test_string") // Get the last method of the current Class
    +

    Notice

    Please try to avoid using order to filter bytecode subscripts, they may be indeterminate unless you are sure that its position in this Class must not change.

    Directly Called

    The methods of calling bytecode described above all need to use get(instance) to call the corresponding method.

    Is there a simpler way?

    At this point, you can use the current method on any instance to create a call space.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Assume this Class is not directly available
    +instance.current {
    +    // Execute the doTask method
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +    // Execute the stop method
    +    method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +    // Get name
    +    val name = method { name = "getName" }.string()
    +}
    +

    We can also use superClass to call methods of the current Class super class.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Assume this Class is not directly available
    +instance.current {
    +    // Execute the doBaseTask method of the parent class
    +    superClass().method {
    +        name = "doBaseTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}
    +

    If you don't like to use a lambda to create the namespace of the current instance, you can use the current() method directly.

    The following example

    // Assuming this is an instance of this Class, this Class cannot be obtained directly
    +val instance = Test()
    +// Execute the doTask method
    +instance
    +    .current()
    +    .method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +// Execute the stop method
    +instance
    +    .current()
    +    .method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +// Get name
    +val name = instance.current().method { name = "getName" }.string()
    +

    Likewise, consecutive calls can be made between them, but inline calls are not allowed.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Assume this Class is not directly available
    +instance.current {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}.current()
    +    .method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +//  Note that because current() returns the CurrentClass object itself
    +// It CANNOT BE CALLED like the following
    +instance.current().current()
    +

    For Field instances, there is also a convenience method that can directly get the object of the instance where Field is located.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Assume this Class is not directly available
    +instance.current {
    +    // <Plan 1>
    +    field {
    +        name = "baseInstance"
    +    }.current {
    +        method {
    +            name = "doBaseTask"
    +            param(StringClass)
    +        }.call("task_name")
    +    }
    +    // <Plan 2>
    +    field {
    +        name = "baseInstance"
    +    }.current()
    +        ?.method {
    +            name = "doBaseTask"
    +            param(StringClass)
    +        }?.call("task_name")
    +}
    +

    Notice

    The above current method is equivalent to calling the field { ... }.any()?.current() method in CurrentClass for you.

    If there is no CurrentClass calling field, you need to use field { ... }.get(instance).current() to call it.

    The problem comes again, I want to use reflection to create the following instance and call the method in it, how to do it?

    The following example

    Test(true).doTask("task_name")
    +

    Usually, we can use the standard reflection API to call.

    The following example

    "com.demo.Test".toClass()
    +    .getDeclaredConstructor(Boolean::class.java)
    +    .apply { isAccessible = true }
    +    .newInstance(true)
    +    .apply {
    +        javaClass
    +            .getDeclaredMethod("doTask", String::class.java)
    +            .apply { isAccessible = true }
    +            .invoke(this, "task_name")
    +    }
    +

    But I feel that this approach is very troublesome.

    Is there a more concise way to call it?

    At this time, we can also use the buildOf method to create an instance.

    The following example

    "com.demo.Test".toClass().buildOf(true) { param(BooleanType) }?.current {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}
    +

    If you want the buildOf method to return the type of the current instance, you can include a type-generic declaration in it instead of using as to cast the target type.

    In this case, the constructor of the instance itself is private, but the method inside is public, so we only need to create its constructor by reflection.

    The following example

    // Assume this Class can be obtained directly
    +val test = Test::class.java.buildOf<Test>(true) { param(BooleanType) }
    +test.doTask("task_name")
    +

    Tips

    For more functions, please refer to CurrentClass and Class.buildOf method.

    Find Again

    Suppose there are three different versions of Class, all of which are the same Class for different versions of this app.

    There is also a method doTask in it, assuming they function the same.

    The following example of version A

    public class Test {
    +
    +    public void doTask() {
    +        // ...
    +    }
    +}
    +

    The following example of version B

    public class Test {
    +
    +    public void doTask(String taskName) {
    +        // ...
    +    }
    +}
    +

    The following example of version C

    public class Test {
    +
    +    public void doTask(String taskName, int type) {
    +        // ...
    +    }
    +}
    +

    We need to get this same functionality of the doTask method in a different version, how do we do it?

    At this point, you can use RemedyPlan to complete your needs.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doTask"
    +    emptyParam()
    +}.remedys {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.onFind {
    +        // Found logic can be implemented here
    +    }
    +    method {
    +        name = "doTask"
    +        param(StringClass, IntType)
    +    }.onFind {
    +        // Found logic can be implemented here
    +    }
    +}.wait(instance) {
    +    // Get the result of the method
    +}
    +

    Pay Attention

    The method lookup result using RemedyPlan can no longer use get to get method instance, you should use wait method.

    Also, you can continue to use RemedyPlan while using Multiple Find.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doTask"
    +    emptyParam()
    +}.remedys {
    +    method {
    +        name = "doTask"
    +        paramCount(0..1)
    +    }.onFind {
    +        // Found logic can be implemented here
    +    }
    +    method {
    +        name = "doTask"
    +        paramCount(1..2)
    +    }.onFind {
    +        // Found logic can be implemented here
    +    }
    +}.waitAll(instance) {
    +    // Get the result of the method
    +}
    +

    Relative Matching

    Suppose there is a Class with the same function in different versions of the current app but only the name of the Class is different.

    The following example of version A

    public class ATest {
    +
    +    public static void doTask() {
    +        // ...
    +    }
    +}
    +

    The following example of version B

    public class BTest {
    +
    +    public static void doTask() {
    +        // ...
    +    }
    +}
    +

    At this time, what should we do if we want to call the doTask method in this Class in each version?

    The usual practice is to check if Class exists.

    The following example

    // First find this Class
    +val currentClass =
    +    if("com.demo.ATest".hasClass()) "com.demo.ATest".toClass() else "com.demo.BTest".toClass()
    +// Then look for this method and call
    +currentClass.method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    I feel that this solution is very inelegant and cumbersome, then YukiReflection provides you with a very convenient VariousClass to solve this problem.

    Now, you can get this Class directly using the following methods.

    The following example

    VariousClass("com.demo.ATest", "com.demo.BTest").get().method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    If the current Class exists in the specified ClassLoader, you can fill in your ClassLoader in get.

    The following example

    val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +VariousClass("com.demo.ATest", "com.demo.BTest").get(customClassLoader).method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    If you are not sure that all Class will be matched, you can use the getOrNull method.

    The following example

    val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +VariousClass("com.demo.ATest", "com.demo.BTest").getOrNull(customClassLoader)?.method {
    +     name = "doTask"
    +     emptyParam()
    +}?.get()?.call()
    +

    Tips

    For more functions, please refer to VariousClass.

    Calling Generics

    In the process of reflection, we may encounter generic problems.

    In the reflection processing of generics, YukiReflection also provides a syntactic sugar that can be used anywhere.

    For example we have the following generic class.

    The following example

    class TestGeneric<T, R> (t: T, r: R) {
    +
    +    fun foo() {
    +        // ...
    +    }
    +}
    +

    When we want to get a Class instance of the generic T or R in the current Class, only the following implementation is required.

    The following example

    class TestGeneric<T, R> (t: T, r: R) {
    +
    +    fun foo() {
    +        // Get the operation object of the current instance
    +        // Get the Class instance of T, in the 0th position of the parameter
    +        // The default value can not be written
    +        val tClass = current().generic()?.argument()
    +        // Get the Class instance of R, in parameter 1
    +        val rClass = current().generic()?.argument(index = 1)
    +        // You can also use the following syntax
    +        current().generic {
    +             // Get the Class instance of T
    +             // In the 0th position of the parameter, the default value can be left blank
    +            val tClass = argument()
    +            // Get the Class instance of R, in parameter 1
    +            val rClass = argument(index = 1)
    +        }
    +    }
    +}
    +

    When we want to call this Class externally, it can be implemented as follows.

    The following example

    // Assume this is the Class of T
    +class TI {
    +
    +    fun foo() {
    +        // ...
    +    }
    +}
    +// Assume this is an instance of T
    +val tInstance: TI? = ...
    +// Get the Class instance of T
    +// In the 0th position of the parameter, the default value can be left blank
    +// And get the method foo and call it
    +TestGeneric::class.java.generic()?.argument()?.method {
    +    name = "foo"
    +    emptyParam()
    +}?.get(tInstance)?.invoke<TI>()
    +

    Tips

    For more functions, please refer to CurrentClass.generic, Class.generic methods and GenericClass.

    Pay Attention of Trap

    Here are some misunderstandings that may be encountered during use for reference.

    Restrictive Find Conditions

    In find conditions you can only use index function once except order.

    The following example

    method {
    +    name = "test"
    +    param(BooleanType).index(num = 2)
    +    //  Wrong usage, please keep only one index method
    +    returnType(StringClass).index(num = 1)
    +}
    +

    The following find conditions can be used without any problems.

    The following example

    method {
    +    name = "test"
    +    param(BooleanType).index(num = 2)
    +    order().index(num = 1)
    +}
    +

    Necessary Find Conditions

    In common method find conditions, even methods without parameters need to set find conditions.

    Suppose we have the following Class.

    The following example

    public class TestFoo {
    +
    +    public void foo(String string) {
    +        // ...
    +    }
    +
    +    public void foo() {
    +        // ...
    +    }
    +}
    +

    We want to get the public void foo() method, which can be written as follows.

    The following example

    TestFoo::class.java.method {
    +    name = "foo"
    +}
    +

    However, the above example is wrong.

    You will find two foo methods in this Class, one of which takes a method parameter.

    Since the above example does not set the find conditions for param, the result will be the first method public void foo(String string) that matches the name and matches the bytecode order, not the last method we need.

    This is a frequent error, without method parameters, you will lose the use of method parameter find conditions.

    The correct usage is as follows.

    The following example

    TestFoo::class.java.method {
    +    name = "foo"
    +    // ✅ Correct usage, add detailed filter conditions
    +    emptyParam()
    +}
    +

    At this point, the above example will perfectly match the public void foo() method.

    Compatibility Notes

    In the past historical versions of the API, it was allowed to match the method without writing the default matching no-parameter method, but the latest version has corrected this problem, please make sure that you are using the latest API version.

    In the find conditions for constructors, even constructors without parameters need to set find conditions.

    Suppose we have the following Class.

    The following example

    public class TestFoo {
    +
    +    public TestFoo() {
    +        // ...
    +    }
    +}
    +

    To get the public TestFoo() constructor, we must write it in the following form.

    The following example

    TestFoo::class.java.constructor { emptyParam() }
    +

    The above example can successfully obtain the public TestFoo() constructor.

    If you write constructor() and miss emptyParam(), the result found at this time will be the first one in bytecode order, may not be parameterless.

    Compatibility Notes

    In past historical versions of the API, if the constructor does not fill in any search parameters, the constructor will not be found directly.

    This is a BUG and has been fixed in the latest version, please make sure you are using the latest API version.

    API Behavior Changes

    In 1.2.0 and later versions, the behavior of constructor() is no longer constructor { emptyParam() } but constructor {}, please pay attention to the behavior change reasonably adjust the find parameters.

    No Find Conditions

    Without setting find conditions, using field(), constructor(), method() will return all members under the current Class.

    Using get(...) or give() will only get the first bit in bytecode order.

    The following example

    Test::class.java.field().get(...)
    +Test::class.java.method().give()
    +

    If you want to get all members, you can use all(...) or giveAll()

    The following example

    Test::class.java.field().all(...)
    +Test::class.java.method().giveAll()
    +

    Compatibility Notes

    In past historical versions of the API, failure to set find conditions will throw an exception.

    This feature was added in 1.2.0 and later versions.

    Bytecode Type

    In the bytecode call result, the cast method can only specify the type corresponding to the bytecode.

    For example we want to get a field of type Boolean and cast it to String.

    The following is the wrong way to use it.

    The following example

    field {
    +    name = "test"
    +    type = BooleanType
    +}.get().string() //  Wrong usage, must be cast to the bytecode target type
    +

    The following is the correct way to use it.

    The following example

    field {
    +    name = "test"
    +    type = BooleanType
    +}.get().boolean().toString() // ✅ The correct way to use, get the type and then convert
    +

    Common Type Extensions

    When find methods and fields, we usually need to specify the type in find conditions.

    The following example

    field {
    +    name = "test"
    +    type = Boolean::class.javaPrimitiveType
    +}
    +

    Expressing the type of Boolean::class.javaPrimitiveType in Kotlin is very long and inconvenient.

    Therefore, YukiReflection encapsulates common type calls for developers, including Android related types and Java common types and primitive type keywords.

    At this time, the above type can be written in the following form.

    The following example

    field {
    +    name = "test"
    +    type = BooleanType
    +}
    +

    The primitive type keywords in common Java types have been encapsulated as Type(Class Name) + Type, such as IntType, FloatType (their bytecode types are int, float).

    Correspondingly, array types also have convenient usage methods, assuming we want to get an array of type String[].

    You need to write java.lang.reflect.Array.newInstance(String::class.java, 0).javaClass to get this type.

    Does it feel very troublesome, at this time we can use the method ArrayClass(StringClass) to get this type.

    At the same time, since String is a common type, you can also directly use StringArrayClass to get this type.

    The methods found in some common requirements have their corresponding encapsulation types for use, in the format Type(Class Name) + Class.

    The following are wrapper names for some special case types in Java represented in YukiReflection.

    • voidUnitType

    • java.lang.VoidUnitClass

    • java.lang.ObjectAnyClass

    • java.lang.IntegerIntClass

    • java.lang.CharacterCharClass

    Notice

    Encapsulating types with Type(Class Name) + Type will and only be represented as Java primitive type keywords.

    Since the concept of primitive types does not exist in Kotlin, they will all be defined as KClass.

    There are 9 primitive type keywords in Java, of which 8 are primitive type, namely boolean, char, byte, short , int, float, long, double, of which the void type is a special case.

    At the same time, they all have their own corresponding package types in Java, such as java.lang.Boolean, java.lang.Integer, these types are unequal, Please note the distinction.

    Similarly, arrays also have corresponding wrapper types, which also need to be distinguished from Java primitive type keywords.

    For example, the encapsulation type of byte[] is ByteArrayType or ArrayClass(ByteType), and the encapsulation type of Byte[] is ByteArrayClass or ArrayClass(ByteClass), these types are also unequal.

    At the same time, you are welcome to contribute more commonly used types.

    `,344);function b(F,g){const o=e("Badge"),p=e("ExternalLinkIcon");return c(),i("div",null,[d,s("h3",y,[A,n(" Vague Search "),l(o,{type:"tip",text:"Beta",vertical:"middle"})]),u,s("div",D,[B,C,s("p",null,[n("We welcome all developers to start using "),s("a",m,[n("DexKit"),l(p)]),n(", which is a high-performance runtime parsing library for "),v,n(" implemented in C++, which is more efficient than the Java layer in terms of performance, efficient and excellent, it is still in the development stage, your valuable suggestions are welcome.")])]),h])}const k=t(r,[["render",b],["__file","features.html.vue"]]);export{k as default}; diff --git a/assets/features.html-VU512ZaF.js b/assets/features.html-VU512ZaF.js new file mode 100644 index 0000000..ca24388 --- /dev/null +++ b/assets/features.html-VU512ZaF.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c557cfcc","path":"/en/api/features.html","title":"Features","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Class Extensions","slug":"class-extensions","link":"#class-extensions","children":[{"level":3,"title":"Object Conversion","slug":"object-conversion","link":"#object-conversion","children":[]},{"level":3,"title":"Lazy Loading","slug":"lazy-loading","link":"#lazy-loading","children":[]},{"level":3,"title":"Existential Judgment","slug":"existential-judgment","link":"#existential-judgment","children":[]},{"level":3,"title":"Vague Search","slug":"vague-search","link":"#vague-search","children":[]}]},{"level":2,"title":"Member Extensions","slug":"member-extensions","link":"#member-extensions","children":[{"level":3,"title":"Find and Reflection","slug":"find-and-reflection","link":"#find-and-reflection","children":[]},{"level":3,"title":"Optional Find Conditions","slug":"optional-find-conditions","link":"#optional-find-conditions","children":[]},{"level":3,"title":"Find in Super Class","slug":"find-in-super-class","link":"#find-in-super-class","children":[]},{"level":3,"title":"Vague Find","slug":"vague-find","link":"#vague-find","children":[]},{"level":3,"title":"Multiple Find","slug":"multiple-find","link":"#multiple-find","children":[]},{"level":3,"title":"Static Bytecode","slug":"static-bytecode","link":"#static-bytecode","children":[]},{"level":3,"title":"Obfuscated Bytecode","slug":"obfuscated-bytecode","link":"#obfuscated-bytecode","children":[]},{"level":3,"title":"Directly Called","slug":"directly-called","link":"#directly-called","children":[]},{"level":3,"title":"Find Again","slug":"find-again","link":"#find-again","children":[]},{"level":3,"title":"Relative Matching","slug":"relative-matching","link":"#relative-matching","children":[]},{"level":3,"title":"Calling Generics","slug":"calling-generics","link":"#calling-generics","children":[]},{"level":3,"title":"Pay Attention of Trap","slug":"pay-attention-of-trap","link":"#pay-attention-of-trap","children":[]}]},{"level":2,"title":"Common Type Extensions","slug":"common-type-extensions","link":"#common-type-extensions","children":[]}],"git":{"updatedTime":1696670135000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":8}]},"filePathRelative":"en/api/features.md"}');export{e as data}; diff --git a/assets/features.html-tu9AQPUC.js b/assets/features.html-tu9AQPUC.js new file mode 100644 index 0000000..4b41ed9 --- /dev/null +++ b/assets/features.html-tu9AQPUC.js @@ -0,0 +1,769 @@ +import{_ as c,r as l,o as t,c as r,b as s,d as n,e,a}from"./app-Un_zyw_U.js";const i={},d=a(`

    功能介绍

    这里包含了 YukiReflection 全部核心功能的用法示例。

    Class 扩展

    这里是 Class 对象自身相关的扩展功能。

    对象转换

    假设我们要得到一个不能直接调用的 Class,通常情况下,我们可以使用标准的反射 API 去查找这个 Class

    示例如下

    // 默认 ClassLoader 环境下的 Class
    +var instance = Class.forName("com.demo.Test")
    +// 指定 ClassLoader 环境下的 Class
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var instance = customClassLoader?.loadClass("com.demo.Test")
    +

    这种写法大概不是很友好,此时 YukiReflection 就为你提供了一个可在任意地方使用的语法糖。

    以上写法换做 YukiReflection 可写作如下形式。

    示例如下

    // 直接得到这个 Class
    +var instance = "com.demo.Test".toClass()
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var instance = "com.demo.Test".toClass(customClassLoader)
    +

    如果当前 Class 并不存在,使用上述方法会抛出异常,如果你不确定 Class 是否存在,可以参考下面的解决方案。

    示例如下

    // 直接得到这个 Class
    +// 得不到时结果会为 null 但不会抛出异常
    +var instance = "com.demo.Test".toClassOrNull()
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +// 得不到时结果会为 null 但不会抛出异常
    +var instance = "com.demo.Test".toClassOrNull(customClassLoader)
    +

    我们还可以通过映射来得到一个存在的 Class 对象。

    示例如下

    // 假设这个 Class 是能够被直接得到的
    +var instance = classOf<Test>()
    +// 我们同样可以自定义 Class 所在的 ClassLoader,这对于 stub 来说非常有效
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var instance = classOf<Test>(customClassLoader)
    +

    小提示

    更多功能请参考 classOfString.toClassString.toClassOrNull 方法。

    延迟装载

    假设我们要得到一个不能直接调用的 Class,但是我们也不是立刻就需要这个 Class

    这个时候,你可以使用 lazyClass 来完成这个功能。

    示例如下

    // 延迟装载这个 Class
    +val instance by lazyClass("com.demo.Test")
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +val instance by lazyClass("com.demo.Test") { customClassLoader }
    +// 在适当的时候调用这个 Class
    +instance.method { 
    +    // ...   
    +}
    +

    如果当前 Class 并不存在,使用上述方法会抛出异常,如果你不确定 Class 是否存在,可以参考下面的解决方案。

    示例如下

    // 延迟装载这个 Class
    +// 得不到时结果会为 null 但不会抛出异常
    +val instance by lazyClassOrNull("com.demo.Test")
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +// 得不到时结果会为 null 但不会抛出异常
    +val instance by lazyClassOrNull("com.demo.Test") { customClassLoader }
    +// 在适当的时候调用这个 Class
    +instance?.method { 
    +    // ...   
    +}
    +

    小提示

    更多功能请参考 lazyClasslazyClassOrNull 方法。

    存在判断

    假设我们要判断一个 Class 是否存在,通常情况下,我们可以使用标准的反射 API 去查找这个 Class 通过异常来判断是否存在。

    示例如下

    // 默认 ClassLoader 环境下的 Class
    +var isExist = try {
    +    Class.forName("com.demo.Test")
    +    true
    +} catch (_: Throwable) {
    +    false
    +}
    +// 指定 ClassLoader 环境下的 Class
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var isExist = try {
    +    customClassLoader?.loadClass("com.demo.Test")
    +    true
    +} catch (_: Throwable) {
    +    false
    +}
    +

    这种写法大概不是很友好,此时 YukiReflection 就为你提供了一个可在任意地方使用的语法糖。

    以上写法换做 YukiReflection 可写作如下形式。

    示例如下

    // 判断这个 Class 是否存在
    +var isExist = "com.demo.Test".hasClass()
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var isExist = "com.demo.Test".hasClass(customClassLoader)
    +

    小提示

    更多功能请参考 String.hasClass 方法。

    `,37),A={id:"模糊查找",tabindex:"-1"},y=s("a",{class:"header-anchor",href:"#模糊查找","aria-hidden":"true"},"#",-1),D=a('

    在 R8 等工具混淆后的当前 APP Dex 中的 Class 名称将会难以分辨,且不确定其正确位置,不能直接通过 对象转换 来得到。

    此时就有了 DexClassFinder,它的作用是通过需要查找的 Class 中的字节码特征来确定这个 Class 的实例。

    注意

    此功能仅适用于 Android 平台。

    目前 DexClassFinder 的功能尚在试验阶段,由于仅通过 Java 层实现查找功能,在当前 APP Class 过多时性能可能不能达到最佳水平,如果发生查找不到、定位有误的问题欢迎向我们反馈。

    由于是反射层面的 API,目前它只能通过类与成员的特征来定位指定的 Class,不能通过指定字节码中的字符串和方法内容特征来进行定位。

    查找 Class 的速度取决于当前设备的性能,目前主流的移动端处理器在 10~15w 数量的 Class 中条件不算复杂的情况下大概在 3~10s 区间,条件稍微复杂的情况下最快速度能达到 25s 以内,匹配到的同类型 Class 越多速度越慢。

    ',3),B={class:"custom-container danger"},C=s("p",{class:"custom-container-title"},"特别注意",-1),u=s("p",null,[n("在 "),s("strong",null,"YukiHookAPI"),n(" 发布 "),s("strong",null,"2.0.0"),n(" 版本后,此功能将被标记为作废,且将会直接从 "),s("strong",null,"YukiReflection"),n(" 中移除。")],-1),v={href:"https://github.com/LuckyPray/DexKit",target:"_blank",rel:"noopener noreferrer"},m=s("strong",null,"Dex",-1),b=a(`

    开始使用

    下面是一个简单的用法示例。

    假设下面这个 Class 是我们想要得到的,其中的名称经过了混淆,在每个版本可能都不一样。

    示例如下

    package com.demo;
    +
    +public class a extends Activity implements Serializable {
    +
    +    public a(String var1) {
    +        // ...
    +    }
    +
    +    private String a;
    +
    +    private String b;
    +
    +    private boolean a;
    +
    +    protected void onCreate(Bundle var1) {
    +        // ...
    +    }
    +
    +    private static void a(String var1) {
    +        // ...
    +    }
    +
    +    private String a(boolean var1, String var2) {
    +        // ...
    +    }
    +
    +    private void a() {
    +        // ...
    +    }
    +
    +    public void a(boolean var1, a var2, b var3, String var4) {
    +        // ...
    +    }
    +}
    +

    此时,我们想得到这个 Class,可以直接使用 ClassLoader.searchClass 方法。

    下方演示的条件中每一个都是可选的,条件越复杂定位越精确,同时性能也会越差。

    示例如下

    searchClass {
    +    // 从指定的包名范围开始查找,实际使用时,你可以同时指定多个包名范围
    +    from("com.demo")
    +    // 指定当前 Class 的 getSimpleName 的结果,你可以直接对这个字符串进行逻辑判断
    +    // 这里我们不确定它的名称是不是 a,可以只判断字符串长度
    +    simpleName { it.length == 1 }
    +    // 指定继承的父类对象,如果是存在的 stub,可以直接用泛型表示
    +    extends<Activity>()
    +    // 指定继承的父类对象,可以直接写为完整类名,你还可以同时指定多个
    +    extends("android.app.Activity")
    +    // 指定实现的接口,如果是存在的 stub,可以直接用泛型表示
    +    implements<Serializable>()
    +    // 指定实现的接口,可以直接写为完整类名,你还可以同时指定多个
    +    implements("java.io.Serializable")
    +    // 指定构造方法的类型与样式,以及在当前类中存在的个数 count
    +    constructor { param(StringClass) }.count(num = 1)
    +    // 指定变量的类型与样式,以及在当前类中存在的个数 count
    +    field { type = StringClass }.count(num = 2)
    +    // 指定变量的类型与样式,以及在当前类中存在的个数 count
    +    field { type = BooleanType }.count(num = 1)
    +    // 直接指定所有变量在当前类中存在的个数 count
    +    field().count(num = 3)
    +    // 如果你认为变量的个数是不确定的,还可以使用如下自定义条件
    +    field().count(1..3)
    +    field().count { it >= 3 }
    +    // 指定方法的类型与样式,以及在当前类中存在的个数 count
    +    method {
    +        name = "onCreate"
    +        param(BundleClass)
    +    }.count(num = 1)
    +    // 指定方法的类型与样式,同时指定修饰符,以及在当前类中存在的个数 count
    +    method {
    +        modifiers { isStatic && isPrivate }
    +        param(StringClass)
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // 指定方法的类型与样式,同时指定修饰符,以及在当前类中存在的个数 count
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        param(BooleanType, StringClass)
    +        returnType = StringClass
    +    }.count(num = 1)
    +    // 指定方法的类型与样式,同时指定修饰符,以及在当前类中存在的个数 count
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        emptyParam()
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // 指定方法的类型与样式,同时指定修饰符和模糊类型 VagueType,以及在当前类中存在的个数 count
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        param(BooleanType, VagueType, VagueType, StringClass)
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // 直接指定所有方法在当前类中存在的个数 count
    +    method().count(num = 5)
    +    // 如果你认为方法的个数是不确定的,还可以使用如下自定义条件
    +    method().count(1..5)
    +    method().count { it >= 5 }
    +    // 直接指定所有成员 (Member) 在当前类中存在的个数 count
    +    // 成员包括:Field (变量)、Method (方法)、Constructor (构造方法)
    +    member().count(num = 9)
    +    // 所有成员中一定存在一个 static 修饰符,可以这样加入此条件
    +    member {
    +        modifiers { isStatic }
    +    }
    +}.get() // 得到这个 Class 本身的实例,找不到会返回 null
    +

    小提示

    上述用法中对于 FieldMethodConstructor 的条件用法与 Member 扩展 中的相关用法是一致的,仅有小部分区别。

    更多功能请参考 MemberRulesFieldRulesMethodRulesConstructorRules

    异步查找

    默认情况下 DexClassFinder 会使用同步方式查找 Class,会阻塞当前线程直到找到或找不到发生异常为止,若查找消耗的时间过长,可能会导致当前 APP 发生 ANR 问题。

    针对上述问题,我们可以启用异步,只需要加入参数 async = true,这将不需要你再次启动一个线程,API 已帮你处理好相关问题。

    注意

    若要使用此功能,你需要在方法参数首位传入当前 APP 的 Context

    对于异步情况下你需要使用 wait 方法来得到结果,get 方法将不再起作用。

    示例如下

    val context: Context // 假设这就是当前 APP 的 Context
    +searchClass(context, async = true) {
    +    // ...
    +}.wait { class1 ->
    +    // 得到异步结果
    +}
    +searchClass(context, async = true) {
    +    // ...
    +}.wait { class2 ->
    +    // 得到异步结果
    +}
    +

    这样我们的查找过程就是异步运行了,它将不会阻塞主线程,每个查找都将在单独的线程同时进行,可达到并行任务的效果。

    本地缓存

    由于每次重新打开当前 APP 都会重新进行查找,在当前 APP 版本不变的情况下这是一种重复性能浪费。

    此时我们可以通过指定 name 参数来对当前 APP 版本的查找结果进行本地缓存,下一次将直接从本地缓存中读取查找到的类名。

    本地缓存使用的是 SharedPreferences,它将被保存到当前 APP 的数据目录中,在当前 APP 版本更新后会重新进行缓存。

    启用本地缓存后,将同时设置 async = true,你可以不需要再手动进行设置。

    注意

    若要使用此功能,你需要在方法参数首位传入当前 APP 的 Context

    示例如下

    val context: Context // 假设这就是当前 APP 的 Context
    +searchClass(context, name = "com.demo.class1") {
    +    // ...
    +}.wait { class1 ->
    +    // 得到异步结果
    +}
    +searchClass(context, name = "com.demo.class2") {
    +    // ...
    +}.wait { class2 ->
    +    // 得到异步结果
    +}
    +

    如果你想手动清除本地缓存,可以使用如下方法清除当前 APP 版本的缓存。

    示例如下

    val context: Context // 假设这就是当前 APP 的 Context
    +DexClassFinder.clearCache(context)
    +

    你还可以清除指定版本的 APP 缓存。

    示例如下

    val context: Context // 假设这就是当前 APP 的 Context
    +DexClassFinder.clearCache(context, versionName = "1.0", versionCode = 1)
    +

    多重查找

    如果你需要使用固定的条件同时查找一组 Class,那么你只需要使用 allwaitAll 方法来得到结果。

    // 同步查找,使用 all 得到条件全部查找到的结果
    +searchClass {
    +    // ...
    +}.all().forEach { clazz ->
    +    // 得到每个结果
    +}
    +// 同步查找,使用 all { ... } 遍历每个结果
    +searchClass {
    +    // ...
    +}.all { clazz ->
    +    // 得到每个结果
    +}
    +// 异步查找,使用 waitAll 得到条件全部查找到的结果
    +val context: Context // 假设这就是当前 APP 的 Context
    +searchClass(context, async = true) {
    +    // ...
    +}.waitAll { classes ->
    +    classes.forEach {
    +        // 得到每个结果
    +    }
    +}
    +

    小提示

    更多功能请参考 ClassLoader.searchClass 方法。

    Member 扩展

    这里是 Class 字节码成员变量 FieldMethodConstructor 相关的扩展功能。

    小提示

    MemberFieldMethodConstructor 的接口描述对象,它在 Java 反射中为 Class 中字节码成员的总称。

    假设有一个这样的 Class

    示例如下

    package com.demo;
    +
    +public class BaseTest {
    +
    +    public BaseTest() {
    +        // ...
    +    }
    +
    +    public BaseTest(boolean isInit) {
    +        // ...
    +    }
    +
    +    private void doBaseTask(String taskName) {
    +        // ...
    +    }
    +}
    +
    package com.demo;
    +
    +public class Test extends BaseTest {
    +
    +    public Test() {
    +        // ...
    +    }
    +
    +    public Test(boolean isInit) {
    +        // ...
    +    }
    +
    +    private static TAG = "Test";
    +
    +    private BaseTest baseInstance;
    +
    +    private String a;
    +
    +    private boolean a;
    +
    +    private boolean isTaskRunning = false;
    +
    +    private static void init() {
    +        // ...
    +    }
    +
    +    private void doTask(String taskName) {
    +        // ...
    +    }
    +
    +    private void release(String taskName, Function<boolean, String> task, boolean isFinish) {
    +        // ...
    +    }
    +
    +    private void stop() {
    +        // ...
    +    }
    +
    +    private String getName() {
    +        // ...
    +    }
    +
    +    private void b() {
    +        // ...
    +    }
    +
    +    private void b(String a) {
    +        // ...
    +    }
    +}
    +

    查找与反射调用

    假设我们要得到 Test(以下统称“当前 Class”)的 doTask 方法并执行,通常情况下,我们可以使用标准的反射 API 去查找这个方法。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用反射 API 调用并执行
    +Test::class.java
    +    .getDeclaredMethod("doTask", String::class.java)
    +    .apply { isAccessible = true }
    +    .invoke(instance, "task_name")
    +

    这种写法大概不是很友好,此时 YukiReflection 就为你提供了一个可在任意地方使用的语法糖。

    以上写法换做 YukiReflection 可写作如下形式。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doTask"
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    小提示

    更多功能请参考 MethodFinder

    同样地,我们需要得到 isTaskRunning 变量也可以写作如下形式。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.field {
    +    name = "isTaskRunning"
    +    type = BooleanType
    +}.get(instance).any() // any 为 Field 的任意类型实例化对象
    +

    小提示

    更多功能请参考 FieldFinder

    也许你还想得到当前 Class 的构造方法,同样可以实现。

    示例如下

    Test::class.java.constructor {
    +    param(BooleanType)
    +}.get().call(true) // 可创建一个新的实例
    +

    若想得到的是 Class 的无参构造方法,可写作如下形式。

    示例如下

    Test::class.java.constructor().get().call() // 可创建一个新的实例
    +

    小提示

    更多功能请参考 ConstructorFinder

    可选的查找条件

    假设我们要得到 Class 中的 getName 方法,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "getName"
    +    emptyParam()
    +    returnType = StringClass
    +}.get(instance).string() // 得到方法的结果
    +

    通过观察发现,这个 Class 中只有一个名为 getName 的方法,那我们可不可以再简单一点呢?

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "getName"
    +    emptyParam()
    +}.get(instance).string() // 得到方法的结果
    +

    是的,对于确切不会变化的方法,你可以精简查找条件。

    在只使用 getwait 方法得到结果时 YukiReflection 会默认按照字节码顺序匹配第一个查找到的结果

    问题又来了,这个 Class 中有一个 release 方法,但是它的方法参数很长,而且部分类型可能无法直接得到。

    通常情况下我们会使用 param(...) 来查找这个方法,但是有没有更简单的方法呢。

    此时,在确定方法唯一性后,你可以使用 paramCount 来查找到这个方法。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "release"
    +    // 此时我们不必确定方法参数具体类型,写个数就好
    +    paramCount = 3
    +}.get(instance) // 得到这个方法
    +

    上述示例虽然能够匹配成功,但是不精确,此时你还可以使用 VagueType 来填充你不想填写的方法参数类型。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "release"
    +    // 使用 VagueType 来填充不想填写的类型,同时保证其它类型能够匹配
    +    param(StringClass, VagueType, BooleanType)
    +}.get(instance) // 得到这个方法
    +

    如果你并不确定每一个参数的类型,你可以通过 param { ... } 方法来创建一个条件方法体。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "release"
    +    // 得到 it (Class) 方法参数类型数组实例来仅判断已知的类型和它的位置
    +    param { it[0] == StringClass && it[2] == BooleanType }
    +}.get(instance) // 得到这个方法
    +

    小提示

    使用 param { ... } 创建一个条件方法体,其中的变量 it 即当前方法参数的 Class 类型数组实例,此时你就可以自由使用 Class 中的所有对象及其方法。

    方法体末尾条件需要返回一个 Boolean,即最终的条件判断结果。

    更多功能请参考 FieldFinder.typeMethodFinder.paramMethodFinder.returnTypeConstructorFinder.param 方法。

    在父类查找

    你会注意到 Test 继承于 BaseTest,现在我们想得到 BaseTestdoBaseTask 方法,在不知道父类名称的情况下,要怎么做呢?

    参照上面的查找条件,我们只需要在查找条件中加入一个 superClass 即可实现这个功能。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doBaseTask"
    +    param(StringClass)
    +    // 只需要添加这个条件
    +    superClass()
    +}.get(instance).call("task_name")
    +

    这个时候我们就可以在父类中取到这个方法了。

    superClass 有一个参数为 isOnlySuperClass,设置为 true 后,可以跳过当前 Class 仅查找当前 Class 的父类。

    由于我们现在已知 doBaseTask 方法只存在于父类,可以加上这个条件节省查找时间。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doBaseTask"
    +    param(StringClass)
    +    // 加入一个查找条件
    +    superClass(isOnlySuperClass = true)
    +}.get(instance).call("task_name")
    +

    这个时候我们同样可以得到父类中的这个方法。

    superClass 一旦设置就会自动循环向后查找全部继承的父类中是否有这个方法,直到查找到目标没有父类(继承关系为 java.lang.Object)为止。

    特别注意

    当前查找的 Method 除非指定 superClass 条件,否则只能查找到当前 ClassMethod,这是 Java 反射 API 的默认行为。

    模糊查找

    如果我们想查找一个方法名称,但是又不确定它在每个版本中是否发生变化,此时我们就可以使用模糊查找功能。

    假设我们要得到 Class 中的 doTask 方法,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name {
    +        // 设置名称不区分大小写
    +        it.equals("dotask", isIgnoreCase = true)
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    已知当前 Class 中仅有一个 doTask 方法,我们还可以判断方法名称仅包含其中指定的字符。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name {
    +        // 仅包含 oTas
    +        it.contains("oTas")
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    我们还可以根据首尾字符串进行判断。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name {
    +        // 开头包含 do,结尾包含 Task
    +        it.startsWith("do") && it.endsWith("Task")
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    通过观察发现这个方法名称中只包含字母,我们还可以再增加一个精确的查找条件。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name {
    +        // 开头包含 do,结尾包含 Task,仅包含字母
    +        it.startsWith("do") && it.endsWith("Task") && it.isOnlyLetters()
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    小提示

    使用 name { ... } 创建一个条件方法体,其中的变量 it 即当前名称的字符串,此时你就可以在 NameRules 的扩展方法中自由使用其中的功能。

    方法体末尾条件需要返回一个 Boolean,即最终的条件判断结果。

    更多功能请参考 FieldFinder.nameMethodFinder.name 方法以及 NameRules

    多重查找

    有些时候,我们可能需要查找一个 Class 中具有相同特征的一组方法、构造方法、变量,此时,我们就可以利用相对条件匹配来完成。

    在查找条件结果的基础上,我们只需要把 get 换为 all 即可得到匹配条件的全部字节码。

    假设这次我们要得到 Class 中方法参数个数范围在 1..3 的全部方法,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    paramCount(1..3)
    +}.all(instance).forEach { instance ->
    +    // 调用执行每个方法
    +    instance.call(...)
    +}
    +

    上述示例可完美匹配到如下 3 个方法。

    private void doTask(String taskName)

    private void release(String taskName, Function<boolean, String> task, boolean isFinish)

    private void b(String a)

    如果你想更加自由地定义参数个数范围的条件,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    paramCount { it < 3 }
    +}.all(instance).forEach { instance ->
    +    // 调用执行每个方法
    +    instance.call(...)
    +}
    +

    上述示例可完美匹配到如下 6 个方法。

    private static void init()

    private void doTask(String taskName)

    private void stop(String a)

    private void getName(String a)

    private void b()

    private void b(String a)

    通过观察 Class 中有两个名称为 b 的方法,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "b"
    +}.all(instance).forEach { instance ->
    +    // 调用执行每个方法
    +    instance.call(...)
    +}
    +

    上述示例可完美匹配到如下 2 个方法。

    private void b()

    private void b(String a)

    小提示

    使用 paramCount { ... } 创建一个条件方法体,其中的变量 it 即当前参数个数的整数,此时你就可以在 CountRules 的扩展方法中自由使用其中的功能。

    方法体末尾条件需要返回一个 Boolean,即最终的条件判断结果。

    更多功能请参考 MethodFinder.paramCountConstructorFinder.paramCount 方法以及 CountRules

    静态字节码

    有些方法和变量在 Class 中是静态的实现,这个时候,我们不需要传入实例就可以调用它们。

    假设我们这次要得到静态变量 TAG 的内容。

    示例如下

    Test::class.java.field {
    +    name = "TAG"
    +    type = StringClass
    +}.get().string() // Field 的类型是字符串,可直接进行 cast
    +

    假设 Class 中存在同名的非静态 TAG 变量,这个时候怎么办呢?

    加入一个筛选条件即可。

    示例如下

    Test::class.java.field {
    +    name = "TAG"
    +    type = StringClass
    +    // 标识查找的这个变量需要是静态
    +    modifiers { isStatic }
    +}.get().string() // Field 的类型是字符串,可直接进行 cast
    +

    我们还可以调用名为 init 的静态方法。

    示例如下

    Test::class.java.method {
    +    name = "init"
    +    emptyParam()
    +}.get().call()
    +

    同样地,你可以标识它是一个静态。

    示例如下

    Test::class.java.method {
    +    name = "init"
    +    emptyParam()
    +    // 标识查找的这个方法需要是静态
    +    modifiers { isStatic }
    +}.get().call()
    +

    小提示

    使用 modifiers { ... } 创建一个条件方法体,此时你就可以在 ModifierRules 中自由使用其中的功能。

    方法体末尾条件需要返回一个 Boolean,即最终的条件判断结果。

    更多功能请参考 FieldFinder.modifiersMethodFinder.modifiersConstructorFinder.modifiers 方法以及 ModifierRules

    混淆的字节码

    你可能已经注意到了,这里给出的示例 Class 中有两个混淆的变量名称,它们都是 a,这个时候我们要怎么得到它们呢?

    有两种方案。

    第一种方案,确定变量的名称和类型。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.field {
    +    name = "a"
    +    type = BooleanType
    +}.get(instance).any() // 得到名称为 a 类型为 Boolean 的变量
    +

    第二种方案,确定变量的类型所在的位置。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.field {
    +    type(BooleanType).index().first()
    +}.get(instance).any() // 得到第一个类型为 Boolean 的变量
    +

    以上两种情况均可得到对应的变量 private boolean a

    同样地,这个 Class 中也有两个混淆的方法名称,它们都是 b

    你也可以有两种方案来得到它们。

    第一种方案,确定方法的名称和方法参数。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "b"
    +    param(StringClass)
    +}.get(instance).call("test_string") // 得到名称为 b 方法参数为 [String] 的方法
    +

    第二种方案,确定方法的参数所在的位置。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    param(StringClass).index().first()
    +}.get(instance).call("test_string") // 得到第一个方法参数为 [String] 的方法
    +

    由于观察到这个方法在 Class 的最后一个,那我们还有一个备选方案。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    order().index().last()
    +}.get(instance).call("test_string") // 得到当前 Class 的最后一个方法
    +

    注意

    请尽量避免使用 order 来筛选字节码的下标,它们可能是不确定的,除非你确定它在这个 Class 中的位置一定不会变。

    直接调用

    上面介绍的调用字节码的方法都需要使用 get(instance) 才能调用对应的方法,有没有简单一点的办法呢?

    此时,你可以在任意实例上使用 current 方法来创建一个调用空间。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 假设这个 Class 是不能被直接得到的
    +instance.current {
    +    // 执行 doTask 方法
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +    // 执行 stop 方法
    +    method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +    // 得到 name
    +    val name = method { name = "getName" }.string()
    +}
    +

    我们还可以用 superClass 调用当前 Class 父类的方法。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 假设这个 Class 是不能被直接得到的
    +instance.current {
    +    // 执行父类的 doBaseTask 方法
    +    superClass().method {
    +        name = "doBaseTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}
    +

    如果你不喜欢使用一个大括号的调用域来创建当前实例的命名空间,你可以直接使用 current() 方法。

    示例如下

    // 假设这就是这个 Class 的实例,这个 Class 是不能被直接得到的
    +val instance = Test()
    +// 执行 doTask 方法
    +instance
    +    .current()
    +    .method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +// 执行 stop 方法
    +instance
    +    .current()
    +    .method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +// 得到 name
    +val name = instance.current().method { name = "getName" }.string()
    +

    同样地,它们之间可以连续调用,但不允许内联调用

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 假设这个 Class 是不能被直接得到的
    +instance.current {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}.current()
    +    .method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +// 注意,因为 current() 返回的是 CurrentClass 自身对象,所以不能像下面这样调用
    +instance.current().current()
    +

    针对 Field 实例,还有一个便捷的方法,可以直接获取 Field 所在实例的对象。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 假设这个 Class 是不能被直接得到的
    +instance.current {
    +    // <方案1>
    +    field {
    +        name = "baseInstance"
    +    }.current {
    +        method {
    +            name = "doBaseTask"
    +            param(StringClass)
    +        }.call("task_name")
    +    }
    +    // <方案2>
    +    field {
    +        name = "baseInstance"
    +    }.current()
    +        ?.method {
    +            name = "doBaseTask"
    +            param(StringClass)
    +        }?.call("task_name")
    +}
    +

    注意

    上述 current 方法相当于帮你调用了 CurrentClass 中的 field { ... }.any()?.current() 方法。

    若不存在 CurrentClass 调用域,你需要使用 field { ... }.get(instance).current() 来进行调用。

    问题又来了,我想使用反射的方式创建如下的实例并调用其中的方法,该怎么做呢?

    示例如下

    Test(true).doTask("task_name")
    +

    通常情况下,我们可以使用标准的反射 API 来调用。

    示例如下

    "com.demo.Test".toClass()
    +    .getDeclaredConstructor(Boolean::class.java)
    +    .apply { isAccessible = true }
    +    .newInstance(true)
    +    .apply {
    +        javaClass
    +            .getDeclaredMethod("doTask", String::class.java)
    +            .apply { isAccessible = true }
    +            .invoke(this, "task_name")
    +    }
    +

    但是感觉这种做法好麻烦,有没有更简洁的调用方法呢?

    这个时候,我们还可以借助 buildOf 方法来创建一个实例。

    示例如下

    "com.demo.Test".toClass().buildOf(true) { param(BooleanType) }?.current {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}
    +

    若你希望 buildOf 方法返回当前实例的类型,你可以在其中加入类型泛型声明,而无需使用 ascast 目标类型。

    这种情况多用于实例本身的构造方法是私有的,但是里面的方法是公有的,这样我们只需要对其构造方法进行反射创建即可。

    示例如下

    // 假设这个 Class 是能够直接被得到的
    +val test = Test::class.java.buildOf<Test>(true) { param(BooleanType) }
    +test.doTask("task_name")
    +

    小提示

    更多功能请参考 CurrentClass 以及 Class.buildOf 方法。

    再次查找

    假设有三个不同版本的 Class,它们都是这个 APP 不同版本相同的 Class

    这里面同样都有一个方法 doTask,假设它们的功能是一样的。

    版本 A 示例如下

    public class Test {
    +
    +    public void doTask() {
    +        // ...
    +    }
    +}
    +

    版本 B 示例如下

    public class Test {
    +
    +    public void doTask(String taskName) {
    +        // ...
    +    }
    +}
    +

    版本 C 示例如下

    public class Test {
    +
    +    public void doTask(String taskName, int type) {
    +        // ...
    +    }
    +}
    +

    我们需要在不同的版本中得到这个相同功能的 doTask 方法,要怎么做呢?

    此时,你可以使用 RemedyPlan 完成你的需求。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doTask"
    +    emptyParam()
    +}.remedys {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.onFind {
    +        // 可在这里实现找到的逻辑
    +    }
    +    method {
    +        name = "doTask"
    +        param(StringClass, IntType)
    +    }.onFind {
    +        // 可在这里实现找到的逻辑
    +    }
    +}.wait(instance) {
    +    // 得到方法的结果
    +}
    +

    特别注意

    使用了 RemedyPlan 的方法查找结果不能再使用 get 的方式得到方法实例,应当使用 wait 方法。

    另外,你还可以在使用 多重查找 的情况下继续使用 RemedyPlan

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doTask"
    +    emptyParam()
    +}.remedys {
    +    method {
    +        name = "doTask"
    +        paramCount(0..1)
    +    }.onFind {
    +        // 可在这里实现找到的逻辑
    +    }
    +    method {
    +        name = "doTask"
    +        paramCount(1..2)
    +    }.onFind {
    +        // 可在这里实现找到的逻辑
    +    }
    +}.waitAll(instance) {
    +    // 得到方法的结果
    +}
    +

    相对匹配

    假设当前 APP 中不同版本中存在功能相同的 Class 但仅有 Class 的名称不一样。

    版本 A 示例如下

    public class ATest {
    +
    +    public static void doTask() {
    +        // ...
    +    }
    +}
    +

    版本 B 示例如下

    public class BTest {
    +
    +    public static void doTask() {
    +        // ...
    +    }
    +}
    +

    这个时候我们想在每个版本都调用这个 Class 里的 doTask 方法该怎么做呢?

    通常做法是判断 Class 是否存在。

    示例如下

    // 首先查找到这个 Class
    +val currentClass = 
    +    if("com.demo.ATest".hasClass()) "com.demo.ATest".toClass() else "com.demo.BTest".toClass()
    +// 然后再查找这个方法并调用
    +currentClass.method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    感觉这种方案非常的不优雅且繁琐,那么此时 YukiReflection 就为你提供了一个非常方便的 VariousClass 专门来解决这个问题。

    现在,你可以直接使用以下方式获取到这个 Class

    示例如下

    VariousClass("com.demo.ATest", "com.demo.BTest").get().method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    若当前 Class 在指定的 ClassLoader 中存在,你可以在 get 中填入你的 ClassLoader

    示例如下

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +VariousClass("com.demo.ATest", "com.demo.BTest").get(customClassLoader).method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    若你不确定所有的 Class 一定会被匹配到,你可以使用 getOrNull 方法。

    示例如下

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +VariousClass("com.demo.ATest", "com.demo.BTest").getOrNull(customClassLoader)?.method {
    +    name = "doTask"
    +    emptyParam()
    +}?.get()?.call()
    +

    小提示

    更多功能请参考 VariousClass

    调用泛型

    在反射过程中,我们可能会遇到泛型问题,在泛型的反射处理上,YukiReflection 同样提供了一个可在任意地方使用的语法糖。

    例如我们有如下的泛型类。

    示例如下

    class TestGeneric<T, R> (t: T, r: R) {
    +
    +    fun foo() {
    +        // ...
    +    }
    +}
    +

    当我们想在当前 Class 中获得泛型 TRClass 实例,只需要如下实现。

    示例如下

    class TestGeneric<T, R> (t: T, r: R) {
    +
    +    fun foo() {
    +        // 获得当前实例的操作对象
    +        // 获得 T 的 Class 实例,在参数第 0 位,默认值可以不写
    +        val tClass = current().generic()?.argument()
    +        // 获得 R 的 Class 实例,在参数第 1 位
    +        val rClass = current().generic()?.argument(index = 1)
    +        // 你还可以使用如下写法
    +        current().generic {
    +             // 获得 T 的 Class 实例,在参数第 0 位,默认值可以不写
    +            val tClass = argument()
    +            // 获得 R 的 Class 实例,在参数第 1 位
    +            val rClass = argument(index = 1)
    +        }
    +    }
    +}
    +

    当我们想在外部调用这个 Class 时,就可以有如下实现。

    示例如下

    // 假设这个就是 T 的 Class
    +class TI {
    +
    +    fun foo() {
    +        // ...
    +    }
    +}
    +// 假设这个就是 T 的实例
    +val tInstance: TI? = ...
    +// 获得 T 的 Class 实例,在参数第 0 位,默认值可以不写,并获得其中的方法 foo 并调用
    +TestGeneric::class.java.generic()?.argument()?.method {
    +    name = "foo"
    +    emptyParam()
    +}?.get(tInstance)?.invoke<TI>()
    +

    小提示

    更多功能请参考 CurrentClass.genericClass.generic 方法以及 GenericClass

    注意误区

    这里列举了使用时可能会遇到的误区部分,可供参考。

    限制性查找条件

    在查找条件中,除了 order只能使用一次 index 功能。

    示例如下

    method {
    +    name = "test"
    +    param(BooleanType).index(num = 2)
    +    // 错误的使用方法,请仅保留一个 index 方法
    +    returnType(StringClass).index(num = 1)
    +}
    +

    以下查找条件的使用是没有任何问题的。

    示例如下

    method {
    +    name = "test"
    +    param(BooleanType).index(num = 2)
    +    order().index(num = 1)
    +}
    +

    必要的查找条件

    在普通方法查找条件中,即使是无参的方法也需要设置查找条件

    假设我们有如下的 Class

    示例如下

    public class TestFoo {
    +
    +    public void foo(String string) {
    +        // ...
    +    }
    +
    +    public void foo() {
    +        // ...
    +    }
    +}
    +

    我们要得到其中的 public void foo() 方法,可以写作如下形式。

    示例如下

    TestFoo::class.java.method {
    +    name = "foo"
    +}
    +

    但是,上面的例子是错误的

    你会发现这个 Class 中有两个 foo 方法,其中一个带有方法参数。

    由于上述例子没有设置 param 的查找条件,得到的结果将会是匹配名称且匹配字节码顺序的第一个方法 public void foo(String string),而不是我们需要的最后一个方法。

    这是一个经常会出现的错误没有方法参数就会丢失方法参数查找条件的使用问题。

    正确的使用方法如下。

    示例如下

    TestFoo::class.java.method {
    +    name = "foo"
    +    // ✅ 正确的使用方法,添加详细的筛选条件
    +    emptyParam()
    +}
    +

    至此,上述的示例将可以完美地匹配到 public void foo() 方法。

    兼容性说明

    在过往历史版本的 API 中是允许匹配不写默认匹配无参方法的做法的,但是最新版本更正了这一问题,请确保你使用的是最新的 API 版本。

    在构造方法查找条件中,即使是无参的构造方法也需要设置查找条件

    假设我们有如下的 Class

    示例如下

    public class TestFoo {
    +
    +    public TestFoo() {
    +        // ...
    +    }
    +}
    +

    我们要得到其中的 public TestFoo() 构造方法,必须写作如下形式。

    示例如下

    TestFoo::class.java.constructor { emptyParam() }
    +

    上面的例子可以成功获取到 public TestFoo() 构造方法。

    如果你写作 constructor() 而丢失了 emptyParam(),此时查找到的结果会是按照字节码顺序排列的的第一位,可能并不是无参的

    兼容性说明

    在过往历史版本的 API 中构造方法不填写任何查找参数会直接找不到构造方法,这是一个 BUG,最新版本已经进行修复,请确保你使用的是最新的 API 版本。

    API 行为变更

    1.2.0 及之后的版本中,constructor() 的行为不再是 constructor { emptyParam() } 而是 constructor {},请注意行为变更合理调整查找参数。

    不设置查找条件

    在不设置查找条件的情况下,使用 field()constructor()method() 将返回当前 Class 下的所有成员对象。

    使用 get(...)give() 的方式获取将只能得到按照字节码顺序排列的的第一位。

    示例如下

    Test::class.java.field().get(...)
    +Test::class.java.method().give()
    +

    如果你想得到全部成员对象,你可以使用 all(...)giveAll()

    示例如下

    Test::class.java.field().all(...)
    +Test::class.java.method().giveAll()
    +

    兼容性说明

    在过往历史版本的 API 中,不设置查找条件将抛出异常,此特性在 1.2.0 及之后的版本中加入。

    字节码类型

    在字节码调用结果中,cast 方法只能指定字节码对应的类型。

    例如我们想得到一个 Boolean 类型的变量,把他转换为 String

    以下是错误的使用方法。

    示例如下

    field {
    +    name = "test"
    +    type = BooleanType
    +}.get().string() // 错误的使用方法,必须 cast 为字节码目标类型
    +

    以下是正确的使用方法。

    示例如下

    field {
    +    name = "test"
    +    type = BooleanType
    +}.get().boolean().toString() // ✅ 正确的使用方法,得到类型后再进行转换
    +

    常用类型扩展

    在查找方法、变量的时候我们通常需要指定所查找的类型。

    示例如下

    field {
    +    name = "test"
    +    type = Boolean::class.javaPrimitiveType
    +}
    +

    在 Kotlin 中表达出 Boolean::class.javaPrimitiveType 这个类型的写法很长,感觉并不方便。

    因此,YukiReflection 为开发者封装了常见的类型调用,其中包含了 Android 的相关类型和 Java 的常见类型与原始类型关键字

    这个时候上面的类型就可以写作如下形式了。

    示例如下

    field {
    +    name = "test"
    +    type = BooleanType
    +}
    +

    在 Java 常见类型中的原始类型 (或基本类型) 关键字都已被封装为 类型 + Type 的方式,例如 IntTypeFloatType (它们的字节码类型为 intfloat)。

    相应地,数组类型也有方便的使用方法,假设我们要获得 String[] 类型的数组。

    需要写做 java.lang.reflect.Array.newInstance(String::class.java, 0).javaClass 才能得到这个类型。

    感觉是不是很麻烦,这个时候我们可以使用方法 ArrayClass(StringClass) 来得到这个类型。

    同时由于 String 是常见类型,所以还可以直接使用 StringArrayClass 来得到这个类型。

    一些常见需求中查找的方法,都有其对应的封装类型以供使用,格式为 类型 + Class

    以下是 Java 中一些特例类型在 YukiReflection 中的封装名称。

    • voidUnitType

    • java.lang.VoidUnitClass

    • java.lang.ObjectAnyClass

    • java.lang.IntegerIntClass

    • java.lang.CharacterCharClass

    注意

    类型 + Type 封装类型会且仅会表示为 Java 原始类型关键字,由于 Kotlin 中不存在原始类型这个概念,所以它们都会被定义为 KClass

    Java 中共有 9 个原始类型关键字,其中 8 个为原始类型,分别为 booleancharbyteshortintfloatlongdouble,其中 void 类型是一个特例。

    同时它们都有 Java 自身对应的封装类型,例如 java.lang.Booleanjava.lang.Integer,这些类型是不相等的,请注意区分。

    同样地,数组也有对应的封装类型,它们也需要与 Java 原始类型关键字 进行区分。

    例如 byte[] 的封装类型为 ByteArrayTypeArrayClass(ByteType),而 Byte[] 的封装类型为 ByteArrayClassArrayClass(ByteClass),这些类型也是不相等的

    同时,欢迎你能贡献更多的常用类型。

    `,336);function F(g,k){const p=l("Badge"),o=l("ExternalLinkIcon");return t(),r("div",null,[d,s("h3",A,[y,n(" 模糊查找 "),e(p,{type:"tip",text:"Beta",vertical:"middle"})]),D,s("div",B,[C,u,s("p",null,[n("我们欢迎各位开发者开始使用 "),s("a",v,[n("DexKit"),e(o)]),n(",它是一个使用 C++ 实现的 "),m,n(" 高性能运行时解析库,在性能方面比 Java 层更加高效与优秀,目前尚在开发阶段,欢迎提出宝贵建议。")])]),b])}const q=c(i,[["render",F],["__file","features.html.vue"]]);export{q as default}; diff --git a/assets/future.html-AGWEVq2N.js b/assets/future.html-AGWEVq2N.js new file mode 100644 index 0000000..a82cd39 --- /dev/null +++ b/assets/future.html-AGWEVq2N.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-ae7b83f2","path":"/en/about/future.html","title":"Looking for Future","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Future Plans","slug":"future-plans","link":"#future-plans","children":[{"level":3,"title":"Automatically Generate Reflection Code","slug":"automatically-generate-reflection-code","link":"#automatically-generate-reflection-code","children":[]},{"level":3,"title":"Automatically Generate Directly Called Class Objects","slug":"automatically-generate-directly-called-class-objects","link":"#automatically-generate-directly-called-class-objects","children":[]}]}],"git":{"updatedTime":1702855553000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"en/about/future.md"}');export{e as data}; diff --git a/assets/future.html-ejs_q7b1.js b/assets/future.html-ejs_q7b1.js new file mode 100644 index 0000000..3d89492 --- /dev/null +++ b/assets/future.html-ejs_q7b1.js @@ -0,0 +1,102 @@ +import{_ as s,o as n,c as a,a as l}from"./app-Un_zyw_U.js";const e={},o=l(`

    Looking for Future

    The future is bright and uncertain, let us look forward to the future development space of YukiReflection.

    Future Plans

    Features that YukiReflection may add later are included here.

    Automatically Generate Reflection Code

    Use stub to create a Kotlin class, and declare the parameters in it, as well as its different states in each version.

    For example, the Java class below is the target class we need to reflect.

    The following example

    package com.example.test;
    +
    +public class MyClass {
    +    
    +    private String myField = "test";
    +
    +    public MyClass() {
    +        //...
    +    }
    +
    +    private String myMethod1(String var1, int var2) {
    +        //...
    +    }
    +
    +    private void myMethod2() {
    +        //...
    +    }
    +
    +    private void myMethod3(String var1) {
    +        //...
    +    }
    +}
    +

    Through the existing usage of the current API, this class can be called reflectively in the following way.

    The following example

    classOf<MyClass>().buildOf().current {
    +    // Call myField
    +    val value = field { name = "myField" }.string()
    +    // Call myMethod1
    +    val methodValue = method { name = "myMethod1" }.string("test", 0)
    +    // Call myMethod2
    +    method { name = "myMethod2" }.call()
    +    // Call myMethod3
    +    method { name = "myMethod3" }.call("test")
    +}
    +

    The function to be implemented at present can be directly defined as the following Kotlin class using the reflection function.

    The following example

    package com.example.test
    +
    +@ReflectClass
    +class MyClass {
    +
    +    @ReflectField
    +    val myField: String = fieldValueOf("none")
    +
    +    @ReflectMethod
    +    fun myMethod1(var1: String, var2: Int): String = methodReturnValueOf("none")
    +
    +    @ReflectMethod
    +    fun myMethod2() = MethodReturnType.Unit
    +
    +    @ReflectMethod
    +    fun myMethod3(var1: String) = MethodReturnType.Unit
    +}
    +

    Then we can directly call this defined Kotlin class to implement the reflection function, and the API will automatically generate the reflection code according to the annotation.

    The following example

    MyClass().also {
    +    // Call myField
    +    val value = it.myField
    +    // Call myMethod1
    +    val methodValue = it.myMethod1("test", 0)
    +    // Call myMethod2
    +    it.myMethod2()
    +    // Call myMethod3
    +    it.myMethod3("test")
    +}
    +

    Tips

    The above functions may change after the actual release, and the functions of the actual version shall prevail.

    Automatically Generate Directly Called Class Objects

    In Kotlin, the way to represent Java class objects is YourObject::class.java.

    This writing method is usually very long and will be very unsightly when used extensively during reflection.

    In the existing version, we have built-in commonly used Class objects, but this will increase the size of dependencies, and these objects may not be used in most cases.

    For example, StringClass, IntType, etc., these objects are built in YukiReflection.

    So we plan to add a function in the future, which can use properties to create a list of Class objects that need to be generated, and generate these Class objects in sequence through the Gradle plugin.

    Class objects of primitive types such as those mentioned above will still be built into YukiReflection, and the remaining Class objects need to be defined by yourself.

    The generated name specification is Class Name + Class.

    In order to prevent package name conflicts, you can control the sub-package name of the generated Class object.

    In the configuration file, you don't need to add Class as a suffix.

    You can define the generated root package name in the Gradle plugin, which defaults to com.highcapable.yukireflection.generated.classes.

    The following example

    # The most basic way to define is to write the name directly
    +# Will be generated to com.highcapable.yukireflection.generated.classes.BundleClass
    +android.os.Bundle=Bundle
    +# You can use the "." form in front to define the prefixed subpackage name
    +# For example, we want to define this class to the desired package name
    +# Will be generated to com.highcapable.yukireflection.generated.classes.myandroid.myos.BundleClass
    +android.os.Bundle=myandroid.myos.Bundle
    +# You can also not fill in the key value content, which will use the key value name
    +# as the defined package name and class name
    +# Will be generated to com.highcapable.yukireflection.generated.classes.android.os.BundleClass
    +android.os.Bundle
    +

    The approximate code form of the Class object generated by the above method is as follows.

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +// Used with default ClassLoader
    +val BundleClass: Class<*> = "android.os.Bundle".toClass()
    +
    +// Used when ClassLoader is specified
    +fun BundleClass(loader: ClassLoader): Class<*> = "android.os.Bundle".toClass(loader)
    +

    Maybe this Class may not be obtained in some cases.

    In this case, you can refer to the following configuration method.

    The following example

    # Add "?" after the key value to define a nullable Class object
    +android.os.Bundle?
    +

    The approximate code form of the Class object generated by the above method is as follows.

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +// Used with default ClassLoader
    +val BundleClass: Class<*>? = "android.os.Bundle".toClassOrNull()
    +
    +// Used when ClassLoader is specified
    +fun BundleClass(loader: ClassLoader): Class<*>? = "android.os.Bundle".toClassOrNull(loader)
    +

    If this Class object can be referenced by direct call, you can refer to the following configuration method at this time.

    The following example

    # Add "!!" after the key value to define a Class object that can be called directly
    +android.os.Bundle!!
    +

    The approximate code form of the Class object generated by the above method is as follows.

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +import android.os.Bundle
    +
    +// Used with default ClassLoader
    +val BundleClass: Class<Bundle> = classOf<Bundle>()
    +
    +// Used when ClassLoader is specified
    +fun BundleClass(loader: ClassLoader): Class<Bundle> = classOf<Bundle>(loader)
    +

    With the generated Class object, we can happily use YukiReflection for reflection.

    The following example

    method {
    +    name = "onCreate"
    +    param(BundleClass)
    +}
    +

    Tips

    The above functions may change after the actual release, and the functions of the actual version shall prevail.

    `,49),p=[o];function t(c,i){return n(),a("div",null,p)}const d=s(e,[["render",t],["__file","future.html.vue"]]);export{d as default}; diff --git a/assets/future.html-qjL5dEhQ.js b/assets/future.html-qjL5dEhQ.js new file mode 100644 index 0000000..ce3e59d --- /dev/null +++ b/assets/future.html-qjL5dEhQ.js @@ -0,0 +1,101 @@ +import{_ as s,o as n,c as a,a as l}from"./app-Un_zyw_U.js";const e={},p=l(`

    展望未来

    未来是美好的,也是不确定的,让我们共同期待 YukiReflection 在未来的发展空间。

    未来的计划

    这里收录了 YukiReflection 可能会在后期添加的功能。

    自动生成反射代码

    使用 stub 的方式创建一个 Kotlin 类,并声明其中的参数,以及其在各个版本中的不同状态。

    比如下面的这个 Java 类就是我们需要反射的目标类。

    示例如下

    package com.example.test;
    +
    +public class MyClass {
    +    
    +    private String myField = "test";
    +
    +    public MyClass() {
    +        // ...
    +    }
    +
    +    private String myMethod1(String var1, int var2) {
    +        // ...
    +    }
    +
    +    private void myMethod2() {
    +        // ...
    +    }
    +
    +    private void myMethod3(String var1) {
    +        // ...
    +    }
    +}
    +

    通过目前 API 的现有用法可以使用如下方式反射调用这个类。

    示例如下

    classOf<MyClass>().buildOf().current {
    +    // 调用 myField
    +    val value = field { name = "myField" }.string()
    +    // 调用 myMethod1
    +    val methodValue = method { name = "myMethod1" }.string("test", 0)
    +    // 调用 myMethod2
    +    method { name = "myMethod2" }.call()
    +    // 调用 myMethod3
    +    method { name = "myMethod3" }.call("test")
    +}
    +

    目前要实现的功能是可以使用反射功能直接定义为如下 Kotlin 类。

    示例如下

    package com.example.test
    +
    +@ReflectClass
    +class MyClass {
    +
    +    @ReflectField
    +    val myField: String = fieldValueOf("none")
    +
    +    @ReflectMethod
    +    fun myMethod1(var1: String, var2: Int): String = methodReturnValueOf("none")
    +
    +    @ReflectMethod
    +    fun myMethod2() = MethodReturnType.Unit
    +
    +    @ReflectMethod
    +    fun myMethod3(var1: String) = MethodReturnType.Unit
    +}
    +

    然后我们就可以直接调用这个定义好的 Kotlin 类来实现反射功能,API 会根据注解自动生成反射代码。

    示例如下

    MyClass().also {
    +    // 调用 myField
    +    val value = it.myField
    +    // 调用 myMethod1
    +    val methodValue = it.myMethod1("test", 0)
    +    // 调用 myMethod2
    +    it.myMethod2()
    +    // 调用 myMethod3
    +    it.myMethod3("test")
    +}
    +

    小提示

    以上功能可能会在实际推出后有所变化,最终以实际版本的功能为准。

    自动生成可直接调用的 Class 对象

    在 Kotlin 中,表示 Java 的类对象的方式是 YourObject::class.java,这个写法通常会很长,在反射过程中大量使用会很不美观。

    在现有版本中,我们内置了常用的 Class 对象,但是这会增大依赖的体积,而且大多数情况下可能都用不到这些对象。

    例如 StringClassIntType 等等,这些对象都是在 YukiReflection 中内置的。

    所以我们计划在后期添加一个功能,可以使用 properties 的方式创建一个需要生成的 Class 对象列表,通过 Gradle 插件依次生成这些 Class 对象。

    诸如上面提到的这些原始类型的 Class 对象依然会内置在 YukiReflection 中,其余的 Class 对象需要自行定义。

    生成的名称规范为 类名 + Class,为了防止包名冲突,你可以控制生成的 Class 对象的子包名。

    在配置文件中,你无需添加 Class 作为后缀。

    你可以在 Gradle 插件中定义生成的根包名,默认为 com.highcapable.yukireflection.generated.classes

    示例如下

    # 最基本的定义方式就是直接写名称
    +# 将会生成到 com.highcapable.yukireflection.generated.classes.BundleClass
    +android.os.Bundle=Bundle
    +# 你可以在前方使用 "." 的形式来定义前置子包名
    +# 例如我们想把这个类定义到想要的包名
    +# 将会生成到 com.highcapable.yukireflection.generated.classes.myandroid.myos.BundleClass
    +android.os.Bundle=myandroid.myos.Bundle
    +# 你也可以不填写键值内容,这将使用键值名称作为定义的包名和类名
    +# 将会生成到 com.highcapable.yukireflection.generated.classes.android.os.BundleClass
    +android.os.Bundle
    +

    上述方式生成的 Class 对象的大概代码形式如下。

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +// 在默认 ClassLoader 的情况下使用
    +val BundleClass: Class<*> = "android.os.Bundle".toClass()
    +
    +// 在指定 ClassLoader 的情况下使用
    +fun BundleClass(loader: ClassLoader): Class<*> = "android.os.Bundle".toClass(loader)
    +

    也许这个 Class 可能在一些情况下无法被得到,这个时候你可以参考以下配置方式。

    示例如下

    # 在键值后添加 "?" 的形式来定义可空的 Class 对象
    +android.os.Bundle?
    +

    上述方式生成的 Class 对象的大概代码形式如下。

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +// 在默认 ClassLoader 的情况下使用
    +val BundleClass: Class<*>? = "android.os.Bundle".toClassOrNull()
    +
    +// 在指定 ClassLoader 的情况下使用
    +fun BundleClass(loader: ClassLoader): Class<*>? = "android.os.Bundle".toClassOrNull(loader)
    +

    如果这个 Class 对象能使用直接调用的方式进行引用,这个时候你可以参考以下配置方式。

    示例如下

    # 在键值后添加 "!!" 的形式来定义可直接调用的 Class 对象
    +android.os.Bundle!!
    +

    上述方式生成的 Class 对象的大概代码形式如下。

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +import android.os.Bundle
    +
    +// 在默认 ClassLoader 的情况下使用
    +val BundleClass: Class<Bundle> = classOf<Bundle>()
    +
    +// 在指定 ClassLoader 的情况下使用
    +fun BundleClass(loader: ClassLoader): Class<Bundle> = classOf<Bundle>(loader)
    +

    有了生成的 Class 对象,我们就可以愉快地使用 YukiReflection 进行反射了。

    示例如下

    method {
    +    name = "onCreate"
    +    param(BundleClass)
    +}
    +

    小提示

    以上功能可能会在实际推出后有所变化,最终以实际版本的功能为准。

    `,46),o=[p];function c(t,r){return n(),a("div",null,o)}const d=s(e,[["render",c],["__file","future.html.vue"]]);export{d as default}; diff --git a/assets/future.html-wqMG_3q5.js b/assets/future.html-wqMG_3q5.js new file mode 100644 index 0000000..da49591 --- /dev/null +++ b/assets/future.html-wqMG_3q5.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-3106ca14","path":"/zh-cn/about/future.html","title":"展望未来","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"未来的计划","slug":"未来的计划","link":"#未来的计划","children":[{"level":3,"title":"自动生成反射代码","slug":"自动生成反射代码","link":"#自动生成反射代码","children":[]},{"level":3,"title":"自动生成可直接调用的 Class 对象","slug":"自动生成可直接调用的-class-对象","link":"#自动生成可直接调用的-class-对象","children":[]}]}],"git":{"updatedTime":1702855553000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"zh-cn/about/future.md"}');export{e as data}; diff --git a/assets/home.html--XHi8faE.js b/assets/home.html--XHi8faE.js new file mode 100644 index 0000000..ad3b931 --- /dev/null +++ b/assets/home.html--XHi8faE.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-6a609e09","path":"/zh-cn/guide/home.html","title":"介绍","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"背景","slug":"背景","link":"#背景","children":[]},{"level":2,"title":"用途","slug":"用途","link":"#用途","children":[]},{"level":2,"title":"语言要求","slug":"语言要求","link":"#语言要求","children":[]},{"level":2,"title":"灵感来源","slug":"灵感来源","link":"#灵感来源","children":[]}],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"zh-cn/guide/home.md"}');export{e as data}; diff --git a/assets/home.html-8Cjdx1AU.js b/assets/home.html-8Cjdx1AU.js new file mode 100644 index 0000000..3730fe6 --- /dev/null +++ b/assets/home.html-8Cjdx1AU.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c8deafb2","path":"/zh-cn/api/home.html","title":"文档介绍","lang":"zh-CN","frontmatter":{"next":{"text":"Public API","link":"/zh-cn/api/public/com/highcapable/yukireflection/YukiReflection"}},"headers":[{"level":2,"title":"功能描述说明","slug":"功能描述说明","link":"#功能描述说明","children":[]},{"level":2,"title":"功能示例说明","slug":"功能示例说明","link":"#功能示例说明","children":[]},{"level":2,"title":"变更记录说明","slug":"变更记录说明","link":"#变更记录说明","children":[]},{"level":2,"title":"相关符号说明","slug":"相关符号说明","link":"#相关符号说明","children":[]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/home.md"}');export{e as data}; diff --git a/assets/home.html-CFF_AMaM.js b/assets/home.html-CFF_AMaM.js new file mode 100644 index 0000000..9a0728f --- /dev/null +++ b/assets/home.html-CFF_AMaM.js @@ -0,0 +1 @@ +import{_ as e,o,c as t,a as i}from"./app-Un_zyw_U.js";const n={},d=i('

    Document Introduce

    The document here will synchronize the relevant usage of the latest API version, please keep YukiReflection as the latest version to use the latest version of the function.

    Function Description

    The function description mainly introduces the related usage and purpose of the current API.

    Function Example Description

    The function examples mainly show the basic usage examples of the current API for reference.

    Change Record Description

    The function of the first version will be marked as v<version> first;

    New function added later will be marked as v<version> added;

    Later modified function will be appended as v<version> modified;

    Later deprecated function will be marked as v<version> deprecated and strikethrough;

    Later removed function will be marked as v<version> removed and strikethrough.

    • kt  Kotlin Static File

    • annotation  Annotation Class

    • interface  Interface Class

    • object  Class (Singleton)

    • class  Class

    • field  Field or get / set method or read-only get method

    • method  Method

    • enum  Enum constant

    • ext-field  Extension field (global)

    • ext-method  Extension method (global)

    • i-ext-field  Extension field (internal)

    • i-ext-method  Extension method (internal)

    ',14),c=[d];function a(r,l){return o(),t("div",null,c)}const p=e(n,[["render",a],["__file","home.html.vue"]]);export{p as default}; diff --git a/assets/home.html-IgXFm8EJ.js b/assets/home.html-IgXFm8EJ.js new file mode 100644 index 0000000..8b543ad --- /dev/null +++ b/assets/home.html-IgXFm8EJ.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-efb45d4c","path":"/en/guide/home.html","title":"Introduce","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Background","slug":"background","link":"#background","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]},{"level":2,"title":"Language Requirement","slug":"language-requirement","link":"#language-requirement","children":[]},{"level":2,"title":"Source of Inspiration","slug":"source-of-inspiration","link":"#source-of-inspiration","children":[]}],"git":{"updatedTime":1696445455000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"en/guide/home.md"}');export{e as data}; diff --git a/assets/home.html-MnXIMn-y.js b/assets/home.html-MnXIMn-y.js new file mode 100644 index 0000000..e89eda8 --- /dev/null +++ b/assets/home.html-MnXIMn-y.js @@ -0,0 +1 @@ +import{_ as e,o,c as i,a as c}from"./app-Un_zyw_U.js";const d={},t=c('

    文档介绍

    这里的文档将同步最新 API 版本的相关用法,请保持 YukiReflection 为最新版本以使用最新版本的功能。

    功能描述说明

    功能描述主要介绍当前 API 的相关用法和用途。

    功能示例说明

    功能示例主要展示了当前 API 的基本用法示例,可供参考。

    变更记录说明

    首个版本的功能将标记为 v<version> 添加

    后期新增加的功能将标记为 v<version> 新增

    后期修改的功能将被追加为 v<version> 修改

    后期被作废的功能将标记为 v<version> 作废 并会标注删除线;

    后期被删除的功能将标记为 v<version> 移除 并会标注删除线。

    相关符号说明

    • kt  Kotlin Static File

    • annotation  注解

    • interface  接口

    • object  类 (单例)

    • class  类

    • field  变量或 getset 方法或只读的 get 方法

    • method  方法

    • enum  Enum 常量

    • ext-field  扩展的变量 (全局)

    • ext-method  扩展的方法 (全局)

    • i-ext-field  扩展的变量 (调用域限制)

    • i-ext-method  扩展的方法 (调用域限制)

    ',14),l=[t];function a(p,r){return o(),i("div",null,l)}const h=e(d,[["render",a],["__file","home.html.vue"]]);export{h as default}; diff --git a/assets/home.html-Y4O_zhtP.js b/assets/home.html-Y4O_zhtP.js new file mode 100644 index 0000000..37728a4 --- /dev/null +++ b/assets/home.html-Y4O_zhtP.js @@ -0,0 +1,10 @@ +import{_ as c,r as n,o as i,c as d,b as e,d as l,e as s,w as a}from"./app-Un_zyw_U.js";const p={},u=e("h1",{id:"介绍",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#介绍","aria-hidden":"true"},"#"),l(" 介绍")],-1),h=e("blockquote",null,[e("p",null,[e("code",null,"YukiReflection"),l(" 是一个基于 Java 和 Android 平台的反射 API。")])],-1),A=e("h2",{id:"背景",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#背景","aria-hidden":"true"},"#"),l(" 背景")],-1),_=e("p",null,"这是一个使用 Kotlin 基于 Java 原生反射 API 重新打造的一套简洁、高效的反射 API。",-1),D=e("code",null,"YukiReflection",-1),y={href:"https://github.com/HighCapable/YukiHookAPI",target:"_blank",rel:"noopener noreferrer"},B={href:"https://www.bilibili.com/bangumi/play/ss5016",target:"_blank",rel:"noopener noreferrer"},C=e("h2",{id:"用途",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#用途","aria-hidden":"true"},"#"),l(" 用途")],-1),m=e("p",null,[e("code",null,"YukiReflection"),l(" 完全采用 Kotlin "),e("strong",null,"lambda"),l(" 语法构建。")],-1),b={href:"https://pdai.tech/md/java/basic/java-basic-x-reflection.html",target:"_blank",rel:"noopener noreferrer"},k=e("h2",{id:"语言要求",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#语言要求","aria-hidden":"true"},"#"),l(" 语言要求")],-1),f=e("p",null,[l("请使用 Kotlin,API 部分代码构成同样兼容 Java 但基础反射场景的实现"),e("strong",null,"可能完全无法使用"),l("。")],-1),F=e("p",null,[l("文档全部的 Demo 示例代码都将使用 Kotlin 进行描述,如果你完全不会使用 Kotlin 那你将有可能无法使用 "),e("code",null,"YukiReflection"),l("。")],-1),g=e("h2",{id:"灵感来源",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#灵感来源","aria-hidden":"true"},"#"),l(" 灵感来源")],-1),v=e("code",null,"YukiReflection",-1),x={href:"https://github.com/HighCapable/YukiHookAPI",target:"_blank",rel:"noopener noreferrer"},I=e("p",null,"现在,我们只需要编写少量的代码,就能实现一个简单的反射调用。",-1),P=e("p",null,[l("借助 Kotlin 优雅的 "),e("strong",null,"lambda"),l(" 写法以及 "),e("code",null,"YukiReflection"),l(",可以让你的反射逻辑更加美观清晰。")],-1),Y=e("blockquote",null,[e("p",null,"示例如下")],-1),R=e("div",{class:"language-kotlin line-numbers-mode","data-ext":"kt"},[e("pre",{class:"shiki github-dark-dimmed",style:{"background-color":"#22272e"},tabindex:"0"},[e("code",null,[e("span",{class:"line"},[e("span",{style:{color:"#96D0FF"}},'"android.os.SystemProperties"'),e("span",{style:{color:"#ADBAC7"}},"."),e("span",{style:{color:"#DCBDFB"}},"toClass"),e("span",{style:{color:"#ADBAC7"}},"()")]),l(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," ."),e("span",{style:{color:"#DCBDFB"}},"method"),e("span",{style:{color:"#ADBAC7"}}," {")]),l(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," name "),e("span",{style:{color:"#F47067"}},"="),e("span",{style:{color:"#ADBAC7"}}," "),e("span",{style:{color:"#96D0FF"}},'"get"')]),l(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," "),e("span",{style:{color:"#DCBDFB"}},"param"),e("span",{style:{color:"#ADBAC7"}},"(StringClass, StringClass)")]),l(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," }."),e("span",{style:{color:"#DCBDFB"}},"get"),e("span",{style:{color:"#ADBAC7"}},"()."),e("span",{style:{color:"#DCBDFB"}},"call"),e("span",{style:{color:"#ADBAC7"}},"("),e("span",{style:{color:"#96D0FF"}},'"ro.system.build.fingerprint"'),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#96D0FF"}},'"none"'),e("span",{style:{color:"#ADBAC7"}},")")]),l(` +`),e("span",{class:"line"})])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"})])],-1),H=e("div",{class:"language-kotlin line-numbers-mode","data-ext":"kt"},[e("pre",{class:"shiki github-dark-dimmed",style:{"background-color":"#22272e"},tabindex:"0"},[e("code",null,[e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}},"Class."),e("span",{style:{color:"#DCBDFB"}},"forName"),e("span",{style:{color:"#ADBAC7"}},"("),e("span",{style:{color:"#96D0FF"}},'"android.os.SystemProperties"'),e("span",{style:{color:"#ADBAC7"}},")")]),l(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," ."),e("span",{style:{color:"#DCBDFB"}},"getDeclaredMethod"),e("span",{style:{color:"#ADBAC7"}},"("),e("span",{style:{color:"#96D0FF"}},'"get"'),e("span",{style:{color:"#ADBAC7"}},", String::"),e("span",{style:{color:"#DCBDFB"}},"class"),e("span",{style:{color:"#ADBAC7"}},".java, String::"),e("span",{style:{color:"#DCBDFB"}},"class"),e("span",{style:{color:"#ADBAC7"}},".java)")]),l(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," ."),e("span",{style:{color:"#DCBDFB"}},"apply"),e("span",{style:{color:"#ADBAC7"}}," { isAccessible "),e("span",{style:{color:"#F47067"}},"="),e("span",{style:{color:"#ADBAC7"}}," "),e("span",{style:{color:"#6CB6FF"}},"true"),e("span",{style:{color:"#ADBAC7"}}," }")]),l(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," ."),e("span",{style:{color:"#DCBDFB"}},"invoke"),e("span",{style:{color:"#ADBAC7"}},"("),e("span",{style:{color:"#6CB6FF"}},"null"),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#96D0FF"}},'"ro.system.build.fingerprint"'),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#96D0FF"}},'"none"'),e("span",{style:{color:"#ADBAC7"}},")")]),l(` +`),e("span",{class:"line"})])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"})])],-1);function J(K,S){const o=n("ExternalLinkIcon"),t=n("CodeGroupItem"),r=n("CodeGroup");return i(),d("div",null,[u,h,A,_,e("p",null,[D,l(" 同时也是 "),e("a",y,[l("YukiHookAPI"),s(o)]),l(" 正在使用的核心功能。")]),e("p",null,[l("名称取自 "),e("a",B,[l("《ももくり》女主 栗原 雪(Yuki)"),s(o)]),l("。")]),C,m,e("p",null,[l("它能取代 "),e("a",b,[l("Java 原生的反射 API"),s(o)]),l(",使用更加人性化的语言实现一套更加完善的反射方案。")]),k,f,F,g,e("p",null,[v,l(" 最初是集成在 "),e("a",x,[l("YukiHookAPI"),s(o)]),l(" 项目中的核心功能,现在进行了解耦合,使得这套反射 API 可以在任何 Java 和 Android 平台的项目中使用。")]),I,P,Y,s(r,null,{default:a(()=>[s(t,{title:"Yuki Reflection"},{default:a(()=>[R]),_:1}),s(t,{title:"Java Reflection"},{default:a(()=>[H]),_:1})]),_:1})])}const j=c(p,[["render",J],["__file","home.html.vue"]]);export{j as default}; diff --git a/assets/home.html-eQwepd-K.js b/assets/home.html-eQwepd-K.js new file mode 100644 index 0000000..b8cef36 --- /dev/null +++ b/assets/home.html-eQwepd-K.js @@ -0,0 +1,10 @@ +import{_ as r,r as s,o as c,c as d,b as e,d as o,e as l,w as a}from"./app-Un_zyw_U.js";const u={},p=e("h1",{id:"introduce",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#introduce","aria-hidden":"true"},"#"),o(" Introduce")],-1),h=e("blockquote",null,[e("p",null,[e("code",null,"YukiReflection"),o(" is a Reflection API based on the Java and Android platform.")])],-1),m=e("h2",{id:"background",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#background","aria-hidden":"true"},"#"),o(" Background")],-1),y=e("p",null,"This is a set of simple and efficient Reflection API rebuilt based on Java native Reflection API using Kotlin.",-1),A=e("code",null,"YukiReflection",-1),_={href:"https://github.com/HighCapable/YukiHookAPI",target:"_blank",rel:"noopener noreferrer"},f={href:"https://www.bilibili.com/bangumi/play/ss5016",target:"_blank",rel:"noopener noreferrer"},D=e("h2",{id:"usage",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#usage","aria-hidden":"true"},"#"),o(" Usage")],-1),b=e("p",null,[e("code",null,"YukiReflection"),o(" is fully built with Kotlin "),e("strong",null,"lambda"),o(" syntax.")],-1),B={href:"https://www.oracle.com/technical-resources/articles/java/javareflection.html",target:"_blank",rel:"noopener noreferrer"},C=e("h2",{id:"language-requirement",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#language-requirement","aria-hidden":"true"},"#"),o(" Language Requirement")],-1),g=e("p",null,[o("Please use Kotlin, the code composition of the API part is also compatible with Java, but the implementation of the basic reflection scene "),e("strong",null,"may not be used at all"),o(".")],-1),k=e("p",null,[o("All Demo sample codes in the document will be described using Kotlin, if you don’t know how to use Kotlin at all, you may not be able to use "),e("code",null,"YukiReflection"),o(".")],-1),F=e("h2",{id:"source-of-inspiration",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#source-of-inspiration","aria-hidden":"true"},"#"),o(" Source of Inspiration")],-1),v=e("code",null,"YukiReflection",-1),w={href:"https://github.com/HighCapable/YukiHookAPI",target:"_blank",rel:"noopener noreferrer"},x=e("p",null,"Now, we only need to write a small amount of code to implement a simple reflection call.",-1),I=e("p",null,[o("With Kotlin elegant "),e("strong",null,"lambda"),o(" and "),e("code",null,"YukiReflection"),o(", you can make your reflection logic more beautiful and clear.")],-1),R=e("blockquote",null,[e("p",null,"The following example")],-1),P=e("div",{class:"language-kotlin line-numbers-mode","data-ext":"kt"},[e("pre",{class:"shiki github-dark-dimmed",style:{"background-color":"#22272e"},tabindex:"0"},[e("code",null,[e("span",{class:"line"},[e("span",{style:{color:"#96D0FF"}},'"android.os.SystemProperties"'),e("span",{style:{color:"#ADBAC7"}},"."),e("span",{style:{color:"#DCBDFB"}},"toClass"),e("span",{style:{color:"#ADBAC7"}},"()")]),o(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," ."),e("span",{style:{color:"#DCBDFB"}},"method"),e("span",{style:{color:"#ADBAC7"}}," {")]),o(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," name "),e("span",{style:{color:"#F47067"}},"="),e("span",{style:{color:"#ADBAC7"}}," "),e("span",{style:{color:"#96D0FF"}},'"get"')]),o(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," "),e("span",{style:{color:"#DCBDFB"}},"param"),e("span",{style:{color:"#ADBAC7"}},"(StringClass, StringClass)")]),o(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," }."),e("span",{style:{color:"#DCBDFB"}},"get"),e("span",{style:{color:"#ADBAC7"}},"()."),e("span",{style:{color:"#DCBDFB"}},"call"),e("span",{style:{color:"#ADBAC7"}},"("),e("span",{style:{color:"#96D0FF"}},'"ro.system.build.fingerprint"'),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#96D0FF"}},'"none"'),e("span",{style:{color:"#ADBAC7"}},")")]),o(` +`),e("span",{class:"line"})])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"})])],-1),Y=e("div",{class:"language-kotlin line-numbers-mode","data-ext":"kt"},[e("pre",{class:"shiki github-dark-dimmed",style:{"background-color":"#22272e"},tabindex:"0"},[e("code",null,[e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}},"Class."),e("span",{style:{color:"#DCBDFB"}},"forName"),e("span",{style:{color:"#ADBAC7"}},"("),e("span",{style:{color:"#96D0FF"}},'"android.os.SystemProperties"'),e("span",{style:{color:"#ADBAC7"}},")")]),o(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," ."),e("span",{style:{color:"#DCBDFB"}},"getDeclaredMethod"),e("span",{style:{color:"#ADBAC7"}},"("),e("span",{style:{color:"#96D0FF"}},'"get"'),e("span",{style:{color:"#ADBAC7"}},", String::"),e("span",{style:{color:"#DCBDFB"}},"class"),e("span",{style:{color:"#ADBAC7"}},".java, String::"),e("span",{style:{color:"#DCBDFB"}},"class"),e("span",{style:{color:"#ADBAC7"}},".java)")]),o(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," ."),e("span",{style:{color:"#DCBDFB"}},"apply"),e("span",{style:{color:"#ADBAC7"}}," { isAccessible "),e("span",{style:{color:"#F47067"}},"="),e("span",{style:{color:"#ADBAC7"}}," "),e("span",{style:{color:"#6CB6FF"}},"true"),e("span",{style:{color:"#ADBAC7"}}," }")]),o(` +`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}}," ."),e("span",{style:{color:"#DCBDFB"}},"invoke"),e("span",{style:{color:"#ADBAC7"}},"("),e("span",{style:{color:"#6CB6FF"}},"null"),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#96D0FF"}},'"ro.system.build.fingerprint"'),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#96D0FF"}},'"none"'),e("span",{style:{color:"#ADBAC7"}},")")]),o(` +`),e("span",{class:"line"})])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"})])],-1);function K(S,j){const n=s("ExternalLinkIcon"),t=s("CodeGroupItem"),i=s("CodeGroup");return c(),d("div",null,[p,h,m,y,e("p",null,[A,o(" is also the core functionality that "),e("a",_,[o("YukiHookAPI"),l(n)]),o(" is using.")]),e("p",null,[o("The name is taken from "),e("a",f,[o('"ももくり" heroine Yuki Kurihara'),l(n)]),o(".")]),D,b,e("p",null,[o("It can replace "),e("a",B,[o("Java's native Reflection API"),l(n)]),o(" and implement a more complete reflection solution in a more human-friendly language.")]),C,g,k,F,e("p",null,[v,o(" was originally the core function integrated in the "),e("a",w,[o("YukiHookAPI"),l(n)]),o(" project, and now it is decoupled so that this Reflection API can be used in any Java and Android platform project.")]),x,I,R,l(i,null,{default:a(()=>[l(t,{title:"Yuki Reflection"},{default:a(()=>[P]),_:1}),l(t,{title:"Java Reflection"},{default:a(()=>[Y]),_:1})]),_:1})])}const J=r(u,[["render",K],["__file","home.html.vue"]]);export{J as default}; diff --git a/assets/home.html-s4QryDyD.js b/assets/home.html-s4QryDyD.js new file mode 100644 index 0000000..9e6f7be --- /dev/null +++ b/assets/home.html-s4QryDyD.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-64fc7bb8","path":"/en/api/home.html","title":"Document Introduce","lang":"en-US","frontmatter":{"next":{"text":"Public API","link":"/en/api/public/com/highcapable/yukireflection/YukiReflection"}},"headers":[{"level":2,"title":"Function Description","slug":"function-description","link":"#function-description","children":[]},{"level":2,"title":"Function Example Description","slug":"function-example-description","link":"#function-example-description","children":[]},{"level":2,"title":"Change Record Description","slug":"change-record-description","link":"#change-record-description","children":[]},{"level":2,"title":"Related Symbols Description","slug":"related-symbols-description","link":"#related-symbols-description","children":[]}],"git":{"updatedTime":1674666410000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"en/api/home.md"}');export{e as data}; diff --git a/assets/index.html-OaTtftmv.js b/assets/index.html-OaTtftmv.js new file mode 100644 index 0000000..bf478ab --- /dev/null +++ b/assets/index.html-OaTtftmv.js @@ -0,0 +1 @@ +import{_ as e,o as c,c as t}from"./app-Un_zyw_U.js";const n={};function _(o,r){return c(),t("div")}const a=e(n,[["render",_],["__file","index.html.vue"]]);export{a as default}; diff --git a/assets/index.html-QcMSdla7.js b/assets/index.html-QcMSdla7.js new file mode 100644 index 0000000..1626bf6 --- /dev/null +++ b/assets/index.html-QcMSdla7.js @@ -0,0 +1,13 @@ +import{_ as s,o as n,c as a,a as l}from"./app-Un_zyw_U.js";const e={},o=l(`

    来吧!让反射也变得诗情画意

    public class World {
    +
    +    private void sayHello(String content) {
    +        System.out.println("Hello " + content + "!");
    +    }
    +}
    +
    val newWorld = World()
    +classOf<World>().method {
    +    name = "sayHello"
    +    param(StringClass)
    +    type = UnitType
    +}.get(newWorld).call("YukiReflection")
    +
    `,3),p=[o];function c(t,r){return n(),a("div",null,p)}const d=s(e,[["render",c],["__file","index.html.vue"]]);export{d as default}; diff --git a/assets/index.html-TK3hZBTT.js b/assets/index.html-TK3hZBTT.js new file mode 100644 index 0000000..ba5e4ff --- /dev/null +++ b/assets/index.html-TK3hZBTT.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-2d0a870d","path":"/en/","title":"Home","lang":"en-US","frontmatter":{"home":true,"title":"Home","heroImage":"/images/logo.png","actions":[{"text":"Get Started","link":"/en/guide/home","type":"primary"},{"text":"Changelog","link":"/en/about/changelog","type":"secondary"}],"features":[{"title":"Light and Elegant","details":"A powerful, elegant, beautiful API built with Kotlin lambda can help you quickly implement bytecode finding and reflection functions."},{"title":"Cross-Platform Available","details":"Not only the Android platform, it is highly compatible with the Java API and can be used on any Kotlin on JVM project, wherever Java is available."},{"title":"Quickly Started","details":"Simple and easy to use it now! Do not need complex configuration and full development experience, Integrate dependencies and enjoy yourself."}],"footer":"Apache-2.0 License | Copyright (C) 2019 HighCapable"},"headers":[{"level":3,"title":"Bring it on! Let reflection become poetic and picturesque","slug":"bring-it-on-let-reflection-become-poetic-and-picturesque","link":"#bring-it-on-let-reflection-become-poetic-and-picturesque","children":[]}],"git":{"updatedTime":1738723045000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"en/index.md"}');export{e as data}; diff --git a/assets/index.html-jSt2tOGZ.js b/assets/index.html-jSt2tOGZ.js new file mode 100644 index 0000000..6eec2c1 --- /dev/null +++ b/assets/index.html-jSt2tOGZ.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-8daa1a0e","path":"/","title":"","lang":"en-US","frontmatter":{"home":true,"navbar":false,"sidebar":false,"title":null,"heroAlt":null,"heroText":null,"tagline":"Select a language","actions":[{"text":"English","link":"/en/","type":"secondary"},{"text":"简体中文","link":"/zh-cn/","type":"secondary"}],"footer":"Apache-2.0 License | Copyright (C) 2019 HighCapable"},"headers":[],"git":{"updatedTime":1738723045000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":3}]},"filePathRelative":"index.md"}');export{e as data}; diff --git a/assets/index.html-pjzas0AJ.js b/assets/index.html-pjzas0AJ.js new file mode 100644 index 0000000..6d6ac29 --- /dev/null +++ b/assets/index.html-pjzas0AJ.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c0c85b84","path":"/zh-cn/","title":"首页","lang":"zh-CN","frontmatter":{"home":true,"title":"首页","heroImage":"/images/logo.png","actions":[{"text":"快速上手","link":"/zh-cn/guide/home","type":"primary"},{"text":"更新日志","link":"/zh-cn/about/changelog","type":"secondary"}],"features":[{"title":"轻量优雅","details":"拥有一套强大、优雅、人性化、完全使用 Kotlin lambda 打造的 API,可以帮你快速实现字节码的查找以及反射功能。"},{"title":"可跨平台","details":"不仅仅是 Android 平台,它与 Java API 高度兼容,可使用在任何 Kotlin on JVM 的项目上,有 Java 的地方就可以使用。"},{"title":"快速上手","details":"简单易用,不需要繁琐的配置,不需要十足的开发经验,搭建环境集成依赖即可立即开始使用。"}],"footer":"Apache-2.0 License | Copyright (C) 2019 HighCapable"},"headers":[{"level":3,"title":"来吧!让反射也变得诗情画意","slug":"来吧-让反射也变得诗情画意","link":"#来吧-让反射也变得诗情画意","children":[]}],"git":{"updatedTime":1738723045000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":4}]},"filePathRelative":"zh-cn/index.md"}');export{e as data}; diff --git a/assets/index.html-seflpP7l.js b/assets/index.html-seflpP7l.js new file mode 100644 index 0000000..17e925c --- /dev/null +++ b/assets/index.html-seflpP7l.js @@ -0,0 +1,13 @@ +import{_ as s,o as n,c as a,a as l}from"./app-Un_zyw_U.js";const e={},o=l(`

    Bring it on! Let reflection become poetic and picturesque

    public class World {
    +
    +    private void sayHello(String content) {
    +        System.out.println("Hello " + content + "!");
    +    }
    +}
    +
    val newWorld = World()
    +classOf<World>().method {
    +    name = "sayHello"
    +    param(StringClass)
    +    type = UnitType
    +}.get(newWorld).call("YukiReflection")
    +
    `,3),p=[o];function c(t,r){return n(),a("div",null,p)}const d=s(e,[["render",c],["__file","index.html.vue"]]);export{d as default}; diff --git a/assets/quick-start.html-EP-s2HU3.js b/assets/quick-start.html-EP-s2HU3.js new file mode 100644 index 0000000..8872b70 --- /dev/null +++ b/assets/quick-start.html-EP-s2HU3.js @@ -0,0 +1,52 @@ +import{_ as o,r as i,o as p,c,b as n,d as s,e,a as l}from"./app-Un_zyw_U.js";const r={},t=l('

    快速开始

    集成 YukiReflection 到你的项目中。

    环境要求

    • Windows 7 及以上/macOS 10.14 及以上/Linux 发行版 (Arch/Debian)

    • Android Studio 2021.1 及以上

    • IntelliJ IDEA 2021.1 及以上

    • Kotlin 1.7.0 及以上

    • Android Gradle Plugin 7.0 及以上

    • Gradle 7.0 及以上

    • Java 11 及以上

    • Java 17 及以上 (Since API 1.0.3)

    项目要求

    项目需要使用 Android StudioIntelliJ IDEA 创建且类型为 Java 或 Android 项目并已集成 Kotlin 环境依赖。

    集成依赖

    ',7),d={href:"https://github.com/HighCapable/SweetDependency",target:"_blank",rel:"noopener noreferrer"},u=l(`

    SweetDependency (推荐)

    在你的项目 SweetDependency 配置文件中添加存储库和依赖。

    示例如下

    repositories:
    +  # MavenCentral 有 2 小时缓存,若无法集成最新版本请添加
    +  sonatype-oss-releases:
    +
    +libraries:
    +  com.highcapable.yukireflection:
    +    api:
    +      version: +
    +  ...
    +

    添加完成后运行一次 Gradle Sync,所有依赖版本将自动装配。

    接下来,在你的项目 build.gradle.kts 中部署依赖。

    示例如下

    dependencies {
    +    implementation(com.highcapable.yukireflection.api)
    +    // ...
    +}
    +

    传统方式

    在你的项目 build.gradle.ktsbuild.gradle 中添加存储库。

    Kotlin DSL

    repositories {
    +    google()
    +    mavenCentral()
    +    // MavenCentral 有 2 小时缓存,若无法集成最新版本请添加此地址
    +    maven { url("https://s01.oss.sonatype.org/content/repositories/releases/") }
    +}
    +

    Groovy DSL

    repositories {
    +    google()
    +    mavenCentral()
    +    // MavenCentral 有 2 小时缓存,若无法集成最新版本请添加此地址
    +    maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
    +}
    +

    在你的项目 build.gradle.ktsbuild.gradle 中添加依赖。

    Kotlin DSL

    dependencies {
    +    implementation("com.highcapable.yukireflection:api:<yuki-version>")
    +    // ...
    +}
    +

    Groovy DSL

    dependencies {
    +    implementation 'com.highcapable.yukireflection:api:<yuki-version>'
    +    // ...
    +}
    +

    请将 <yuki-version> 修改为 这里 的最新版本。

    `,20),v={class:"custom-container danger"},A=n("p",{class:"custom-container-title"},"特别注意",-1),y={href:"https://github.com/HighCapable/YukiHookAPI",target:"_blank",rel:"noopener noreferrer"},b=n("strong",null,"YukiReflection",-1),m=n("strong",null,"YukiHookAPI",-1),D=n("strong",null,"YukiHookAPI",-1),h={href:"https://highcapable.github.io/YukiHookAPI/zh-cn/",target:"_blank",rel:"noopener noreferrer"},B=n("p",null,[n("strong",null,"YukiHookAPI"),s(" 将在 "),n("strong",null,"2.0.0"),s(" 版本完全分离 "),n("strong",null,"YukiReflection"),s(",届时你可以同时与 "),n("strong",null,"YukiHookAPI"),s(" 使用。")],-1),C=l(`

    配置 Java 版本

    在你的项目 build.gradle.ktsbuild.gradle 中修改 Kotlin 的 Java 版本为 17 及以上。

    Kotlin DSL

    android {
    +    compileOptions {
    +        sourceCompatibility = JavaVersion.VERSION_17
    +        targetCompatibility = JavaVersion.VERSION_17
    +    }
    +    kotlinOptions {
    +        jvmTarget = "17"
    +    }
    +}
    +

    Groovy DSL

    android {
    +    compileOptions {
    +        sourceCompatibility JavaVersion.VERSION_17
    +        targetCompatibility JavaVersion.VERSION_17
    +    }
    +    kotlinOptions {
    +        jvmTarget = '17'
    +    }
    +}
    +

    注意

    自 API 1.0.3 版本后 Kotlin 使用的 Java 版本默认为 17,不再支持 11 及以下版本。

    `,7);function k(g,_){const a=i("ExternalLinkIcon");return p(),c("div",null,[t,n("p",null,[s("我们推荐使用 Kotlin DSL 作为 Gradle 构建脚本语言并推荐使用 "),n("a",d,[s("SweetDependency"),e(a)]),s(" 来管理依赖。")]),u,n("div",v,[A,n("p",null,[s("如果你的项目目前正在使用 "),n("a",y,[s("YukiHookAPI"),e(a)]),s(" 的 1.x.x 版本,请不要重复集成 "),b,s(",因为 "),m,s(" 已经包含了其中的功能且存在针对相关功能的改动,重复集成会造成功能性冲突引发异常,此时你应该前往 "),D,s(" 的 "),n("a",h,[s("文档"),e(a)]),s(" 查看对应的使用教程。")]),B]),C])}const x=o(r,[["render",k],["__file","quick-start.html.vue"]]);export{x as default}; diff --git a/assets/quick-start.html-QOp7B8w8.js b/assets/quick-start.html-QOp7B8w8.js new file mode 100644 index 0000000..cb3502d --- /dev/null +++ b/assets/quick-start.html-QOp7B8w8.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-72889797","path":"/en/guide/quick-start.html","title":"Quick Start","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Environment Requirements","slug":"environment-requirements","link":"#environment-requirements","children":[]},{"level":2,"title":"Project Requirements","slug":"project-requirements","link":"#project-requirements","children":[]},{"level":2,"title":"Integration Dependencies","slug":"integration-dependencies","link":"#integration-dependencies","children":[]}],"git":{"updatedTime":1702861885000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":7}]},"filePathRelative":"en/guide/quick-start.md"}');export{e as data}; diff --git a/assets/quick-start.html-n1c0Zazn.js b/assets/quick-start.html-n1c0Zazn.js new file mode 100644 index 0000000..33fa712 --- /dev/null +++ b/assets/quick-start.html-n1c0Zazn.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-24840ff0","path":"/zh-cn/guide/quick-start.html","title":"快速开始","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"环境要求","slug":"环境要求","link":"#环境要求","children":[]},{"level":2,"title":"项目要求","slug":"项目要求","link":"#项目要求","children":[{"level":3,"title":"集成依赖","slug":"集成依赖","link":"#集成依赖","children":[]}]}],"git":{"updatedTime":1702861885000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":7}]},"filePathRelative":"zh-cn/guide/quick-start.md"}');export{e as data}; diff --git a/assets/quick-start.html-uujte6L-.js b/assets/quick-start.html-uujte6L-.js new file mode 100644 index 0000000..5756502 --- /dev/null +++ b/assets/quick-start.html-uujte6L-.js @@ -0,0 +1,53 @@ +import{_ as o,r as i,o as t,c as p,b as s,d as n,e as a,a as l}from"./app-Un_zyw_U.js";const r={},c=l('

    Quick Start

    Integrate YukiReflection into your project.

    Environment Requirements

    • Windows 7 and above / macOS 10.14 and above / Linux distributions (Arch/Debian)

    • Android Studio 2021.1 and above

    • IntelliJ IDEA 2021.1 and above

    • Kotlin 1.7.0 and above

    • Android Gradle Plugin 7.0 and above

    • Gradle 7.0 and above

    • Java 11 and above

    • Java 17 and above (Since API 1.0.3)

    Project Requirements

    The project needs to be created using Android Studio or IntelliJ IDEA and the type is an Java or Android project and the Kotlin environment dependency has been integrated.

    Integration Dependencies

    ',7),d={href:"https://github.com/HighCapable/SweetDependency",target:"_blank",rel:"noopener noreferrer"},u=l(`

    Add the repositories and dependencies in your project's SweetDependency configuration file.

    The following example

    repositories:
    +  # MavenCentral has a 2-hour cache,
    +  # if the latest version cannot be integrated, please add this
    +  sonatype-oss-releases:
    +
    +libraries:
    +  com.highcapable.yukireflection:
    +    api:
    +      version: +
    +  ...
    +

    After adding it, run Gradle Sync and all dependencies will be autowired.

    Next, deploy dependencies in your project build.gradle.kts.

    The following example

    dependencies {
    +    implementation(com.highcapable.yukireflection.api)
    +    // ...
    +}
    +

    Traditional Method

    Add repositories in your project build.gradle.kts or build.gradle.

    Kotlin DSL

    repositories {
    +    google()
    +    mavenCentral()
    +    // MavenCentral has a 2-hour cache, if the latest version cannot be integrated, please add this URL
    +    maven { url("https://s01.oss.sonatype.org/content/repositories/releases/") }
    +}
    +

    Groovy DSL

    repositories {
    +    google()
    +    mavenCentral()
    +    // MavenCentral has a 2-hour cache, if the latest version cannot be integrated, please add this URL
    +    maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
    +}
    +

    Add dependencies in your project build.gradle.kts or build.gradle.

    Kotlin DSL

    dependencies {
    +    implementation("com.highcapable.yukireflection:api:<yuki-version>")
    +    // ...
    +}
    +

    Groovy DSL

    dependencies {
    +    implementation 'com.highcapable.yukireflection:api:<yuki-version>'
    +    // ...
    +}
    +

    Please change <yuki-version> to the latest version here.

    `,20),v={class:"custom-container danger"},y=s("p",{class:"custom-container-title"},"Pay Attention",-1),b={href:"https://github.com/HighCapable/YukiHookAPI",target:"_blank",rel:"noopener noreferrer"},A=s("strong",null,"YukiReflection",-1),m=s("strong",null,"YukiHookAPI",-1),h=s("p",null,"Repeated integration will cause functional conflicts and cause exceptions.",-1),D={href:"https://highcapable.github.io/YukiHookAPI/zh-cn/",target:"_blank",rel:"noopener noreferrer"},g=s("strong",null,"YukiHookAPI",-1),B=s("p",null,[s("strong",null,"YukiHookAPI"),n(" will be completely separated from "),s("strong",null,"YukiReflection"),n(" in version "),s("strong",null,"2.0.0"),n(", by which time you can use it with "),s("strong",null,"YukiHookAPI"),n(" at the same time.")],-1),C=l(`

    Configure Java Version

    Modify the Java version of Kotlin in your project build.gradle.kts or build.gradle to 17 or above.

    Kotlin DSL

    android {
    +    compileOptions {
    +        sourceCompatibility = JavaVersion.VERSION_17
    +        targetCompatibility = JavaVersion.VERSION_17
    +    }
    +    kotlinOptions {
    +        jvmTarget = "17"
    +    }
    +}
    +

    Groovy DSL

    android {
    +    compileOptions {
    +        sourceCompatibility JavaVersion.VERSION_17
    +        targetCompatibility JavaVersion.VERSION_17
    +    }
    +    kotlinOptions {
    +        jvmTarget = '17'
    +    }
    +}
    +

    Notice

    Since API 1.0.3, the Java version used by Kotlin defaults to 17, and versions 11 and below are no longer supported.

    `,7);function k(f,_){const e=i("ExternalLinkIcon");return t(),p("div",null,[c,s("p",null,[n("We recommend using Kotlin DSL as the Gradle build script language and "),s("a",d,[n("SweetDependency"),a(e)]),n(" to manage dependencies.")]),u,s("div",v,[y,s("p",null,[n("If your project is currently using the 1.x.x version of "),s("a",b,[n("YukiHookAPI"),a(e)]),n(", please do not integrate "),A,n(" repeatedly, because "),m,n(" already includes it functions and there are changes to related functions.")]),h,s("p",null,[n("In this case, you should go to the "),s("a",D,[n("Documentation"),a(e)]),n(" of "),g,n(" view the corresponding usage tutorial.")]),B]),C])}const x=o(r,[["render",k],["__file","quick-start.html.vue"]]);export{x as default}; diff --git a/assets/style-HJevwQGJ.css b/assets/style-HJevwQGJ.css new file mode 100644 index 0000000..e5b146a --- /dev/null +++ b/assets/style-HJevwQGJ.css @@ -0,0 +1 @@ +:root{--back-to-top-z-index: 5;--back-to-top-color: #3eaf7c;--back-to-top-color-hover: #71cda3}.back-to-top{cursor:pointer;position:fixed;bottom:2rem;right:2.5rem;width:2rem;height:1.2rem;background-color:var(--back-to-top-color);-webkit-mask:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2049.484%2028.284'%3e%3cg%20transform='translate(-229%20-126.358)'%20fill='currentColor'%3e%3crect%20width='35'%20height='5'%20rx='2'%20transform='rotate(-45%20296.902%20-200.874)'/%3e%3crect%20width='35'%20height='5'%20rx='2'%20transform='rotate(-135%20169.502%2020.377)'/%3e%3c/g%3e%3c/svg%3e") no-repeat;mask:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2049.484%2028.284'%3e%3cg%20transform='translate(-229%20-126.358)'%20fill='currentColor'%3e%3crect%20width='35'%20height='5'%20rx='2'%20transform='rotate(-45%20296.902%20-200.874)'/%3e%3crect%20width='35'%20height='5'%20rx='2'%20transform='rotate(-135%20169.502%2020.377)'/%3e%3c/g%3e%3c/svg%3e") no-repeat;z-index:var(--back-to-top-z-index)}.back-to-top:hover{background-color:var(--back-to-top-color-hover)}@media (max-width: 959px){.back-to-top{display:none}}@media print{.back-to-top{display:none}}.back-to-top-enter-active,.back-to-top-leave-active{transition:opacity .3s}.back-to-top-enter-from,.back-to-top-leave-to{opacity:0}:root{--external-link-icon-color: #aaa}.external-link-icon{position:relative;display:inline-block;color:var(--external-link-icon-color);vertical-align:middle;top:-1px}@media print{.external-link-icon{display:none}}.external-link-icon-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}:root{--medium-zoom-z-index: 100;--medium-zoom-bg-color: #ffffff;--medium-zoom-opacity: 1}.medium-zoom-overlay{background-color:var(--medium-zoom-bg-color)!important;z-index:var(--medium-zoom-z-index)}.medium-zoom-overlay~img{z-index:calc(var(--medium-zoom-z-index) + 1)}.medium-zoom--opened .medium-zoom-overlay{opacity:var(--medium-zoom-opacity)}:root{--nprogress-color: #29d;--nprogress-z-index: 1031}#nprogress{pointer-events:none}#nprogress .bar{background:var(--nprogress-color);position:fixed;z-index:var(--nprogress-z-index);top:0;left:0;width:100%;height:2px}:root{--c-brand: #3eaf7c;--c-brand-light: #4abf8a;--c-bg: #ffffff;--c-bg-light: #f3f4f5;--c-bg-lighter: #eeeeee;--c-bg-dark: #ebebec;--c-bg-darker: #e6e6e6;--c-bg-navbar: var(--c-bg);--c-bg-sidebar: var(--c-bg);--c-bg-arrow: #cccccc;--c-text: #2c3e50;--c-text-accent: var(--c-brand);--c-text-light: #3a5169;--c-text-lighter: #4e6e8e;--c-text-lightest: #6a8bad;--c-text-quote: #999999;--c-border: #eaecef;--c-border-dark: #dfe2e5;--c-tip: #42b983;--c-tip-bg: var(--c-bg-light);--c-tip-title: var(--c-text);--c-tip-text: var(--c-text);--c-tip-text-accent: var(--c-text-accent);--c-warning: #ffc310;--c-warning-bg: #fffae3;--c-warning-bg-light: #fff3ba;--c-warning-bg-lighter: #fff0b0;--c-warning-border-dark: #f7dc91;--c-warning-details-bg: #fff5ca;--c-warning-title: #f1b300;--c-warning-text: #746000;--c-warning-text-accent: #edb100;--c-warning-text-light: #c1971c;--c-warning-text-quote: #ccab49;--c-danger: #f11e37;--c-danger-bg: #ffe0e0;--c-danger-bg-light: #ffcfde;--c-danger-bg-lighter: #ffc9c9;--c-danger-border-dark: #f1abab;--c-danger-details-bg: #ffd4d4;--c-danger-title: #ed1e2c;--c-danger-text: #660000;--c-danger-text-accent: #bd1a1a;--c-danger-text-light: #b5474d;--c-danger-text-quote: #c15b5b;--c-details-bg: #eeeeee;--c-badge-tip: var(--c-tip);--c-badge-warning: #ecc808;--c-badge-warning-text: var(--c-bg);--c-badge-danger: #dc2626;--c-badge-danger-text: var(--c-bg);--t-color: .3s ease;--t-transform: .3s ease;--code-bg-color: #282c34;--code-hl-bg-color: rgba(0, 0, 0, .66);--code-ln-color: #9e9e9e;--code-ln-wrapper-width: 3.5rem;--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;--font-family-code: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;--navbar-height: 3.6rem;--navbar-padding-v: .7rem;--navbar-padding-h: 1.5rem;--sidebar-width: 20rem;--sidebar-width-mobile: calc(var(--sidebar-width) * .82);--content-width: 740px;--homepage-width: 960px}.back-to-top{--back-to-top-color: var(--c-brand);--back-to-top-color-hover: var(--c-brand-light)}.DocSearch{--docsearch-primary-color: var(--c-brand);--docsearch-text-color: var(--c-text);--docsearch-highlight-color: var(--c-brand);--docsearch-muted-color: var(--c-text-quote);--docsearch-container-background: rgba(9, 10, 17, .8);--docsearch-modal-background: var(--c-bg-light);--docsearch-searchbox-background: var(--c-bg-lighter);--docsearch-searchbox-focus-background: var(--c-bg);--docsearch-searchbox-shadow: inset 0 0 0 2px var(--c-brand);--docsearch-hit-color: var(--c-text-light);--docsearch-hit-active-color: var(--c-bg);--docsearch-hit-background: var(--c-bg);--docsearch-hit-shadow: 0 1px 3px 0 var(--c-border-dark);--docsearch-footer-background: var(--c-bg)}.external-link-icon{--external-link-icon-color: var(--c-text-quote)}.medium-zoom-overlay{--medium-zoom-bg-color: var(--c-bg)}#nprogress{--nprogress-color: var(--c-brand)}.pwa-popup{--pwa-popup-text-color: var(--c-text);--pwa-popup-bg-color: var(--c-bg);--pwa-popup-border-color: var(--c-brand);--pwa-popup-shadow: 0 4px 16px var(--c-brand);--pwa-popup-btn-text-color: var(--c-bg);--pwa-popup-btn-bg-color: var(--c-brand);--pwa-popup-btn-hover-bg-color: var(--c-brand-light)}.search-box{--search-bg-color: var(--c-bg);--search-accent-color: var(--c-brand);--search-text-color: var(--c-text);--search-border-color: var(--c-border);--search-item-text-color: var(--c-text-lighter);--search-item-focus-bg-color: var(--c-bg-light)}html.dark{--c-brand: #3aa675;--c-brand-light: #349469;--c-bg: #22272e;--c-bg-light: #2b313a;--c-bg-lighter: #262c34;--c-bg-dark: #343b44;--c-bg-darker: #37404c;--c-text: #adbac7;--c-text-light: #96a7b7;--c-text-lighter: #8b9eb0;--c-text-lightest: #8094a8;--c-border: #3e4c5a;--c-border-dark: #34404c;--c-tip: #318a62;--c-warning: #e0ad15;--c-warning-bg: #2d2f2d;--c-warning-bg-light: #423e2a;--c-warning-bg-lighter: #44442f;--c-warning-border-dark: #957c35;--c-warning-details-bg: #39392d;--c-warning-title: #fdca31;--c-warning-text: #d8d96d;--c-warning-text-accent: #ffbf00;--c-warning-text-light: #ddb84b;--c-warning-text-quote: #ccab49;--c-danger: #fc1e38;--c-danger-bg: #39232c;--c-danger-bg-light: #4b2b35;--c-danger-bg-lighter: #553040;--c-danger-border-dark: #a25151;--c-danger-details-bg: #482936;--c-danger-title: #fc2d3b;--c-danger-text: #ea9ca0;--c-danger-text-accent: #fd3636;--c-danger-text-light: #d9777c;--c-danger-text-quote: #d56b6b;--c-details-bg: #323843;--c-badge-warning: var(--c-warning);--c-badge-warning-text: #3c2e05;--c-badge-danger: var(--c-danger);--c-badge-danger-text: #401416;--code-hl-bg-color: #363b46}html.dark .DocSearch{--docsearch-logo-color: var(--c-text);--docsearch-modal-shadow: inset 1px 1px 0 0 #2c2e40, 0 3px 8px 0 #000309;--docsearch-key-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d, 0 2px 2px 0 rgba(3, 4, 9, .3);--docsearch-key-gradient: linear-gradient(-225deg, #444950, #1c1e21);--docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, .5), 0 -4px 8px 0 rgba(0, 0, 0, .2)}html,body{padding:0;margin:0;background-color:var(--c-bg);transition:background-color var(--t-color)}html.dark{color-scheme:dark}html{font-size:16px}body{font-family:var(--font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1rem;color:var(--c-text)}a{font-weight:500;color:var(--c-text-accent);text-decoration:none;overflow-wrap:break-word}p a code{font-weight:400;color:var(--c-text-accent)}kbd{font-family:var(--font-family-code);color:var(--c-text);background:var(--c-bg-lighter);border:solid .15rem var(--c-border-dark);border-bottom:solid .25rem var(--c-border-dark);border-radius:.15rem;padding:0 .15em}code{font-family:var(--font-family-code);color:var(--c-text-lighter);padding:.25rem .5rem;margin:0;font-size:.85em;background-color:var(--c-bg-light);border-radius:3px;overflow-wrap:break-word;transition:background-color var(--t-color)}blockquote{font-size:1rem;color:var(--c-text-quote);border-left:.2rem solid var(--c-border-dark);margin:1rem 0;padding:.25rem 0 .25rem 1rem;overflow-wrap:break-word}blockquote>p{margin:0}ul,ol{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25;overflow-wrap:break-word}h1:focus-visible,h2:focus-visible,h3:focus-visible,h4:focus-visible,h5:focus-visible,h6:focus-visible{outline:none}h1:hover .header-anchor,h2:hover .header-anchor,h3:hover .header-anchor,h4:hover .header-anchor,h5:hover .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid var(--c-border);transition:border-color var(--t-color)}h3{font-size:1.35rem}h4{font-size:1.15rem}h5{font-size:1.05rem}h6{font-size:1rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;opacity:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media print{a.header-anchor{display:none}}a.header-anchor:hover{text-decoration:none}a.header-anchor:focus-visible{opacity:1}@media print{a[href^="http://"]:after,a[href^="https://"]:after{content:" (" attr(href) ") "}}p,ul,ol{line-height:1.7;overflow-wrap:break-word}hr{border:0;border-top:1px solid var(--c-border)}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto;transition:border-color var(--t-color)}tr{border-top:1px solid var(--c-border-dark);transition:border-color var(--t-color)}tr:nth-child(2n){background-color:var(--c-bg-light);transition:background-color var(--t-color)}tr:nth-child(2n) code{background-color:var(--c-bg-dark)}th,td{padding:.6em 1em;border:1px solid var(--c-border-dark);transition:border-color var(--t-color)}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:6px solid var(--c-bg-arrow)}.arrow.down{border-left:4px solid transparent;border-right:4px solid transparent;border-top:6px solid var(--c-bg-arrow)}.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:6px solid var(--c-bg-arrow)}.arrow.left{border-top:4px solid transparent;border-bottom:4px solid transparent;border-right:6px solid var(--c-bg-arrow)}.badge{display:inline-block;font-size:14px;font-weight:600;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:var(--c-bg);vertical-align:top;transition:color var(--t-color),background-color var(--t-color)}.badge.tip{background-color:var(--c-badge-tip)}.badge.warning{background-color:var(--c-badge-warning);color:var(--c-badge-warning-text)}.badge.danger{background-color:var(--c-badge-danger);color:var(--c-badge-danger-text)}.badge+.badge{margin-left:5px}code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:var(--font-family-code);font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#999}.token.punctuation{color:#ccc}.token.tag,.token.attr-name,.token.namespace,.token.deleted{color:#ec5975}.token.function-name{color:#6196cc}.token.boolean,.token.number,.token.function{color:#f08d49}.token.property,.token.class-name,.token.constant,.token.symbol{color:#f8c555}.token.selector,.token.important,.token.atrule,.token.keyword,.token.builtin{color:#cc99cd}.token.string,.token.char,.token.attr-value,.token.regex,.token.variable{color:#7ec699}.token.operator,.token.entity,.token.url{color:#67cdcc}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.375;padding:1.3rem 1.5rem;margin:.85rem 0;border-radius:6px;overflow:auto}.theme-default-content pre code,.theme-default-content pre[class*=language-] code{color:#fff;padding:0;background-color:transparent!important;border-radius:0;overflow-wrap:unset;-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.theme-default-content .line-number{font-family:var(--font-family-code)}div[class*=language-]{position:relative;background-color:var(--code-bg-color);border-radius:6px}div[class*=language-]:before{content:attr(data-ext);position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:var(--code-ln-color)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent!important;position:relative;z-index:1}div[class*=language-] .highlight-lines{-webkit-user-select:none;-moz-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.375}div[class*=language-] .highlight-lines .highlight-line{background-color:var(--code-hl-bg-color)}div[class*=language-]:not(.line-numbers-mode) .line-numbers{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlight-line{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlight-line:before{content:" ";position:absolute;z-index:2;left:0;top:0;display:block;width:var(--code-ln-wrapper-width);height:100%}div[class*=language-].line-numbers-mode pre{margin-left:var(--code-ln-wrapper-width);padding-left:1rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers{position:absolute;top:0;width:var(--code-ln-wrapper-width);text-align:center;color:var(--code-ln-color);padding-top:1.25rem;line-height:1.375;counter-reset:line-number}div[class*=language-].line-numbers-mode .line-numbers .line-number{position:relative;z-index:3;-webkit-user-select:none;-moz-user-select:none;user-select:none;height:1.375em}div[class*=language-].line-numbers-mode .line-numbers .line-number:before{counter-increment:line-number;content:counter(line-number);font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;top:0;left:0;width:var(--code-ln-wrapper-width);height:100%;border-radius:6px 0 0 6px;border-right:1px solid var(--code-hl-bg-color)}@media (max-width: 419px){.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}.code-group__nav{margin-top:.85rem;margin-bottom:calc(-1.7rem - 6px);padding-bottom:calc(1.7rem - 6px);padding-left:10px;padding-top:10px;border-top-left-radius:6px;border-top-right-radius:6px;background-color:var(--code-bg-color)}.code-group__ul{margin:auto 0;padding-left:0;display:inline-flex;list-style:none}.code-group__nav-tab{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:#ffffffe6;font-weight:600}.code-group__nav-tab:focus{outline:none}.code-group__nav-tab:focus-visible{outline:1px solid rgba(255,255,255,.9)}.code-group__nav-tab-active{border-bottom:var(--c-brand) 1px solid}@media (max-width: 419px){.code-group__nav{margin-left:-1.5rem;margin-right:-1.5rem;border-radius:0}}.code-group-item{display:none}.code-group-item__active{display:block}.code-group-item>pre{background-color:orange}.custom-container{transition:color var(--t-color),border-color var(--t-color),background-color var(--t-color)}.custom-container .custom-container-title{font-weight:600}.custom-container .custom-container-title:not(:only-child){margin-bottom:-.4rem}.custom-container.tip,.custom-container.warning,.custom-container.danger{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-container.tip{border-color:var(--c-tip);background-color:var(--c-tip-bg);color:var(--c-tip-text)}.custom-container.tip .custom-container-title{color:var(--c-tip-title)}.custom-container.tip a{color:var(--c-tip-text-accent)}.custom-container.tip code{background-color:var(--c-bg-dark)}.custom-container.warning{border-color:var(--c-warning);background-color:var(--c-warning-bg);color:var(--c-warning-text)}.custom-container.warning .custom-container-title{color:var(--c-warning-title)}.custom-container.warning a{color:var(--c-warning-text-accent)}.custom-container.warning blockquote{border-left-color:var(--c-warning-border-dark);color:var(--c-warning-text-quote)}.custom-container.warning code{color:var(--c-warning-text-light);background-color:var(--c-warning-bg-light)}.custom-container.warning details{background-color:var(--c-warning-details-bg)}.custom-container.warning details code{background-color:var(--c-warning-bg-lighter)}.custom-container.warning .external-link-icon{--external-link-icon-color: var(--c-warning-text-quote)}.custom-container.danger{border-color:var(--c-danger);background-color:var(--c-danger-bg);color:var(--c-danger-text)}.custom-container.danger .custom-container-title{color:var(--c-danger-title)}.custom-container.danger a{color:var(--c-danger-text-accent)}.custom-container.danger blockquote{border-left-color:var(--c-danger-border-dark);color:var(--c-danger-text-quote)}.custom-container.danger code{color:var(--c-danger-text-light);background-color:var(--c-danger-bg-light)}.custom-container.danger details{background-color:var(--c-danger-details-bg)}.custom-container.danger details code{background-color:var(--c-danger-bg-lighter)}.custom-container.danger .external-link-icon{--external-link-icon-color: var(--c-danger-text-quote)}.custom-container.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:var(--c-details-bg)}.custom-container.details code{background-color:var(--c-bg-darker)}.custom-container.details h4{margin-top:0}.custom-container.details figure:last-child,.custom-container.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-container.details summary{outline:none;cursor:pointer}.home{padding:var(--navbar-height) 2rem 0;max-width:var(--homepage-width);margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero h1,.home .hero .description,.home .hero .actions{margin:1.8rem auto}.home .hero .actions{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:var(--c-text-lightest)}.home .hero .action-button{display:inline-block;font-size:1.2rem;padding:.8rem 1.6rem;border-width:2px;border-style:solid;border-radius:4px;transition:background-color var(--t-color);box-sizing:border-box}.home .hero .action-button.primary{color:var(--c-bg);background-color:var(--c-brand);border-color:var(--c-brand)}.home .hero .action-button.primary:hover{background-color:var(--c-brand-light)}.home .hero .action-button.secondary{color:var(--c-brand);background-color:var(--c-bg);border-color:var(--c-brand)}.home .hero .action-button.secondary:hover{color:var(--c-bg);background-color:var(--c-brand-light)}.home .features{border-top:1px solid var(--c-border);transition:border-color var(--t-color);padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:var(--c-text-light)}.home .feature p{color:var(--c-text-lighter)}.home .theme-default-content{padding:0;margin:0}.home .footer{padding:2.5rem;border-top:1px solid var(--c-border);text-align:center;color:var(--c-text-lighter);transition:border-color var(--t-color)}@media (max-width: 719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width: 419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero h1,.home .hero .description,.home .hero .actions{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.page{padding-top:var(--navbar-height);padding-left:var(--sidebar-width)}.navbar{position:fixed;z-index:20;top:0;left:0;right:0;height:var(--navbar-height);box-sizing:border-box;border-bottom:1px solid var(--c-border);background-color:var(--c-bg-navbar);transition:background-color var(--t-color),border-color var(--t-color)}.sidebar{font-size:16px;width:var(--sidebar-width);position:fixed;z-index:10;margin:0;top:var(--navbar-height);left:0;bottom:0;box-sizing:border-box;border-right:1px solid var(--c-border);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--c-brand) var(--c-border);background-color:var(--c-bg-sidebar);transition:transform var(--t-transform),background-color var(--t-color),border-color var(--t-color)}.sidebar::-webkit-scrollbar{width:7px}.sidebar::-webkit-scrollbar-track{background-color:var(--c-border)}.sidebar::-webkit-scrollbar-thumb{background-color:var(--c-brand)}.sidebar-mask{position:fixed;z-index:9;top:0;left:0;width:100vw;height:100vh;display:none}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(1){transform:rotate(45deg) translate3d(5.5px,5.5px,0)}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(2){transform:scale3d(0,1,1)}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(3){transform:rotate(-45deg) translate3d(6px,-6px,0)}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(1),.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(3){transform-origin:center}.theme-container.no-navbar .theme-default-content h1,.theme-container.no-navbar .theme-default-content h2,.theme-container.no-navbar .theme-default-content h3,.theme-container.no-navbar .theme-default-content h4,.theme-container.no-navbar .theme-default-content h5,.theme-container.no-navbar .theme-default-content h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .page{padding-top:0}.theme-container.no-navbar .sidebar{top:0}.theme-container.no-sidebar .sidebar{display:none}@media (max-width: 719px){.theme-container.no-sidebar .sidebar{display:block}}.theme-container.no-sidebar .page{padding-left:0}.theme-default-content a:hover{text-decoration:underline}.theme-default-content img{max-width:100%}.theme-default-content h1,.theme-default-content h2,.theme-default-content h3,.theme-default-content h4,.theme-default-content h5,.theme-default-content h6{margin-top:calc(.5rem - var(--navbar-height));padding-top:calc(1rem + var(--navbar-height));margin-bottom:0}.theme-default-content h1:first-child,.theme-default-content h2:first-child,.theme-default-content h3:first-child,.theme-default-content h4:first-child,.theme-default-content h5:first-child,.theme-default-content h6:first-child{margin-bottom:1rem}.theme-default-content h1:first-child+p,.theme-default-content h1:first-child+pre,.theme-default-content h1:first-child+.custom-container,.theme-default-content h2:first-child+p,.theme-default-content h2:first-child+pre,.theme-default-content h2:first-child+.custom-container,.theme-default-content h3:first-child+p,.theme-default-content h3:first-child+pre,.theme-default-content h3:first-child+.custom-container,.theme-default-content h4:first-child+p,.theme-default-content h4:first-child+pre,.theme-default-content h4:first-child+.custom-container,.theme-default-content h5:first-child+p,.theme-default-content h5:first-child+pre,.theme-default-content h5:first-child+.custom-container,.theme-default-content h6:first-child+p,.theme-default-content h6:first-child+pre,.theme-default-content h6:first-child+.custom-container{margin-top:2rem}@media (max-width: 959px){.sidebar{font-size:15px;width:var(--sidebar-width-mobile)}.page{padding-left:var(--sidebar-width-mobile)}}@media (max-width: 719px){.sidebar{top:0;padding-top:var(--navbar-height);transform:translate(-100%)}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translate(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width: 419px){h1{font-size:1.9rem}}.navbar{--navbar-line-height: calc( var(--navbar-height) - 2 * var(--navbar-padding-v) );padding:var(--navbar-padding-v) var(--navbar-padding-h);line-height:var(--navbar-line-height)}.navbar .logo{height:var(--navbar-line-height);margin-right:var(--navbar-padding-v);vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:var(--c-text);position:relative}.navbar .navbar-items-wrapper{display:flex;position:absolute;box-sizing:border-box;top:var(--navbar-padding-v);right:var(--navbar-padding-h);height:var(--navbar-line-height);padding-left:var(--navbar-padding-h);white-space:nowrap;font-size:.9rem}.navbar .navbar-items-wrapper .search-box{flex:0 0 auto;vertical-align:top}@media screen and (max-width: 719px){.navbar{padding-left:4rem}.navbar .site-name{display:block;width:calc(100vw - 11rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.navbar .can-hide{display:none}}.navbar-items{display:inline-block}@media print{.navbar-items{display:none}}.navbar-items a{display:inline-block;line-height:1.4rem;color:inherit}.navbar-items a:hover,.navbar-items a.router-link-active{color:var(--c-text)}.navbar-items .navbar-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:var(--navbar-line-height)}.navbar-items .navbar-item:first-child{margin-left:0}.navbar-items .navbar-item>a:hover,.navbar-items .navbar-item>a.router-link-active{margin-bottom:-2px;border-bottom:2px solid var(--c-text-accent)}@media (max-width: 719px){.navbar-items .navbar-item{margin-left:0}.navbar-items .navbar-item>a:hover,.navbar-items .navbar-item>a.router-link-active{margin-bottom:0;border-bottom:none}.navbar-items a:hover,.navbar-items a.router-link-active{color:var(--c-text-accent)}}.toggle-sidebar-button{position:absolute;top:.6rem;left:1rem;display:none;padding:.6rem;cursor:pointer}.toggle-sidebar-button .icon{display:flex;flex-direction:column;justify-content:center;align-items:center;width:1.25rem;height:1.25rem;cursor:inherit}.toggle-sidebar-button .icon span{display:inline-block;width:100%;height:2px;border-radius:2px;background-color:var(--c-text);transition:transform var(--t-transform)}.toggle-sidebar-button .icon span:nth-child(2){margin:6px 0}@media screen and (max-width: 719px){.toggle-sidebar-button{display:block}}.toggle-color-mode-button{display:flex;margin:auto;margin-left:1rem;border:0;background:none;color:var(--c-text);opacity:.8;cursor:pointer}@media print{.toggle-color-mode-button{display:none}}.toggle-color-mode-button:hover{opacity:1}.toggle-color-mode-button .icon{width:1.25rem;height:1.25rem}.DocSearch{transition:background-color var(--t-color)}.navbar-dropdown-wrapper{cursor:pointer}.navbar-dropdown-wrapper .navbar-dropdown-title,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:var(--c-text)}.navbar-dropdown-wrapper .navbar-dropdown-title:hover,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile:hover{border-color:transparent}.navbar-dropdown-wrapper .navbar-dropdown-title .arrow,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.navbar-dropdown-wrapper .navbar-dropdown-title-mobile{display:none;font-weight:600;font-size:inherit}.navbar-dropdown-wrapper .navbar-dropdown-title-mobile:hover{color:var(--c-text-accent)}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item{color:inherit;line-height:1.7rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle{margin:.45rem 0 0;border-top:1px solid var(--c-border);padding:1rem 0 .45rem;font-size:.9rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle>span{padding:0 1.5rem 0 1.25rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle>a{font-weight:inherit}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle>a.router-link-active:after{display:none}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subitem-wrapper{padding:0;list-style:none}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subitem-wrapper .navbar-dropdown-subitem{font-size:.9em}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a:hover,.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a.router-link-active{color:var(--c-text-accent)}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid var(--c-text-accent);border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item:first-child .navbar-dropdown-subtitle{margin-top:0;padding-top:0;border-top:0}.navbar-dropdown-wrapper.mobile.open .navbar-dropdown-title,.navbar-dropdown-wrapper.mobile.open .navbar-dropdown-title-mobile{margin-bottom:.5rem}.navbar-dropdown-wrapper.mobile .navbar-dropdown-title,.navbar-dropdown-wrapper.mobile .navbar-dropdown-title-mobile{display:none}.navbar-dropdown-wrapper.mobile .navbar-dropdown-title-mobile{display:block}.navbar-dropdown-wrapper.mobile .navbar-dropdown{transition:height .1s ease-out;overflow:hidden}.navbar-dropdown-wrapper.mobile .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle{border-top:0;margin-top:0;padding-top:0;padding-bottom:0}.navbar-dropdown-wrapper.mobile .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle,.navbar-dropdown-wrapper.mobile .navbar-dropdown .navbar-dropdown-item>a{font-size:15px;line-height:2rem}.navbar-dropdown-wrapper.mobile .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subitem{font-size:14px;padding-left:1rem}.navbar-dropdown-wrapper:not(.mobile){height:1.8rem}.navbar-dropdown-wrapper:not(.mobile):hover .navbar-dropdown,.navbar-dropdown-wrapper:not(.mobile).open .navbar-dropdown{display:block!important}.navbar-dropdown-wrapper:not(.mobile).open:blur{display:none}.navbar-dropdown-wrapper:not(.mobile) .navbar-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:var(--c-bg-navbar);padding:.6rem 0;border:1px solid var(--c-border);border-bottom-color:var(--c-border-dark);text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}.page{padding-bottom:2rem;display:block}.page .theme-default-content{max-width:var(--content-width);margin:0 auto;padding:2rem 2.5rem;padding-top:0}@media (max-width: 959px){.page .theme-default-content{padding:2rem}}@media (max-width: 419px){.page .theme-default-content{padding:1.5rem}}.page-meta{max-width:var(--content-width);margin:0 auto;padding:1rem 2.5rem;overflow:auto}@media (max-width: 959px){.page-meta{padding:2rem}}@media (max-width: 419px){.page-meta{padding:1.5rem}}.page-meta .meta-item{cursor:default;margin-top:.8rem}.page-meta .meta-item .meta-item-label{font-weight:500;color:var(--c-text-lighter)}.page-meta .meta-item .meta-item-info{font-weight:400;color:var(--c-text-quote)}.page-meta .edit-link{display:inline-block;margin-right:.25rem}@media print{.page-meta .edit-link{display:none}}.page-meta .last-updated{float:right}@media (max-width: 719px){.page-meta .last-updated{font-size:.8em;float:none}.page-meta .contributors{font-size:.8em}}.page-nav{max-width:var(--content-width);margin:0 auto;padding:1rem 2.5rem 2rem;padding-bottom:0}@media (max-width: 959px){.page-nav{padding:2rem}}@media (max-width: 419px){.page-nav{padding:1.5rem}}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid var(--c-border);transition:border-color var(--t-color);padding-top:1rem;overflow:auto}.page-nav .prev a:before{content:"←"}.page-nav .next{float:right}.page-nav .next a:after{content:"→"}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .navbar-items{display:none;border-bottom:1px solid var(--c-border);transition:border-color var(--t-color);padding:.5rem 0 .75rem}.sidebar .navbar-items a{font-weight:600}.sidebar .navbar-items .navbar-item{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar .sidebar-items{padding:1.5rem 0}@media (max-width: 719px){.sidebar .navbar-items{display:block}.sidebar .navbar-items .navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar .sidebar-items{padding:1rem 0}}.sidebar-item{cursor:default;border-left:.25rem solid transparent;color:var(--c-text)}.sidebar-item:focus-visible{outline-width:1px;outline-offset:-1px}.sidebar-item.active:not(p.sidebar-heading){font-weight:600;color:var(--c-text-accent);border-left-color:var(--c-text-accent)}.sidebar-item.sidebar-heading{transition:color .15s ease;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0}.sidebar-item.sidebar-heading+.sidebar-item-children{transition:height .1s ease-out;overflow:hidden;margin-bottom:.75rem}.sidebar-item.collapsible{cursor:pointer}.sidebar-item.collapsible .arrow{position:relative;top:-.12em;left:.5em}.sidebar-item:not(.sidebar-heading){font-size:1em;font-weight:400;display:inline-block;margin:0;padding:.35rem 1rem .35rem 2rem;line-height:1.4;width:100%;box-sizing:border-box}.sidebar-item:not(.sidebar-heading)+.sidebar-item-children{padding-left:1rem;font-size:.95em}.sidebar-item-children .sidebar-item-children .sidebar-item:not(.sidebar-heading){padding:.25rem 1rem .25rem 1.75rem}.sidebar-item-children .sidebar-item-children .sidebar-item:not(.sidebar-heading).active{font-weight:500;border-left-color:transparent}a.sidebar-heading+.sidebar-item-children .sidebar-item:not(.sidebar-heading).active{border-left-color:transparent}a.sidebar-item{cursor:pointer}a.sidebar-item:hover{color:var(--c-text-accent)}.table-of-contents .badge{vertical-align:middle}.dropdown-enter-from,.dropdown-leave-to{height:0!important}.fade-slide-y-enter-active{transition:all .2s ease}.fade-slide-y-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)}.fade-slide-y-enter-from,.fade-slide-y-leave-to{transform:translateY(10px);opacity:0}:root{--c-brand: rgb(49, 164, 255);--c-brand-light: rgb(129, 189, 249);--content-width: 965px}code{padding:3px 5px;border-radius:5px}.badge{margin-bottom:5px}.custom-container{border-radius:5px}.sidebar-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.language-text ::-webkit-scrollbar-track{background:#56606e;border-radius:50px}.language-text ::-webkit-scrollbar-thumb:hover{background:#79879b}.language-kotlin ::-webkit-scrollbar-track{background:#56606e;border-radius:50px}.language-kotlin ::-webkit-scrollbar-thumb:hover{background:#79879b}.language-java ::-webkit-scrollbar-track{background:#56606e;border-radius:50px}.language-java ::-webkit-scrollbar-thumb:hover{background:#79879b}.language-groovy ::-webkit-scrollbar-track{background:#56606e;border-radius:50px}.language-groovy ::-webkit-scrollbar-thumb:hover{background:#79879b}.language-xml ::-webkit-scrollbar-track{background:#56606e;border-radius:50px}.language-xml ::-webkit-scrollbar-thumb:hover{background:#79879b}.hidden-anchor-page h6{color:transparent;margin-bottom:-35px;padding-top:50px}.code-page h1{font-size:24pt}.code-page h2{font-size:18pt}.code-page h3{font-size:15pt}.code-page h4{font-size:12pt}.code-page h5{font-size:9.6pt}.code-page h6{font-size:8.4pt}.code-page .symbol{color:#8e9ba8}.code-page .deprecated{color:#8e9ba8;text-decoration:line-through}html{scroll-behavior:smooth}html ::-webkit-scrollbar{width:8px;height:6.5px}html ::-webkit-scrollbar-track{background:#eaecef}html ::-webkit-scrollbar-thumb{background:#bdbdbd;border-radius:50px}html ::-webkit-scrollbar-thumb:hover{background:#858585;border-radius:50px}html.dark{--c-brand: rgb(49, 164, 255);--c-brand-light: rgb(129, 189, 249);--content-width: 965px}html.dark ::-webkit-scrollbar{width:8px;height:6.5px}html.dark ::-webkit-scrollbar-track{background:#292e35}html.dark ::-webkit-scrollbar-thumb{background:#414853;border-radius:50px}html.dark ::-webkit-scrollbar-thumb:hover{background:#383e48;border-radius:50px}:root{--search-bg-color: #ffffff;--search-accent-color: #3eaf7c;--search-text-color: #2c3e50;--search-border-color: #eaecef;--search-item-text-color: #5d81a5;--search-item-focus-bg-color: #f3f4f5;--search-input-width: 8rem;--search-result-width: 20rem}.search-box{display:inline-block;position:relative;margin-left:1rem}@media print{.search-box{display:none}}.search-box input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:text;width:var(--search-input-width);height:2rem;color:var(--search-text-color);display:inline-block;border:1px solid var(--search-border-color);border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;transition:all ease .3s;background:var(--search-bg-color) url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='13'%3e%3cg%20stroke-width='2'%20stroke='%23aaa'%20fill='none'%3e%3cpath%20d='M11.29%2011.71l-4-4'/%3e%3ccircle%20cx='5'%20cy='5'%20r='4'/%3e%3c/g%3e%3c/svg%3e") .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:var(--search-accent-color)}.search-box .suggestions{background:var(--search-bg-color);width:var(--search-result-width);position:absolute;top:2rem;right:0;border:1px solid var(--search-border-color);border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion.focus{background-color:var(--search-item-focus-bg-color)}.search-box .suggestion.focus a{color:var(--search-accent-color)}.search-box .suggestion a{white-space:normal;color:var(--search-item-text-color)}.search-box .suggestion .page-title{font-weight:600}.search-box .suggestion .page-header{font-size:.9em;margin-left:.25em}@media (max-width: 719px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (max-width: 419px){.search-box input:focus{width:8rem}.search-box .suggestions{width:calc(100vw - 4rem);right:-.5rem}}.deprecated-banner[data-v-25c96c98]{position:fixed;top:0;left:0;width:100%;background-color:#fdd;color:#a00000;text-align:center;padding:12px 24px;font-weight:700;font-size:16px;z-index:9999}.deprecated-banner a[data-v-25c96c98]{color:#a00000;text-decoration:underline;font-weight:700}.deprecated-banner a[data-v-25c96c98]:hover{color:#600000} diff --git a/en/about/about.html b/en/about/about.html new file mode 100644 index 0000000..ac8ef0b --- /dev/null +++ b/en/about/about.html @@ -0,0 +1,49 @@ + + + + + + + + + About This Document | Yuki Reflection + + + + + +

    About This Document

    This document is powered by VuePressopen in new window.

    License

    Apache-2.0open in new window

    Apache License Version 2.0
    +
    +Copyright (C) 2019 HighCapable
    +
    +Licensed under the Apache License, Version 2.0 (the "License");
    +you may not use this file except in compliance with the License.
    +You may obtain a copy of the License at
    +
    +    https://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing, software
    +distributed under the License is distributed on an "AS IS" BASIS,
    +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +See the License for the specific language governing permissions and
    +limitations under the License.
    +

    Copyright © 2019 HighCapable

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/about/changelog.html b/en/about/changelog.html new file mode 100644 index 0000000..f1a3561 --- /dev/null +++ b/en/about/changelog.html @@ -0,0 +1,34 @@ + + + + + + + + + Changelog | Yuki Reflection + + + + + +

    Changelog

    The version update history of YukiReflection is recorded here.

    Pay Attention

    We will only maintain the latest API version, if you are using an outdate API version, you voluntarily renounce any possibility of maintenance.

    Notice

    To avoid translation time consumption, Changelog will use Google Translation from Chinese to English, please refer to the original text for actual reference.

    Time zone of version release date: UTC+8

    1.0.3 | 2023.10.07  latest

    • The license agreement has been changed from MIT to Apache-2.0, subsequent versions will be distributed under this license agreement, you should change the relevant license agreement after using this version
    • Change the type of dependency library from Android Library (aar) back to Java Library (jar)
    • Adapt and support the native Java platform (some functions are only available on the Android platform)
    • Fixed fix get interfaces of classopen in new window issue and merged into YukiReflection
    • Deprecated isAllowPrintingLogs, please start using the debugLog method
    • Added YukiReflection.TAG
    • Obsolete YukiReflection.API_VERSION_NAME, YukiReflection.API_VERSION_CODE, merged into YukiReflection.VERSION
    • Refactored remendy functionality in find methods, which now prints exceptions in steps
    • The multi-method find result type is changed from HashSet to MutableList
    • Added method(), constructor(), field() to directly obtain all object functions in the class
    • constructor() no longer behaves like constructor { emptyParam() }
    • Added lazyClass and lazyClassOrNull methods to lazily load Class

    1.0.2 | 2023.04.25  stale

    • Fixed a critical issue where the Member cache did not take effect and persistent storage eventually caused app out of memory (OOM), thanks to Art-Chenopen in new window
    • Remove the direct cache function of Member and deprecated YukiReflection.Configs.isEnableMemberCache, keep the cache function of Class
    • Modified finder to Sequence, optimize the finding speed and performance of Member

    1.0.1 | 2023.04.16  stale

    • Change the type of dependency library from Java Library (jar) to Android Library (aar)
    • Removed wrong Class object declaration in Android type

    1.0.0 | 2023.01.26  stale

    • The first version is submitted to Maven
    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/about/contacts.html b/en/about/contacts.html new file mode 100644 index 0000000..edb9055 --- /dev/null +++ b/en/about/contacts.html @@ -0,0 +1,34 @@ + + + + + + + + + Contact Us | Yuki Reflection + + + + + +

    Contact Us

    If you have any questions in use, or have any constructive suggestions, you can contact us.

    Join our developers group.

    Find me on Twitter @fankesyooniopen in new window.

    Help with Maintenance

    Thank you for choosing and using YukiReflection.

    If you have code-related suggestions and requests, you can submit a Pull Request on GitHub.

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/about/future.html b/en/about/future.html new file mode 100644 index 0000000..293c49b --- /dev/null +++ b/en/about/future.html @@ -0,0 +1,135 @@ + + + + + + + + + Looking for Future | Yuki Reflection + + + + + +

    Looking for Future

    The future is bright and uncertain, let us look forward to the future development space of YukiReflection.

    Future Plans

    Features that YukiReflection may add later are included here.

    Automatically Generate Reflection Code

    Use stub to create a Kotlin class, and declare the parameters in it, as well as its different states in each version.

    For example, the Java class below is the target class we need to reflect.

    The following example

    package com.example.test;
    +
    +public class MyClass {
    +    
    +    private String myField = "test";
    +
    +    public MyClass() {
    +        //...
    +    }
    +
    +    private String myMethod1(String var1, int var2) {
    +        //...
    +    }
    +
    +    private void myMethod2() {
    +        //...
    +    }
    +
    +    private void myMethod3(String var1) {
    +        //...
    +    }
    +}
    +

    Through the existing usage of the current API, this class can be called reflectively in the following way.

    The following example

    classOf<MyClass>().buildOf().current {
    +    // Call myField
    +    val value = field { name = "myField" }.string()
    +    // Call myMethod1
    +    val methodValue = method { name = "myMethod1" }.string("test", 0)
    +    // Call myMethod2
    +    method { name = "myMethod2" }.call()
    +    // Call myMethod3
    +    method { name = "myMethod3" }.call("test")
    +}
    +

    The function to be implemented at present can be directly defined as the following Kotlin class using the reflection function.

    The following example

    package com.example.test
    +
    +@ReflectClass
    +class MyClass {
    +
    +    @ReflectField
    +    val myField: String = fieldValueOf("none")
    +
    +    @ReflectMethod
    +    fun myMethod1(var1: String, var2: Int): String = methodReturnValueOf("none")
    +
    +    @ReflectMethod
    +    fun myMethod2() = MethodReturnType.Unit
    +
    +    @ReflectMethod
    +    fun myMethod3(var1: String) = MethodReturnType.Unit
    +}
    +

    Then we can directly call this defined Kotlin class to implement the reflection function, and the API will automatically generate the reflection code according to the annotation.

    The following example

    MyClass().also {
    +    // Call myField
    +    val value = it.myField
    +    // Call myMethod1
    +    val methodValue = it.myMethod1("test", 0)
    +    // Call myMethod2
    +    it.myMethod2()
    +    // Call myMethod3
    +    it.myMethod3("test")
    +}
    +

    Tips

    The above functions may change after the actual release, and the functions of the actual version shall prevail.

    Automatically Generate Directly Called Class Objects

    In Kotlin, the way to represent Java class objects is YourObject::class.java.

    This writing method is usually very long and will be very unsightly when used extensively during reflection.

    In the existing version, we have built-in commonly used Class objects, but this will increase the size of dependencies, and these objects may not be used in most cases.

    For example, StringClass, IntType, etc., these objects are built in YukiReflection.

    So we plan to add a function in the future, which can use properties to create a list of Class objects that need to be generated, and generate these Class objects in sequence through the Gradle plugin.

    Class objects of primitive types such as those mentioned above will still be built into YukiReflection, and the remaining Class objects need to be defined by yourself.

    The generated name specification is Class Name + Class.

    In order to prevent package name conflicts, you can control the sub-package name of the generated Class object.

    In the configuration file, you don't need to add Class as a suffix.

    You can define the generated root package name in the Gradle plugin, which defaults to com.highcapable.yukireflection.generated.classes.

    The following example

    # The most basic way to define is to write the name directly
    +# Will be generated to com.highcapable.yukireflection.generated.classes.BundleClass
    +android.os.Bundle=Bundle
    +# You can use the "." form in front to define the prefixed subpackage name
    +# For example, we want to define this class to the desired package name
    +# Will be generated to com.highcapable.yukireflection.generated.classes.myandroid.myos.BundleClass
    +android.os.Bundle=myandroid.myos.Bundle
    +# You can also not fill in the key value content, which will use the key value name
    +# as the defined package name and class name
    +# Will be generated to com.highcapable.yukireflection.generated.classes.android.os.BundleClass
    +android.os.Bundle
    +

    The approximate code form of the Class object generated by the above method is as follows.

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +// Used with default ClassLoader
    +val BundleClass: Class<*> = "android.os.Bundle".toClass()
    +
    +// Used when ClassLoader is specified
    +fun BundleClass(loader: ClassLoader): Class<*> = "android.os.Bundle".toClass(loader)
    +

    Maybe this Class may not be obtained in some cases.

    In this case, you can refer to the following configuration method.

    The following example

    # Add "?" after the key value to define a nullable Class object
    +android.os.Bundle?
    +

    The approximate code form of the Class object generated by the above method is as follows.

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +// Used with default ClassLoader
    +val BundleClass: Class<*>? = "android.os.Bundle".toClassOrNull()
    +
    +// Used when ClassLoader is specified
    +fun BundleClass(loader: ClassLoader): Class<*>? = "android.os.Bundle".toClassOrNull(loader)
    +

    If this Class object can be referenced by direct call, you can refer to the following configuration method at this time.

    The following example

    # Add "!!" after the key value to define a Class object that can be called directly
    +android.os.Bundle!!
    +

    The approximate code form of the Class object generated by the above method is as follows.

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +import android.os.Bundle
    +
    +// Used with default ClassLoader
    +val BundleClass: Class<Bundle> = classOf<Bundle>()
    +
    +// Used when ClassLoader is specified
    +fun BundleClass(loader: ClassLoader): Class<Bundle> = classOf<Bundle>(loader)
    +

    With the generated Class object, we can happily use YukiReflection for reflection.

    The following example

    method {
    +    name = "onCreate"
    +    param(BundleClass)
    +}
    +

    Tips

    The above functions may change after the actual release, and the functions of the actual version shall prevail.

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/features.html b/en/api/features.html new file mode 100644 index 0000000..5001da7 --- /dev/null +++ b/en/api/features.html @@ -0,0 +1,827 @@ + + + + + + + + + Features | Yuki Reflection + + + + + +

    Features

    This page contains usage examples for all core features of YukiReflection.

    Class Extensions

    Here are the extension functions related to the Class object itself.

    Object Conversion

    Suppose we want to get a Class that cannot be called directly.

    Normally, we can use the standard reflection API to find this Class.

    The following example

    // Class in the default ClassLoader environment
    +var instance = Class.forName("com.demo.Test")
    +// Specify the Class in the ClassLoader environment
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var instance = customClassLoader?.loadClass("com.demo.Test")
    +

    This is probably not very friendly, and YukiReflection provides you with a syntactic sugar that can be used anywhere.

    The above writing can be written as YukiReflection as follows.

    The following example

    // Get this Class directly
    +var instance = "com.demo.Test".toClass()
    +// ClassLoader where the custom Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var instance = "com.demo.Test".toClass(customClassLoader)
    +

    If the current Class does not exist, using the above method will throw an exception.

    If you are not sure whether the Class exists, you can refer to the following solutions.

    The following example

    // Get this Class directly
    +// If not available, the result will be null but no exception will be thrown
    +var instance = "com.demo.Test".toClassOrNull()
    +// ClassLoader where the custom Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +// If not available, the result will be null but no exception will be thrown
    +var instance = "com.demo.Test".toClassOrNull(customClassLoader)
    +

    We can also get an existing Class object by mapping.

    The following example

    // Assume this Class can be obtained directly
    +var instance = classOf<Test>()
    +// We can also customize the ClassLoader where the Class is located, which is very effective for stubs
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var instance = classOf<Test>(customClassLoader)
    +

    Tips

    For more functions, please refer to classOf, String.toClass, String.toClassOrNull methods.

    Lazy Loading

    Suppose we want to get a Class that cannot be called directly, but we do not need this Class immediately.

    At this time, you can use lazyClass to complete this function.

    The following example

    // Lazy loading of this Class
    +val instance by lazyClass("com.demo.Test")
    +// Customize the ClassLoader where the Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +val instance by lazyClass("com.demo.Test") { customClassLoader }
    +// Call this Class at the appropriate time
    +instance.method {
    +    // ...
    +}
    +

    If the current Class does not exist, using the above method will throw an exception.

    If you are not sure whether Class exists, you can refer to the following solution.

    The following example

    // Lazy loading of this Class
    +// If not available, the result will be null but no exception will be thrown
    +val instance by lazyClassOrNull("com.demo.Test")
    +// Customize the ClassLoader where the Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +// If not available, the result will be null but no exception will be thrown
    +val instance by lazyClassOrNull("com.demo.Test") { customClassLoader }
    +// Call this Class at the appropriate time
    +instance?.method {
    +    // ...
    +}
    +

    Tips

    For more functions, please refer to lazyClass, lazyClassOrNull methods.

    Existential Judgment

    Suppose we want to determine whether a Class exists.

    Usually, we can use the standard reflection API to find this Class to determine whether it exists by exception.

    The following example

    // Class in the default ClassLoader environment
    +var isExist = try {
    +    Class.forName("com.demo.Test")
    +    true
    +} catch (_: Throwable) {
    +    false
    +}
    +// Specify the Class in the ClassLoader environment
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var isExist = try {
    +    customClassLoader?.loadClass("com.demo.Test")
    +    true
    +} catch (_: Throwable) {
    +    false
    +}
    +

    This is probably not very friendly, and YukiReflection provides you with a syntactic sugar that can be used anywhere.

    The above writing can be written as YukiReflection as follows.

    The following example

    // Check if this class exists
    +var isExist = "com.demo.Test".hasClass()
    +// ClassLoader where the custom Class is located
    +val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +var isExist = "com.demo.Test".hasClass(customClassLoader)
    +

    Tips

    For more functions, please refer to String.hasClass method.

    The Class name in the current app's Dex after being obfuscated by tools such as R8 will be difficult to distinguish.

    Its correct position is uncertain, and cannot be obtained directly through Object Conversion.

    At this point, there is DexClassFinder, its role is to determine the instance of this Class by the bytecode features in the Class that need to be searched.

    Notice

    This feature is only available on the Android platform.

    At present, the function of DexClassFinder is still in the experimental stage.

    Since the search function is only implemented through the Java layer, the performance may not reach the optimal level when there are too many current app's Class.

    If something got wrong welcome to feedback.

    Since it is a reflection-level API, currently it can only locate the specified Class through the characteristics of Class and Member, and cannot locate it by specifying the string and method content characteristics in the bytecode.

    The speed of searching Class depends on the performance of the current device.

    At present, the mainstream mobile processors are in the 3~10s range when the conditions are not complicated in the 10~15w number of Class, the fastest speed can reach within 25s under slightly complex conditions.

    Please note that the more the same type Class is matched, the slower the speed.

    Pay Attention

    After YukiHookAPI 2.0.0 released, this function will be deprecated and will be removed directly from YukiReflection.

    We welcome all developers to start using DexKitopen in new window, which is a high-performance runtime parsing library for Dex implemented in C++, which is more efficient than the Java layer in terms of performance, efficient and excellent, it is still in the development stage, your valuable suggestions are welcome.

    Get Started

    Below is a simple usage example.

    Suppose the following Class is what we want, the names are obfuscated and may be different in each version.

    The following example

    package com.demo;
    +
    +public class a extends Activity implements Serializable {
    +
    +    public a(String var1) {
    +        // ...
    +    }
    +
    +    private String a;
    +
    +    private String b;
    +
    +    private boolean a;
    +
    +    protected void onCreate(Bundle var1) {
    +        // ...
    +    }
    +
    +    private static void a(String var1) {
    +        // ...
    +    }
    +
    +    private String a(boolean var1, String var2) {
    +        // ...
    +    }
    +
    +    private void a() {
    +        // ...
    +    }
    +
    +    public void a(boolean var1, a var2, b var3, String var4) {
    +        // ...
    +    }
    +}
    +

    At this point, we want to get this Class, you can use the ClassLoader.searchClass method directly.

    Each of the conditions demonstrated below is optional, and the more complex the conditions, the more accurate the positioning and the worse the performance.

    The following example

    searchClass {
    +    // Start the search from the specified package name range
    +    // In actual use, you can specify multiple package name ranges at the same time
    +    from("com.demo")
    +    // Specify the result of getSimpleName of the current Class
    +    // You can directly make logical judgments on this string
    +    // Here we are not sure whether its name is a, we can only judge the length of the string
    +    simpleName { it.length == 1 }
    +    // Specify the inherited parent class object
    +    // If it is an existing stub, it can be directly represented by generics
    +    extends<Activity>()
    +    // Specify the inherited parent class object
    +    // Which can be written directly as the full class name
    +    // And you can also specify multiple objects at the same time
    +    extends("android.app.Activity")
    +    // Specify the implemented interface
    +    // If it exists stub, can be directly represented by generics
    +    implements<Serializable>()
    +    // Specify the implemented interface
    +    // Which can be written directly as a full class name, or you can specify multiple at the same time
    +    implements("java.io.Serializable")
    +    // Specify the type and style of the constructor
    +    // And the number count that exists in the current class
    +    constructor { param(StringClass) }.count(num = 1)
    +    // Specify the type and style of the variable
    +    // And the number that exists in the current class count
    +    field { type = StringClass }.count(num = 2)
    +    // Specify the type and style of the variable
    +    // And the number that exists in the current class count
    +    field { type = BooleanType }.count(num = 1)
    +    // Directly specify the number of all variables that exist in the current class count
    +    field().count(num = 3)
    +    // If you think the number of variables is indeterminate
    +    // You can also use the following custom conditions
    +    field().count(1..3)
    +    field().count { it >= 3 }
    +    // Specify the type and style of the method
    +    // And the number that exists in the current class count
    +    method {
    +        name = "onCreate"
    +        param(BundleClass)
    +    }.count(num = 1)
    +    // Specify the type and style of the method
    +    // Specify the modifier, and the number count in the current class
    +    method {
    +        modifiers { isStatic && isPrivate }
    +        param(StringClass)
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // Specify the type and style of the method
    +    // Specify the modifier, and the number count in the current class
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        param(BooleanType, StringClass)
    +        returnType = StringClass
    +    }.count(num = 1)
    +    // Specify the type and style of the method
    +    // Specify the modifier, and the number count in the current class
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        emptyParam()
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // Specify the type and style of the method
    +    // As well as the modifier and VagueType
    +    // And the number count that exists in the current class
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        param(BooleanType, VagueType, VagueType, StringClass)
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // Directly specify the number of all methods that exist in the current class count
    +    method().count(num = 5)
    +    // If you think the number of methods is uncertain, you can also use the following custom conditions
    +    method().count(1..5)
    +    method().count { it >= 5 }
    +    // Directly specify the number of all members existing in the current class count
    +    // Members include: Field, Method, Constructor
    +    member().count(num = 9)
    +    // There must be a static modifier in all members, you can add this condition like this
    +    member {
    +        modifiers { isStatic }
    +    }
    +}.get() // Get the instance of this Class itself, if not found, it will return null
    +

    Tips

    The conditional usage of Field, Method, Constructor in the above usage is consistent with the related usage in Member Extensions, with only minor differences.

    For more functions, please refer to MemberRules, FieldRules, MethodRules, ConstructorRules.

    By default, DexClassFinder will use synchronous mode to search Class, which will block the current thread until it finds or finds an exception.

    If the search takes too long, it may cause ANR problems to the current app.

    In response to the above problems, we can enable asynchronous, just add the parameter async = true, which will not require you to start a thread again, the API has already handled the related problems for you.

    Notice

    To use this function, you need to pass in the Context of the current app as the first method parameter.

    For the asynchronous case you need to use the wait method to get the result, the get method will no longer work.

    The following example

    val context: Context // Assume this is the Context of the current app
    +searchClass(context, async = true) {
    +    // ...
    +}.wait { class1 ->
    +    // Get asynchronous result
    +}
    +searchClass(context, async = true) {
    +    // ...
    +}.wait { class2 ->
    +    // Get asynchronous result
    +}
    +

    In this way, our search process runs asynchronously, it will not block the main thread, and each search will be performed in a separate thread at the same time, which can achieve the effect of parallel tasks.

    Local Cache

    Since the search is performed again every time the current app is reopened, this is a waste of repetitive performance when the current app's version is unchanged.

    At this point, we can locally cache the search results of the current app's version by specifying the name parameter.

    Next time, the found class name will be directly read from the local cache.

    The local cache uses SharedPreferences, which will be saved to the app's data directory and will be re-cached after the app's version is updated.

    After enabling the local cache, async = true will be set at the same time, you don't need to set it manually.

    Notice

    To use this function, you need to pass in the Context of the current app as the first method parameter.

    The following example

    val context: Context // Assume this is the Context of the current app
    +searchClass(context, name = "com.demo.class1") {
    +    // ...
    +}.wait { class1 ->
    +    // Get asynchronous result
    +}
    +searchClass(context, name = "com.demo.class2") {
    +    // ...
    +}.wait { class2 ->
    +    // Get asynchronous result
    +}
    +

    If you want to clear the local cache manually, you can use the following method to clear the current version of the current app's cache.

    The following example

    val context: Context // Assume this is the Context of the current app
    +DexClassFinder.clearCache(context)
    +

    You can also clear the app's cache for a specific version.

    The following example

    val context: Context // Assume this is the Context of the current app
    +DexClassFinder.clearCache(context, versionName = "1.0", versionCode = 1)
    +

    If you need to search a set of Class at the same time using a fixed condition, then you only need to use the all or waitAll method to get the result.

    // Synchronous search, use all to get all the results found by the conditions
    +searchClass {
    +    // ...
    +}.all().forEach { clazz ->
    +    // Get each result
    +}
    +// Synchronous search, using all { ... } to iterate over each result
    +searchClass {
    +    // ...
    +}.all { clazz ->
    +    // Get each result
    +}
    +// Asynchronous search, use waitAll to get all the results found by the conditions
    +val context: Context // Assume this is the Context of the current app
    +searchClass(context, async = true) {
    +    // ...
    +}.waitAll { classes ->
    +    classes.forEach {
    +        // Get each result
    +    }
    +}
    +

    Tips

    For more functions, please refer to ClassLoader.searchClass method.

    Member Extensions

    Here are the extension functions related to the Class bytecode member variables Field, Method, Constructor.

    Tips

    Member is the interface description object of Field, Method, Constructor, which is the general term for the bytecode members in Class in Java reflection.

    Suppose there is such a Class.

    The following example

    package com.demo;
    +
    +public class BaseTest {
    +
    +    public BaseTest() {
    +        // ...
    +    }
    +
    +    public BaseTest(boolean isInit) {
    +        // ...
    +    }
    +
    +    private void doBaseTask(String taskName) {
    +        // ...
    +    }
    +}
    +
    package com.demo;
    +
    +public class Test extends BaseTest {
    +
    +    public Test() {
    +        // ...
    +    }
    +
    +    public Test(boolean isInit) {
    +        // ...
    +    }
    +
    +    private static TAG = "Test";
    +
    +    private BaseTest baseInstance;
    +
    +    private String a;
    +
    +    private boolean a;
    +
    +    private boolean isTaskRunning = false;
    +
    +    private static void init() {
    +        // ...
    +    }
    +
    +    private void doTask(String taskName) {
    +        // ...
    +    }
    +
    +    private void release(String taskName, Function<boolean, String> task, boolean isFinish) {
    +        // ...
    +    }
    +
    +    private void stop() {
    +        // ...
    +    }
    +
    +    private String getName() {
    +        // ...
    +    }
    +
    +    private void b() {
    +        // ...
    +    }
    +
    +    private void b(String a) {
    +        // ...
    +    }
    +}
    +

    Find and Reflection

    Suppose we want to get the doTask method of Test and execute it.

    Normally, we can use the standard reflection API to find this method.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using reflection API
    +Test::class.java
    +    .getDeclaredMethod("doTask", String::class.java)
    +    .apply { isAccessible = true }
    +    .invoke(instance, "task_name")
    +

    This is probably not very friendly, and YukiReflection provides you with a syntactic sugar that can be used anywhere.

    The above writing can be written as YukiReflection as follows.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doTask"
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    Tips

    For more features, please refer to MethodFinder.

    Similarly, we need to get the isTaskRunning field can also be written as follows.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.field {
    +    name = "isTaskRunning"
    +    type = BooleanType
    +}.get(instance).any() // Any instantiates an object of any type of Field
    +

    Tips

    For more features, please refer to FieldFinder.

    Maybe you also want to get the current Class constructor, the same can be achieved.

    The following example

    Test::class.java.constructor {
    +    param(BooleanType)
    +}.get().call(true) // Can create a new instance
    +

    If you want to get the no-argument constructor of Class, you can write it as follows.

    The following example

    Test::class.java.constructor().get().call() // Create a new instance
    +

    Tips

    For more features, please refer to ConstructorFinder.

    Optional Find Conditions

    Suppose we want to get the getName method in Class, which can be implemented as follows.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "getName"
    +    emptyParam()
    +    returnType = StringClass
    +}.get(instance).string() // Get the result of the method
    +

    Through observation, it is found that there is only one method named getName in this Class, so can we make it simpler?

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "getName"
    +    emptyParam()
    +}.get(instance).string() // Get the result of the method
    +

    Yes, you can refine your find criteria for methods that do not change exactly.

    When using only get or wait methods to get results, YukiReflection will match the first found result in bytecode order by default.

    The problem comes again, this Class has a release method, but its method parameters are very long, and some types may not be directly available.

    Normally we would use param(...) to find this method, but is there an easier way.

    At this point, after determining the uniqueness of the method, you can use paramCount to find the method.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "release"
    +    // At this point
    +    // We don't have to determine the specific type of method parameters, just write the number
    +    paramCount = 3
    +}.get(instance) // Get this method
    +

    Although the above example can be successfully matched, it is not accurate.

    At this time, you can also use VagueType to fill in the method parameter type that you do not want to fill in.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "release"
    +    // Use VagueType to fill in the type you don't want to fill in
    +    // While ensuring that other types can match
    +    param(StringClass, VagueType, BooleanType)
    +}.get(instance) // Get this method
    +

    If you are not sure about the type of each parameter, you can create a conditional method body with the param { ... } method.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +     name = "release"
    +     // Get the it (Class) method parameter type array instance
    +     // To only determine the known type and its position
    +     param { it[0] == StringClass && it[2] == BooleanType }
    +}.get(instance) // Get this method
    +

    Tips

    Use param { ... } to create a conditional method body, where the variable it is the Class type array instance of the current method parameter, and you can freely use Class all objects and their methods in.

    The condition at the end of the method body needs to return a Boolean, which is the final condition judgment result.

    For more functions, please refer to FieldFinder.type, MethodFinder.param, MethodFinder.returnType, ConstructorFinder.param method.

    Find in Super Class

    You will notice that Test extends BaseTest, now we want to get the doBaseTask method of BaseTest, how do we do it without knowing the name of the super class?

    Referring to the above find conditions, we only need to add a superClass to the find conditions to achieve this function.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doBaseTask"
    +    param(StringClass)
    +    // Just add this condition
    +    superClass()
    +}.get(instance).call("task_name")
    +

    At this time, we can get this method in the super class.

    superClass has a parameter isOnlySuperClass, when set to true, you can skip the current Class and only find the super class of the current Class.

    Since we now know that the doBaseTask method only exists in the super class, this condition can be added to save finding time.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doBaseTask"
    +    param(StringClass)
    +    // Add a find condition
    +    superClass(isOnlySuperClass = true)
    +}.get(instance).call("task_name")
    +

    At this time, we can also get this method in the super class.

    Once superClass is set, it will automatically cycle backward to find out whether this method exists in all extends super classes, until it finds that the target has no super class (the extends is java.lang.Object).

    Tips

    For more functions, please refer to MethodFinder.superClass, ConstructorFinder.superClass, FieldFinder.superClass methods.

    Pay Attention

    The currently founded Method can only find the Method of the current Class unless the superClass condition is specified, which is the default behavior of the Java Reflection API.

    Vague Find

    If we want to find a method name, but are not sure if it has changed in each release, we can use vague find.

    Suppose we want to get the doTask method in Class, which can be implemented as follows.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name {
    +        // Set name is case insensitive
    +        it.equals("dotask", isIgnoreCase = true)
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    Knowing that there is currently only one doTask method in Class, we can also judge that the method name contains only the characters specified in it.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name {
    +        // Only contains oTas
    +        it.contains("oTas")
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    We can also judge based on the first and last strings.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name {
    +        // Contains do at the beginning and Task at the end
    +        it.startsWith("do") && it.endsWith("Task")
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    By observing that this method name contains only letters, we can add a precise search condition.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name {
    +        // Start with do, end with Task, just letters
    +        it.startsWith("do") && it.endsWith("Task") && it.isOnlyLetters()
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    Tips

    Use name { ... } to create a conditional method body, where the variable it is the string of the current name, and you can freely use it in the extension method of NameRules function.

    The condition at the end of the method body needs to return a Boolean, which is the final condition judgment result.

    For more functions, please refer to FieldFinder.name, MethodFinder.name methods and NameRules.

    Multiple Find

    Sometimes, we may need to find a set of methods, constructors, and fields with the same characteristics in a Class.

    At this time, we can use relative condition matching to complete.

    Based on the result of the find condition, we only need to replace get with all to get all the bytecodes that match the condition.

    Suppose this time we want to get all methods in Class with the number of method parameters in the range 1..3, you can use the following implementation.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    paramCount(1..3)
    +}.all(instance).forEach { instance ->
    +    // Call and execute each method
    +    instance.call(...)
    +}
    +

    The above example can be perfectly matched to the following 3 methods.

    private void doTask(String taskName)

    private void release(String taskName, Function<boolean, String> task, boolean isFinish)

    private void b(String a)

    If you want to define the conditions for the range of the number of parameters more freely, you can use the following implementation.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    paramCount { it < 3 }
    +}.all(instance).forEach { instance ->
    +    // Call and execute each method
    +    instance.call(...)
    +}
    +

    The above example can be perfectly matched to the following 6 methods.

    private static void init()

    private void doTask(String taskName)

    private void stop(String a)

    private void getName(String a)

    private void b()

    private void b(String a)

    By observing that there are two methods named b in Class, you can use the following implementation.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "b"
    +}.all(instance).forEach { instance ->
    +    // Call and execute each method
    +    instance.call(...)
    +}
    +

    The above example can be perfectly matched to the following 2 methods.

    private void b()

    private void b(String a)

    Tips

    Use paramCount { ... } to create a conditional method body, where the variable it is the integer of the current number of parameters, and you can use it freely in the extension method of CountRules function in it.

    The condition at the end of the method body needs to return a Boolean, which is the final condition judgment result.

    For more functions, please refer to MethodFinder.paramCount, ConstructorFinder.paramCount methods and CountRules.

    Static Bytecode

    Some methods and fields are statically implemented in Class, at this time, we can call them without passing in an instance.

    Suppose we want to get the contents of the static field TAG this time.

    The following example

    Test::class.java.field {
    +    name = "TAG"
    +    type = StringClass
    +}.get().string() // The type of Field is string and can be cast directly
    +

    Assuming that there is a non-static TAG field with the same name in Class, what should I do at this time?

    Just add a filter.

    The following example

    Test::class.java.field {
    +    name = "TAG"
    +    type = StringClass
    +    // This field to identify the lookup needs to be static
    +    modifiers { isStatic }
    +}.get().string() // The type of Field is string and can be cast directly
    +

    We can also call a static method called init.

    The following example

    Test::class.java.method {
    +    name = "init"
    +    emptyParam()
    +}.get().call()
    +

    Likewise, you can identify it as a static.

    The following example

    Test::class.java.method {
    +    name = "init"
    +    emptyParam()
    +    // This method of identity find needs to be static
    +    modifiers { isStatic }
    +}.get().call()
    +

    Tips

    Use modifiers { ... } to create a conditional method body, at which point you can freely use its functionality in ModifierRules.

    The condition at the end of the method body needs to return a Boolean, which is the final condition judgment result.

    For more functions, please refer to FieldFinder.modifiers, MethodFinder.modifiers, ConstructorFinder.modifiers methods and ModifierRules.

    Obfuscated Bytecode

    You may have noticed that the example Class given here has two obfuscated field names, both of which are a, how do we get them at this time?

    There are two options.

    The first option is to determine the name and type of the field.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.field {
    +    name = "a"
    +    type = BooleanType
    +}.get(instance).any() // Get a field named a with type Boolean
    +

    The second option is to determine where the type of the field is located.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.field {
    +    type(BooleanType).index().first()
    +}.get(instance).any() // Get the first field of type Boolean
    +

    In the above two cases, the corresponding field private boolean a can be obtained.

    Likewise, there are two obfuscated method names in this Class, both of which are b.

    You can also have two options to get them.

    The first option is to determine the method name and method parameters.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "b"
    +    param(StringClass)
    +}.get(instance).call("test_string") // Get the method whose name is b and whose parameter is [String]
    +

    The second option is to determine where the parameters of the method are located.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    param(StringClass).index().first()
    +}.get(instance).call("test_string") // Get the method whose first method parameter is [String]
    +

    Since it is observed that this method is last in Class, then we have an alternative.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    order().index().last()
    +}.get(instance).call("test_string") // Get the last method of the current Class
    +

    Notice

    Please try to avoid using order to filter bytecode subscripts, they may be indeterminate unless you are sure that its position in this Class must not change.

    Directly Called

    The methods of calling bytecode described above all need to use get(instance) to call the corresponding method.

    Is there a simpler way?

    At this point, you can use the current method on any instance to create a call space.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Assume this Class is not directly available
    +instance.current {
    +    // Execute the doTask method
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +    // Execute the stop method
    +    method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +    // Get name
    +    val name = method { name = "getName" }.string()
    +}
    +

    We can also use superClass to call methods of the current Class super class.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Assume this Class is not directly available
    +instance.current {
    +    // Execute the doBaseTask method of the parent class
    +    superClass().method {
    +        name = "doBaseTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}
    +

    If you don't like to use a lambda to create the namespace of the current instance, you can use the current() method directly.

    The following example

    // Assuming this is an instance of this Class, this Class cannot be obtained directly
    +val instance = Test()
    +// Execute the doTask method
    +instance
    +    .current()
    +    .method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +// Execute the stop method
    +instance
    +    .current()
    +    .method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +// Get name
    +val name = instance.current().method { name = "getName" }.string()
    +

    Likewise, consecutive calls can be made between them, but inline calls are not allowed.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Assume this Class is not directly available
    +instance.current {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}.current()
    +    .method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +//  Note that because current() returns the CurrentClass object itself
    +// It CANNOT BE CALLED like the following
    +instance.current().current()
    +

    For Field instances, there is also a convenience method that can directly get the object of the instance where Field is located.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Assume this Class is not directly available
    +instance.current {
    +    // <Plan 1>
    +    field {
    +        name = "baseInstance"
    +    }.current {
    +        method {
    +            name = "doBaseTask"
    +            param(StringClass)
    +        }.call("task_name")
    +    }
    +    // <Plan 2>
    +    field {
    +        name = "baseInstance"
    +    }.current()
    +        ?.method {
    +            name = "doBaseTask"
    +            param(StringClass)
    +        }?.call("task_name")
    +}
    +

    Notice

    The above current method is equivalent to calling the field { ... }.any()?.current() method in CurrentClass for you.

    If there is no CurrentClass calling field, you need to use field { ... }.get(instance).current() to call it.

    The problem comes again, I want to use reflection to create the following instance and call the method in it, how to do it?

    The following example

    Test(true).doTask("task_name")
    +

    Usually, we can use the standard reflection API to call.

    The following example

    "com.demo.Test".toClass()
    +    .getDeclaredConstructor(Boolean::class.java)
    +    .apply { isAccessible = true }
    +    .newInstance(true)
    +    .apply {
    +        javaClass
    +            .getDeclaredMethod("doTask", String::class.java)
    +            .apply { isAccessible = true }
    +            .invoke(this, "task_name")
    +    }
    +

    But I feel that this approach is very troublesome.

    Is there a more concise way to call it?

    At this time, we can also use the buildOf method to create an instance.

    The following example

    "com.demo.Test".toClass().buildOf(true) { param(BooleanType) }?.current {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}
    +

    If you want the buildOf method to return the type of the current instance, you can include a type-generic declaration in it instead of using as to cast the target type.

    In this case, the constructor of the instance itself is private, but the method inside is public, so we only need to create its constructor by reflection.

    The following example

    // Assume this Class can be obtained directly
    +val test = Test::class.java.buildOf<Test>(true) { param(BooleanType) }
    +test.doTask("task_name")
    +

    Tips

    For more functions, please refer to CurrentClass and Class.buildOf method.

    Find Again

    Suppose there are three different versions of Class, all of which are the same Class for different versions of this app.

    There is also a method doTask in it, assuming they function the same.

    The following example of version A

    public class Test {
    +
    +    public void doTask() {
    +        // ...
    +    }
    +}
    +

    The following example of version B

    public class Test {
    +
    +    public void doTask(String taskName) {
    +        // ...
    +    }
    +}
    +

    The following example of version C

    public class Test {
    +
    +    public void doTask(String taskName, int type) {
    +        // ...
    +    }
    +}
    +

    We need to get this same functionality of the doTask method in a different version, how do we do it?

    At this point, you can use RemedyPlan to complete your needs.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doTask"
    +    emptyParam()
    +}.remedys {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.onFind {
    +        // Found logic can be implemented here
    +    }
    +    method {
    +        name = "doTask"
    +        param(StringClass, IntType)
    +    }.onFind {
    +        // Found logic can be implemented here
    +    }
    +}.wait(instance) {
    +    // Get the result of the method
    +}
    +

    Pay Attention

    The method lookup result using RemedyPlan can no longer use get to get method instance, you should use wait method.

    Also, you can continue to use RemedyPlan while using Multiple Find.

    The following example

    // Assume this is an instance of this Class
    +val instance = Test()
    +// Call and execute using YukiReflection
    +Test::class.java.method {
    +    name = "doTask"
    +    emptyParam()
    +}.remedys {
    +    method {
    +        name = "doTask"
    +        paramCount(0..1)
    +    }.onFind {
    +        // Found logic can be implemented here
    +    }
    +    method {
    +        name = "doTask"
    +        paramCount(1..2)
    +    }.onFind {
    +        // Found logic can be implemented here
    +    }
    +}.waitAll(instance) {
    +    // Get the result of the method
    +}
    +

    Relative Matching

    Suppose there is a Class with the same function in different versions of the current app but only the name of the Class is different.

    The following example of version A

    public class ATest {
    +
    +    public static void doTask() {
    +        // ...
    +    }
    +}
    +

    The following example of version B

    public class BTest {
    +
    +    public static void doTask() {
    +        // ...
    +    }
    +}
    +

    At this time, what should we do if we want to call the doTask method in this Class in each version?

    The usual practice is to check if Class exists.

    The following example

    // First find this Class
    +val currentClass =
    +    if("com.demo.ATest".hasClass()) "com.demo.ATest".toClass() else "com.demo.BTest".toClass()
    +// Then look for this method and call
    +currentClass.method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    I feel that this solution is very inelegant and cumbersome, then YukiReflection provides you with a very convenient VariousClass to solve this problem.

    Now, you can get this Class directly using the following methods.

    The following example

    VariousClass("com.demo.ATest", "com.demo.BTest").get().method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    If the current Class exists in the specified ClassLoader, you can fill in your ClassLoader in get.

    The following example

    val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +VariousClass("com.demo.ATest", "com.demo.BTest").get(customClassLoader).method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    If you are not sure that all Class will be matched, you can use the getOrNull method.

    The following example

    val customClassLoader: ClassLoader? = ... // Assume this is your ClassLoader
    +VariousClass("com.demo.ATest", "com.demo.BTest").getOrNull(customClassLoader)?.method {
    +     name = "doTask"
    +     emptyParam()
    +}?.get()?.call()
    +

    Tips

    For more functions, please refer to VariousClass.

    Calling Generics

    In the process of reflection, we may encounter generic problems.

    In the reflection processing of generics, YukiReflection also provides a syntactic sugar that can be used anywhere.

    For example we have the following generic class.

    The following example

    class TestGeneric<T, R> (t: T, r: R) {
    +
    +    fun foo() {
    +        // ...
    +    }
    +}
    +

    When we want to get a Class instance of the generic T or R in the current Class, only the following implementation is required.

    The following example

    class TestGeneric<T, R> (t: T, r: R) {
    +
    +    fun foo() {
    +        // Get the operation object of the current instance
    +        // Get the Class instance of T, in the 0th position of the parameter
    +        // The default value can not be written
    +        val tClass = current().generic()?.argument()
    +        // Get the Class instance of R, in parameter 1
    +        val rClass = current().generic()?.argument(index = 1)
    +        // You can also use the following syntax
    +        current().generic {
    +             // Get the Class instance of T
    +             // In the 0th position of the parameter, the default value can be left blank
    +            val tClass = argument()
    +            // Get the Class instance of R, in parameter 1
    +            val rClass = argument(index = 1)
    +        }
    +    }
    +}
    +

    When we want to call this Class externally, it can be implemented as follows.

    The following example

    // Assume this is the Class of T
    +class TI {
    +
    +    fun foo() {
    +        // ...
    +    }
    +}
    +// Assume this is an instance of T
    +val tInstance: TI? = ...
    +// Get the Class instance of T
    +// In the 0th position of the parameter, the default value can be left blank
    +// And get the method foo and call it
    +TestGeneric::class.java.generic()?.argument()?.method {
    +    name = "foo"
    +    emptyParam()
    +}?.get(tInstance)?.invoke<TI>()
    +

    Tips

    For more functions, please refer to CurrentClass.generic, Class.generic methods and GenericClass.

    Pay Attention of Trap

    Here are some misunderstandings that may be encountered during use for reference.

    Restrictive Find Conditions

    In find conditions you can only use index function once except order.

    The following example

    method {
    +    name = "test"
    +    param(BooleanType).index(num = 2)
    +    //  Wrong usage, please keep only one index method
    +    returnType(StringClass).index(num = 1)
    +}
    +

    The following find conditions can be used without any problems.

    The following example

    method {
    +    name = "test"
    +    param(BooleanType).index(num = 2)
    +    order().index(num = 1)
    +}
    +

    Necessary Find Conditions

    In common method find conditions, even methods without parameters need to set find conditions.

    Suppose we have the following Class.

    The following example

    public class TestFoo {
    +
    +    public void foo(String string) {
    +        // ...
    +    }
    +
    +    public void foo() {
    +        // ...
    +    }
    +}
    +

    We want to get the public void foo() method, which can be written as follows.

    The following example

    TestFoo::class.java.method {
    +    name = "foo"
    +}
    +

    However, the above example is wrong.

    You will find two foo methods in this Class, one of which takes a method parameter.

    Since the above example does not set the find conditions for param, the result will be the first method public void foo(String string) that matches the name and matches the bytecode order, not the last method we need.

    This is a frequent error, without method parameters, you will lose the use of method parameter find conditions.

    The correct usage is as follows.

    The following example

    TestFoo::class.java.method {
    +    name = "foo"
    +    // ✅ Correct usage, add detailed filter conditions
    +    emptyParam()
    +}
    +

    At this point, the above example will perfectly match the public void foo() method.

    Compatibility Notes

    In the past historical versions of the API, it was allowed to match the method without writing the default matching no-parameter method, but the latest version has corrected this problem, please make sure that you are using the latest API version.

    In the find conditions for constructors, even constructors without parameters need to set find conditions.

    Suppose we have the following Class.

    The following example

    public class TestFoo {
    +
    +    public TestFoo() {
    +        // ...
    +    }
    +}
    +

    To get the public TestFoo() constructor, we must write it in the following form.

    The following example

    TestFoo::class.java.constructor { emptyParam() }
    +

    The above example can successfully obtain the public TestFoo() constructor.

    If you write constructor() and miss emptyParam(), the result found at this time will be the first one in bytecode order, may not be parameterless.

    Compatibility Notes

    In past historical versions of the API, if the constructor does not fill in any search parameters, the constructor will not be found directly.

    This is a BUG and has been fixed in the latest version, please make sure you are using the latest API version.

    API Behavior Changes

    In 1.2.0 and later versions, the behavior of constructor() is no longer constructor { emptyParam() } but constructor {}, please pay attention to the behavior change reasonably adjust the find parameters.

    No Find Conditions

    Without setting find conditions, using field(), constructor(), method() will return all members under the current Class.

    Using get(...) or give() will only get the first bit in bytecode order.

    The following example

    Test::class.java.field().get(...)
    +Test::class.java.method().give()
    +

    If you want to get all members, you can use all(...) or giveAll()

    The following example

    Test::class.java.field().all(...)
    +Test::class.java.method().giveAll()
    +

    Compatibility Notes

    In past historical versions of the API, failure to set find conditions will throw an exception.

    This feature was added in 1.2.0 and later versions.

    Bytecode Type

    In the bytecode call result, the cast method can only specify the type corresponding to the bytecode.

    For example we want to get a field of type Boolean and cast it to String.

    The following is the wrong way to use it.

    The following example

    field {
    +    name = "test"
    +    type = BooleanType
    +}.get().string() //  Wrong usage, must be cast to the bytecode target type
    +

    The following is the correct way to use it.

    The following example

    field {
    +    name = "test"
    +    type = BooleanType
    +}.get().boolean().toString() // ✅ The correct way to use, get the type and then convert
    +

    Common Type Extensions

    When find methods and fields, we usually need to specify the type in find conditions.

    The following example

    field {
    +    name = "test"
    +    type = Boolean::class.javaPrimitiveType
    +}
    +

    Expressing the type of Boolean::class.javaPrimitiveType in Kotlin is very long and inconvenient.

    Therefore, YukiReflection encapsulates common type calls for developers, including Android related types and Java common types and primitive type keywords.

    At this time, the above type can be written in the following form.

    The following example

    field {
    +    name = "test"
    +    type = BooleanType
    +}
    +

    The primitive type keywords in common Java types have been encapsulated as Type(Class Name) + Type, such as IntType, FloatType (their bytecode types are int, float).

    Correspondingly, array types also have convenient usage methods, assuming we want to get an array of type String[].

    You need to write java.lang.reflect.Array.newInstance(String::class.java, 0).javaClass to get this type.

    Does it feel very troublesome, at this time we can use the method ArrayClass(StringClass) to get this type.

    At the same time, since String is a common type, you can also directly use StringArrayClass to get this type.

    The methods found in some common requirements have their corresponding encapsulation types for use, in the format Type(Class Name) + Class.

    The following are wrapper names for some special case types in Java represented in YukiReflection.

    • voidUnitType

    • java.lang.VoidUnitClass

    • java.lang.ObjectAnyClass

    • java.lang.IntegerIntClass

    • java.lang.CharacterCharClass

    Notice

    Encapsulating types with Type(Class Name) + Type will and only be represented as Java primitive type keywords.

    Since the concept of primitive types does not exist in Kotlin, they will all be defined as KClass.

    There are 9 primitive type keywords in Java, of which 8 are primitive type, namely boolean, char, byte, short , int, float, long, double, of which the void type is a special case.

    At the same time, they all have their own corresponding package types in Java, such as java.lang.Boolean, java.lang.Integer, these types are unequal, Please note the distinction.

    Similarly, arrays also have corresponding wrapper types, which also need to be distinguished from Java primitive type keywords.

    For example, the encapsulation type of byte[] is ByteArrayType or ArrayClass(ByteType), and the encapsulation type of Byte[] is ByteArrayClass or ArrayClass(ByteClass), these types are also unequal.

    At the same time, you are welcome to contribute more commonly used types.

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/home.html b/en/api/home.html new file mode 100644 index 0000000..de11339 --- /dev/null +++ b/en/api/home.html @@ -0,0 +1,34 @@ + + + + + + + + + Document Introduce | Yuki Reflection + + + + + +

    Document Introduce

    The document here will synchronize the relevant usage of the latest API version, please keep YukiReflection as the latest version to use the latest version of the function.

    Function Description

    The function description mainly introduces the related usage and purpose of the current API.

    Function Example Description

    The function examples mainly show the basic usage examples of the current API for reference.

    Change Record Description

    The function of the first version will be marked as v<version> first;

    New function added later will be marked as v<version> added;

    Later modified function will be appended as v<version> modified;

    Later deprecated function will be marked as v<version> deprecated and strikethrough;

    Later removed function will be marked as v<version> removed and strikethrough.

    • kt  Kotlin Static File

    • annotation  Annotation Class

    • interface  Interface Class

    • object  Class (Singleton)

    • class  Class

    • field  Field or get / set method or read-only get method

    • method  Method

    • enum  Enum constant

    • ext-field  Extension field (global)

    • ext-method  Extension method (global)

    • i-ext-field  Extension field (internal)

    • i-ext-method  Extension method (internal)

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/YukiReflection.html b/en/api/public/com/highcapable/yukireflection/YukiReflection.html new file mode 100644 index 0000000..7c9c3b8 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/YukiReflection.html @@ -0,0 +1,41 @@ + + + + + + + + + YukiReflection - object | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    YukiReflection - object

    object YukiReflection
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    这是 YukiReflection 的装载调用类。

    TAG - field

    const val TAG: String
    +

    Change Records

    v1.0.3 added

    Function Illustrate

    获取当前 YukiReflection 的名称 (标签)。

    VERSION - field

    const val VERSION: String
    +

    Change Records

    v1.0.3 added

    Function Illustrate

    获取当前 YukiReflection 的版本。

    API_VERSION_NAME - field

    Change Records

    v1.0.0 first

    v1.0.3 deprecated

    不再区分版本名称和版本号,请迁移到 VERSION

    API_VERSION_CODE - field

    Change Records

    v1.0.0 first

    v1.0.3 deprecated

    不再区分版本名称和版本号,请迁移到 VERSION

    Configs - object

    object Configs
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    对 API 相关功能的配置类。

    debugLog - method

    inline fun debugLog(initiate: YLog.Configs.() -> Unit)
    +

    Change Records

    v1.0.3 added

    Function Illustrate

    配置 YLog.Configs 相关参数。

    debugTag - field

    Change Records

    v1.0.0 first

    v1.0.3 deprecated

    请迁移到 debugLog

    isDebug - field

    var isDebug: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    是否启用 Debug 模式。

    默认不启用,启用后将交由日志输出管理器打印详细日志 (例如反射查找功能的耗时) 到控制台。

    isAllowPrintingLogs - field

    Change Records

    v1.0.0 first

    v1.0.3 deprecated

    请迁移到 debugLog

    isEnableMemberCache - field

    Change Records

    v1.0.0 first

    v1.0.2 deprecated

    Member 的直接缓存功能已被移除,因为其存在内存溢出 (OOM) 问题

    configs - method

    inline fun configs(initiate: Configs.() -> Unit)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Configs 类实现了一个 lambda 方法体。

    你可以轻松地调用它进行配置。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/bean/CurrentClass.html b/en/api/public/com/highcapable/yukireflection/bean/CurrentClass.html new file mode 100644 index 0000000..e829f28 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/bean/CurrentClass.html @@ -0,0 +1,49 @@ + + + + + + + + + CurrentClass - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    CurrentClass - class

    class CurrentClass internal constructor(private val classSet: Class<*>, internal val instance: Any)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    当前实例的类操作对象。

    name - field

    val name: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前 classSetClass.getName

    simpleName - field

    val simpleName: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前 classSetClass.getSimpleName

    generic - method

    fun generic(): GenericClass?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前实例中的泛型父类。

    如果当前实例不存在泛型将返回 null

    generic - method

    inline fun generic(initiate: GenericClass.() -> Unit): GenericClass?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前实例中的泛型父类。

    如果当前实例不存在泛型将返回 null

    superClass - method

    fun superClass(): SuperClass
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    调用父类实例。

    field - method

    inline fun field(initiate: FieldConditions): FieldFinder.Result.Instance
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    调用当前实例中的变量。

    method - method

    inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    调用当前实例中的方法。

    SuperClass - class

    inner class SuperClass internal constructor(private val superClassSet: Class<*>)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    当前类的父类实例的类操作对象。

    name - field

    val name: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前 classSet 中父类的 Class.getName

    simpleName - field

    val simpleName: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前 classSet 中父类的 Class.getSimpleName

    generic - method

    fun generic(): GenericClass?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前实例父类中的泛型父类。

    如果当前实例不存在泛型将返回 null

    generic - method

    inline fun generic(initiate: GenericClass.() -> Unit): GenericClass?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前实例父类中的泛型父类。

    如果当前实例不存在泛型将返回 null

    field - method

    inline fun field(initiate: FieldConditions): FieldFinder.Result.Instance
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    调用父类实例中的变量。

    method - method

    inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    调用父类实例中的方法。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/bean/GenericClass.html b/en/api/public/com/highcapable/yukireflection/bean/GenericClass.html new file mode 100644 index 0000000..fae02a3 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/bean/GenericClass.html @@ -0,0 +1,37 @@ + + + + + + + + + GenericClass - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    GenericClass - class

    class GenericClass internal constructor(private val type: ParameterizedType)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    当前 Class 的泛型父类操作对象。

    argument - method

    fun argument(index: Int): Class<*>?
    +
    inline fun <reified T> argument(index: Int): Class<T>?
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    方法的返回值可为 null

    Function Illustrate

    获得泛型参数数组下标的 Class 实例。

    Notice

    在运行时局部变量的泛型会被擦除,获取不到时将会返回 null

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/bean/VariousClass.html b/en/api/public/com/highcapable/yukireflection/bean/VariousClass.html new file mode 100644 index 0000000..edd89a3 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/bean/VariousClass.html @@ -0,0 +1,37 @@ + + + + + + + + + VariousClass - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    VariousClass - class

    class VariousClass(private vararg val name: String)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个不确定性 Class 类名装载器,通过 name 装载 Class 名称数组。

    get - method

    fun get(loader: ClassLoader? = null, initialize: Boolean): Class<*>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获取匹配的实体类。

    使用当前 loader 装载目标 Class

    getOrNull - method

    fun getOrNull(loader: ClassLoader? = null, initialize: Boolean): Class<*>?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获取匹配的实体类。

    使用当前 loader 装载目标 Class

    匹配不到 Class 会返回 null,不会抛出异常。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html b/en/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html new file mode 100644 index 0000000..271526f --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html @@ -0,0 +1,132 @@ + + + + + + + + + ReflectionFactory - kt | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    ReflectionFactory - kt

    Change Records

    v1.0.0 first

    Function Illustrate

    这是自定义 MemberClass 相关功能的查找匹配以及 invoke 的封装类。

    LazyClass - class

    open class LazyClass<T> internal constructor(
    +    private val instance: Any,
    +    private val initialize: Boolean,
    +    private val loader: ClassLoaderInitializer?
    +)
    +

    Change Records

    v1.2.0 added

    Function Illustrate

    懒装载 Class 实例。

    ClassLoader.listOfClasses - ext-method

    fun ClassLoader.listOfClasses(): List<String>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    写出当前 ClassLoader 下所有 Class 名称数组。

    Notice

    此方法在 Class 数量过多时会非常耗时。

    若要按指定规则查找一个 Class,请使用 ClassLoader.searchClass 方法。

    ClassLoader.searchClass - ext-method

    inline fun ClassLoader.searchClass(context: Context?, name: String, async: Boolean, initiate: ClassConditions): DexClassFinder.Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    通过当前 ClassLoader 按指定条件查找并得到 Dex 中的 Class

    Pay Attention

    此方法在 Class 数量过多及查找条件复杂时会非常耗时。

    建议启用 async 或设置 name 参数,name 参数将在当前 APP 不同版本中自动进行本地缓存以提升效率。

    如果使用了 asyncname 参数,则必须填写 context 参数。

    此功能尚在试验阶段,性能与稳定性可能仍然存在问题,使用过程遇到问题请向我们报告并帮助我们改进。

    Class.hasExtends - ext-field

    val Class<*>.hasExtends: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    当前 Class 是否有继承关系,父类是 Any 将被认为没有继承关系。

    Class?.extends - ext-method

    infix fun Class<*>?.extends(other: Class<*>?): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    当前 Class 是否继承于 other

    如果当前 Class 就是 other 也会返回 true

    如果当前 Classnullothernull 会返回 false

    Function Example

    你可以使用此方法来判断两个 Class 是否存在继承关系。

    The following example

    // 假设下面这两个 Class 就是你需要判断的 Class
    +val classA: Class<*>?
    +val classB: Class<*>?
    +// 判断 A 是否继承于 B
    +if (classA extends classB) {
    +    // Your code here.
    +}
    +

    Class?.notExtends - ext-method

    infix fun Class<*>?.notExtends(other: Class<*>?): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    当前 Class 是否不继承于 other

    此方法相当于 extends 的反向判断。

    Function Example

    你可以使用此方法来判断两个 Class 是否不存在继承关系。

    The following example

    // 假设下面这两个 Class 就是你需要判断的 Class
    +val classA: Class<*>?
    +val classB: Class<*>?
    +// 判断 A 是否不继承于 B
    +if (classA notExtends classB) {
    +    // Your code here.
    +}
    +

    Class?.implements - ext-method

    infix fun Class<*>?.implements(other: Class<*>?): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    当前 Class 是否实现了 other 接口类。

    如果当前 Classnullothernull 会返回 false

    Function Example

    你可以使用此方法来判断两个 Class 是否存在依赖关系。

    The following example

    // 假设下面这两个 Class 就是你需要判断的 Class
    +val classA: Class<*>?
    +val classB: Class<*>?
    +// 判断 A 是否实现了 B 接口类
    +if (classA implements classB) {
    +    // Your code here.
    +}
    +

    Class?.notImplements - ext-method

    infix fun Class<*>?.notImplements(other: Class<*>?): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    当前 Class 是否未实现 other 接口类。

    此方法相当于 implements 的反向判断。

    Function Example

    你可以使用此方法来判断两个 Class 是否不存在依赖关系。

    The following example

    // 假设下面这两个 Class 就是你需要判断的 Class
    +val classA: Class<*>?
    +val classB: Class<*>?
    +// 判断 A 是否未实现 B 接口类
    +if (classA notImplements classB) {
    +    // Your code here.
    +}
    +

    Class.toJavaPrimitiveType - ext-method

    fun Class<*>.toJavaPrimitiveType(): Class<*>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    自动转换当前 Class 为 Java 原始类型 (Primitive Type)。

    如果当前 Class 为 Java 或 Kotlin 基本类型将自动执行类型转换。

    当前能够自动转换的基本类型如下。

    • kotlin.Unit
    • java.lang.Void
    • java.lang.Boolean
    • java.lang.Integer
    • java.lang.Float
    • java.lang.Double
    • java.lang.Long
    • java.lang.Short
    • java.lang.Character
    • java.lang.Byte

    String.toClass - ext-method

    fun String.toClass(loader: ClassLoader?, initialize: Boolean): Class<*>
    +
    inline fun <reified T> String.toClass(loader: ClassLoader?, initialize: Boolean): Class<T>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    通过字符串类名转换为 loader 中的实体类。

    Function Example

    你可以直接填写你要查找的目标 Class,必须在默认 ClassLoader 下存在。

    The following example

    "com.example.demo.DemoClass".toClass()
    +

    你还可以自定义 Class 所在的 ClassLoader

    The following example

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +"com.example.demo.DemoClass".toClass(customClassLoader)
    +

    你还可以指定 Class 的目标类型。

    The following example

    // 指定的 DemoClass 必须存在或为可访问的 stub
    +"com.example.demo.DemoClass".toClass<DemoClass>()
    +

    你还可以设置在获取到这个 Class 时是否自动执行其默认的静态方法块,默认情况下不会执行。

    The following example

    // 获取并执行 DemoClass 默认的静态方法块
    +"com.example.demo.DemoClass".toClass(initialize = true)
    +

    默认的静态方法块在 Java 中使用如下方式定义。

    The following example

    public class DemoClass {
    +
    +    static {
    +        // 这里是静态方法块的内容
    +    }
    +
    +    public DemoClass() {
    +        // ...
    +    }
    +}
    +

    String.toClassOrNull - ext-method

    fun String.toClassOrNull(loader: ClassLoader?, initialize: Boolean): Class<*>?
    +
    inline fun <reified T> String.toClassOrNull(loader: ClassLoader?, initialize: Boolean): Class<T>?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    通过字符串类名转换为 loader 中的实体类。

    找不到 Class 会返回 null,不会抛出异常。

    Function Example

    用法请参考 String.toClass 方法。

    classOf - method

    inline fun <reified T> classOf(loader: ClassLoader?, initialize: Boolean): Class<T>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    通过 T 得到其 Class 实例并转换为实体类。

    Function Example

    我们要获取一个 Class 在 Kotlin 下不通过反射时应该这样做。

    The following example

    DemoClass::class.java
    +

    现在,你可以直接 cast 一个实例并获取它的 Class 对象,必须在当前 ClassLoader 下存在。

    The following example

    classOf<DemoClass>()
    +

    若目标存在的 Classstub,通过这种方式,你还可以自定义 Class 所在的 ClassLoader

    The following example

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +classOf<DemoClass>(customClassLoader)
    +

    lazyClass - method

    fun lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
    +
    inline fun <reified T> lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<T>
    +
    fun lazyClass(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
    +

    Change Records

    v1.0.3 added

    Function Illustrate

    懒装载 Class

    lazyClassOrNull - method

    fun lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
    +
    inline fun <reified T> lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<T>
    +
    fun lazyClassOrNull(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
    +

    Change Records

    v1.0.3 added

    Function Illustrate

    懒装载 Class

    String.hasClass - ext-method

    fun String.hasClass(loader: ClassLoader?): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    通过字符串类名使用指定的 ClassLoader 查找是否存在。

    Function Example

    你可以轻松的使用此方法判断字符串中的类是否存在,效果等同于直接使用 Class.forName

    The following example

    if("com.example.demo.DemoClass".hasClass()) {
    +    // Your code here.
    +}
    +

    填入方法中的 loader 参数可判断指定的 ClassLoader 中的 Class 是否存在。

    The following example

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +if("com.example.demo.DemoClass".hasClass(customClassLoader)) {
    +    // Your code here.
    +}
    +

    Class.hasField - ext-method

    inline fun Class<*>.hasField(initiate: FieldConditions): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    查找变量是否存在。

    Class.hasMethod - ext-method

    inline fun Class<*>.hasMethod(initiate: MethodConditions): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    查找方法是否存在。

    Class.hasConstructor - ext-method

    inline fun Class<*>.hasConstructor(initiate: ConstructorConditions): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    查找构造方法是否存在。

    Member.hasModifiers - ext-method

    inline fun Member.hasModifiers(conditions: ModifierConditions): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    查找 Member 中匹配的描述符。

    Class.hasModifiers - ext-method

    inline fun Class<*>.hasModifiers(conditions: ModifierConditions): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    查找 Class 中匹配的描述符。

    Class.field - ext-method

    inline fun Class<*>.field(initiate: FieldConditions): FieldFinder.Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    查找并得到变量。

    Class.method - ext-method

    inline fun Class<*>.method(initiate: MethodConditions): MethodFinder.Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    查找并得到方法。

    Class.constructor - ext-method

    inline fun Class<*>.constructor(initiate: ConstructorConditions): ConstructorFinder.Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    查找并得到构造方法。

    Class.generic - ext-method

    fun Class<*>.generic(): GenericClass?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前 Class 的泛型父类。

    如果当前实例不存在泛型将返回 null

    Class.generic - ext-method

    inline fun Class<*>.generic(initiate: GenericClass.() -> Unit): GenericClass?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前 Class 的泛型父类。

    如果当前实例不存在泛型将返回 null

    Any.current - ext-method

    inline fun <reified T : Any> T.current(ignored: Boolean): CurrentClass
    +
    inline fun <reified T : Any> T.current(ignored: Boolean, initiate: CurrentClass.() -> Unit): T
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前实例的类操作对象。

    Class.buildOf - ext-method

    inline fun Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): Any?
    +
    inline fun <T> Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): T?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    通过构造方法创建新实例,指定类型 T 或任意类型 Any

    Class.allMethods - ext-method

    inline fun Class<*>.allMethods(isAccessible: Boolean, result: (index: Int, method: Method) -> Unit)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    遍历当前类中的所有方法。

    Class.allConstructors - ext-method

    inline fun Class<*>.allConstructors(isAccessible: Boolean, result: (index: Int, constructor: Constructor<*>) -> Unit)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    遍历当前类中的所有构造方法。

    Class.allFields - ext-method

    inline fun Class<*>.allFields(isAccessible: Boolean, result: (index: Int, field: Field) -> Unit)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    遍历当前类中的所有变量。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html b/en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html new file mode 100644 index 0000000..ed0d173 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html @@ -0,0 +1,42 @@ + + + + + + + + + BaseFinder - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    BaseFinder - class

    abstract class BaseFinder
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    这是 ClassMember 查找类功能的基本类实现。

    BaseFinder.IndexTypeCondition - class

    inner class IndexTypeCondition internal constructor(private val type: IndexConfigType)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    字节码下标筛选实现类。

    index - method

    fun index(num: Int)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置下标。

    index 小于零则为倒序,此时可以使用 IndexTypeConditionSort.reverse 方法实现。

    可使用 IndexTypeConditionSort.firstIndexTypeConditionSort.last 设置首位和末位筛选条件。

    index - method

    fun index(): IndexTypeConditionSort
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到下标。

    IndexTypeConditionSort - class

    inner class IndexTypeConditionSort internal constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    字节码下标排序实现类。

    first - method

    fun first()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置满足条件的第一个。

    last - method

    fun last()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置满足条件的最后一个。

    reverse - method

    fun reverse(num: Int)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置倒序下标。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html b/en/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html new file mode 100644 index 0000000..22a0d06 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html @@ -0,0 +1,39 @@ + + + + + + + + + CountRules - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    CountRules - class

    class CountRules private constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个模糊 ClassMember 数组 (下标) 个数条件实现类。

    可对 R8 混淆后的 ClassMember 进行更加详细的定位。

    Int.isZero - i-ext-method

    fun Int.isZero(): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    是否为 0。

    Int.moreThan - i-ext-method

    fun Int.moreThan(count: Int): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    大于 count

    Int.lessThan - i-ext-method

    fun Int.lessThan(count: Int): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    小于 count

    Int.inInterval - i-ext-method

    fun Int.inInterval(countRange: IntRange): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    countRange 区间 A ≤ this ≤ B。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html b/en/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html new file mode 100644 index 0000000..90dba65 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html @@ -0,0 +1,47 @@ + + + + + + + + + ModifierRules - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    ModifierRules - class

    class ModifierRules private constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个 ClassMember 描述符条件实现类。

    可对 R8 混淆后的 ClassMember 进行更加详细的定位。

    isPublic - i-ext-field

    val isPublic: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    ClassMember 类型是否包含 public

    isPrivate - i-ext-field

    val isPrivate: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    ClassMember 类型是否包含 private

    isProtected - i-ext-field

    val isProtected: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    ClassMember 类型是否包含 protected

    isStatic - i-ext-field

    val isStatic: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    ClassMember 类型是否包含 static

    对于任意的静态 ClassMember 可添加此描述进行确定。

    Notice

    Kotlin → Jvm 后的 object 类中的方法并不是静态的。

    isFinal - i-ext-field

    val isFinal: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    ClassMember 类型是否包含 final

    Notice

    Kotlin → Jvm 后没有 open 符号标识的 ClassMember 和没有任何关联的 ClassMember 都将为 final

    isSynchronized - i-ext-field

    val isSynchronized: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    ClassMember 类型是否包含 synchronized

    isVolatile - i-ext-field

    val isVolatile: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Field 类型是否包含 volatile

    isTransient - i-ext-field

    val isTransient: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Field 类型是否包含 transient

    isNative - i-ext-field

    val isNative: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Method 类型是否包含 native

    对于任意 JNI 对接的 Method 可添加此描述进行确定。

    isInterface - i-ext-field

    val isInterface: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Class 类型是否包含 interface

    isAbstract - i-ext-field

    val isAbstract: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    ClassMember 类型是否包含 abstract

    对于任意的抽象 ClassMember 可添加此描述进行确定。

    isStrict - i-ext-field

    val isStrict: Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    ClassMember 类型是否包含 strictfp

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html b/en/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html new file mode 100644 index 0000000..451d8a4 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html @@ -0,0 +1,42 @@ + + + + + + + + + NameRules - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    NameRules - class

    class NameRules private constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个模糊 ClassMember 名称条件实现类。

    可对 R8 混淆后的 ClassMember 进行更加详细的定位。

    String.isSynthetic - i-ext-method

    fun String.isSynthetic(index: Int): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    是否为匿名类的主类调用对象。

    String.isOnlySymbols - i-ext-method

    fun String.isOnlySymbols(): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    是否只有符号。

    String.isOnlyLetters - i-ext-method

    fun String.isOnlyLetters(): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    是否只有字母。

    String.isOnlyNumbers - i-ext-method

    fun String.isOnlyNumbers(): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    是否只有数字。

    String.isOnlyLettersNumbers - i-ext-method

    fun String.isOnlyLettersNumbers(): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    是否只有字母或数字。

    String.isOnlyLowercase - i-ext-method

    fun String.isOnlyLowercase(): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    是否只有小写字母。

    在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。

    String.isOnlyUppercase - i-ext-method

    fun String.isOnlyUppercase(): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    是否只有大写字母。

    在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html b/en/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html new file mode 100644 index 0000000..ae5ed1f --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html @@ -0,0 +1,35 @@ + + + + + + + + + ObjectRules - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    ObjectRules - class

    class ObjectRules private constructor(private val instance: Any)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个任意对象条件实现类。

    可对 R8 混淆后的 ClassMember 进行更加详细的定位。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html b/en/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html new file mode 100644 index 0000000..ca067e8 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html @@ -0,0 +1,79 @@ + + + + + + + + + DexClassFinder - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    DexClassFinder - class

    class DexClassFinder internal constructor(
    +    private val context: Context?,
    +    internal var name: String,
    +    internal var async: Boolean,
    +    override val loaderSet: ClassLoader?
    +) : ClassBaseFinder
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Class 查找类。

    可使用 BaseDexClassLoader 通过指定条件查找指定 Class 或一组 Class

    Notice

    此功能尚在试验阶段,性能与稳定性可能仍然存在问题,使用过程遇到问题请向我们报告并帮助我们改进。

    companion object - object

    Change Records

    v1.0.0 first

    clearCache - method

    fun clearCache(context: Context, versionName: String?, versionCode: Long?)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    清除当前 DexClassFinderClass 缓存。

    适用于全部通过 ClassLoader.searchClass 获取的 DexClassFinder

    fullName - field

    var fullName: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 完整名称。

    只会查找匹配到的 Class.getName

    例如 com.demo.Test 需要填写 com.demo.Test

    simpleName - field

    var simpleName: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 简单名称。

    只会查找匹配到的 Class.getSimpleName

    例如 com.demo.Test 只需要填写 Test

    对于匿名类例如 com.demo.Test$InnerTest 会为空,此时你可以使用 singleName

    singleName - field

    var singleName: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 独立名称。

    设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

    例如 com.demo.Test 只需要填写 Test

    对于匿名类例如 com.demo.Test$InnerTest 只需要填写 Test$InnerTest

    from - method

    fun from(vararg name: String): FromPackageRules
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置在指定包名范围查找当前 Class

    设置后仅会在当前 name 开头匹配的包名路径下进行查找,可提升查找速度。

    例如 ↓

    com.demo.test

    com.demo.test.demo

    Notice

    建议设置此参数指定查找范围,否则 Class 过多时将会非常慢。

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 标识符筛选条件。

    可不设置筛选条件。

    fullName - method

    fun fullName(value: String): ClassNameRules
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 完整名称。

    只会查找匹配到的 Class.getName

    例如 com.demo.Test 需要填写 com.demo.Test

    simpleName - method

    fun simpleName(value: String): ClassNameRules
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 简单名称。

    只会查找匹配到的 Class.getSimpleName

    例如 com.demo.Test 只需要填写 Test

    对于匿名类例如 com.demo.Test$InnerTest 会为空,此时你可以使用 singleName

    singleName - method

    fun singleName(value: String): ClassNameRules
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 独立名称。

    设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

    例如 com.demo.Test 只需要填写 Test

    对于匿名类例如 com.demo.Test$InnerTest 只需要填写 Test$InnerTest

    fullName - method

    fun fullName(conditions: NameConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 完整名称条件。

    只会查找匹配到的 Class.getName

    simpleName - method

    fun simpleName(conditions: NameConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 简单名称条件。

    只会查找匹配到的 Class.getSimpleName

    singleName - method

    fun singleName(conditions: NameConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 独立名称条件。

    设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

    extends - method

    inline fun <reified T> extends()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 继承的父类。

    extends - method

    fun extends(vararg name: String)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 继承的父类。

    会同时查找 name 中所有匹配的父类。

    implements - method

    inline fun <reified T> implements()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 实现的接口类。

    implements - method

    fun implements(vararg name: String)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 实现的接口类。

    会同时查找 name 中所有匹配的接口类。

    anonymous - method

    fun anonymous()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    标识 Class 为匿名类。

    例如 com.demo.Test$1com.demo.Test$InnerTest

    标识后你可以使用 enclosing 来进一步指定匿名类的 (封闭类) 主类。

    noExtends - method

    fun noExtends()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 没有任何继承。

    此时 Class 只应该继承于 Any

    Notice

    设置此条件后 extends 将失效。

    noImplements - method

    fun noImplements()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 没有任何接口。

    Notice

    设置此条件后 implements 将失效。

    noSuper - method

    fun noSuper()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 没有任何继承与接口。

    此时 Class 只应该继承于 Any

    Notice

    设置此条件后 extendsimplements 将失效。

    enclosing - method

    inline fun <reified T> enclosing()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 匿名类的 (封闭类) 主类。

    enclosing - method

    fun enclosing(vararg name: String)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 匿名类的 (封闭类) 主类。

    会同时查找 name 中所有匹配的 (封闭类) 主类。

    FromPackageRules - class

    inner class FromPackageRules internal constructor(private val packages: MutableList<ClassRulesData.PackageRulesData>)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    包名范围名称过滤匹配条件实现类。

    absolute - method

    fun absolute()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置包名绝对匹配。

    例如有如下包名 ↓

    com.demo.test.a

    com.demo.test.a.b

    com.demo.test.active

    若包名条件为 com.demo.test.a 则绝对匹配仅能匹配到第一个。

    相反地,不设置以上示例会全部匹配。

    ClassNameRules - class

    inner class ClassNameRules internal constructor(private val name: ClassRulesData.NameRulesData)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    类名匹配条件实现类。

    optional - method

    fun optional()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置类名可选。

    例如有如下类名 ↓

    com.demo.Test fullName / Test simpleName

    defpackage.a fullName / a simpleName

    这两个类名都是同一个类,但是在有些版本中被混淆有些版本没有。

    此时可设置类名为 com.demo.Test fullName / Test simpleName

    这样就可在完全匹配类名情况下使用类名而忽略其它查找条件,否则忽略此条件继续使用其它查找条件。

    member - method

    inline fun member(initiate: MemberRules.() -> Unit): MemberRulesResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 满足的 Member 条件。

    field - method

    inline fun field(initiate: FieldRules.() -> Unit): MemberRulesResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 满足的 Field 条件。

    method - method

    inline fun method(initiate: MethodRules.() -> Unit): MemberRulesResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 满足的 Method 条件。

    constructor - method

    inline fun constructor(initiate: ConstructorRules.() -> Unit): MemberRulesResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Class 满足的 Constructor 条件。

    Result - class

    inner class Result internal constructor(internal var isNotFound: Boolean, internal var throwable: Throwable?) : BaseResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Class 查找结果实现类。

    result - method

    inline fun result(initiate: Result.() -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建监听结果事件方法体。

    get - method

    fun get(): Class<*>?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到 Class 本身。

    若有多个 Class 结果只会返回第一个。

    在查找条件找不到任何结果的时候将返回 null

    若你设置了 async 请使用 wait 方法。

    all - method

    fun all(): MutableList<Class<*>>
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    返回值类型由 HashSet 修改为 MutableList

    Function Illustrate

    得到 Class 本身数组。

    返回全部查找条件匹配的多个 Class 实例。

    在查找条件找不到任何结果的时候将返回空的 MutableList

    若你设置了 async 请使用 waitAll 方法。

    all - method

    fun all(result: (Class<*>) -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到 Class 本身数组 (依次遍历)。

    回调全部查找条件匹配的多个 Class 实例。

    在查找条件找不到任何结果的时候将不会执行。

    若你设置了 async 请使用 waitAll 方法。

    wait - method

    fun wait(result: (Class<*>?) -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到 Class 本身 (异步)。

    若有多个 Class 结果只会回调第一个。

    在查找条件找不到任何结果的时候将回调 null。

    你需要设置 async 后此方法才会被回调,否则请使用 get 方法。

    waitAll - method

    fun waitAll(result: (MutableList<Class<*>>) -> Unit): Result
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    result 类型由 HashSet 修改为 MutableList

    Function Illustrate

    得到 Class 本身数组 (异步)。

    回调全部查找条件匹配的多个 Class 实例。

    在查找条件找不到任何结果的时候将回调空的 MutableList

    你需要设置 async 后此方法才会被回调,否则请使用 all 方法。

    onNoClassDefFoundError - method

    fun onNoClassDefFoundError(result: (Throwable) -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    监听找不到 Class 时。

    ignored - method

    fun ignored(): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    忽略异常并停止打印任何错误日志。

    此时若要监听异常结果,你需要手动实现 onNoClassDefFoundError 方法。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html new file mode 100644 index 0000000..ce2c90f --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html @@ -0,0 +1,42 @@ + + + + + + + + + ConstructorRules - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    ConstructorRules - class

    class ConstructorRules internal constructor(private val rulesData: ConstructorRulesData) : BaseRules
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Constructor 查找条件实现类。

    paramCount - field

    var paramCount: Int
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

    若参数个数小于零则忽略并使用 param

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 标识符筛选条件。

    可不设置筛选条件。

    emptyParam - method

    fun emptyParam()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 空参数、无参数。

    param - method

    fun param(vararg paramType: Any)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数。

    如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

    如果 Constructor 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

    Pay Attention

    无参 Constructor 请使用 emptyParam 设置查找条件。

    有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

    param - method

    fun param(conditions: ObjectsConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数条件。

    Pay Attention

    无参 Constructor 请使用 emptyParam 设置查找条件。

    有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

    paramCount - method

    fun paramCount(numRange: IntRange)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数个数范围。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

    paramCount - method

    fun paramCount(conditions: CountConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数个数条件。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html new file mode 100644 index 0000000..12e4d0d --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html @@ -0,0 +1,40 @@ + + + + + + + + + FieldRules - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    FieldRules - class

    class FieldRules internal constructor(private val rulesData: FieldRulesData) : BaseRules
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Field 查找条件实现类。

    name - field

    var name: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 名称。

    type - field

    var type: Any?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 类型。

    可不填写类型。

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 标识符筛选条件。

    可不设置筛选条件。

    name - method

    fun name(conditions: NameConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 名称条件。

    type - method

    fun type(conditions: ObjectConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 类型条件。

    可不填写类型。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html new file mode 100644 index 0000000..5fa93fe --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html @@ -0,0 +1,36 @@ + + + + + + + + + MemberRules - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    MemberRules - class

    class MemberRules internal constructor(private val rulesData: MemberRulesData) : BaseRules
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Member 查找条件实现类。

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Member 标识符筛选条件。

    可不设置筛选条件。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html new file mode 100644 index 0000000..384c409 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html @@ -0,0 +1,46 @@ + + + + + + + + + MethodRules - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    MethodRules - class

    class MethodRules internal constructor(private val rulesData: MethodRulesData) : BaseRules
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Method 查找条件实现类。

    name - field

    var name: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 名称。

    paramCount - field

    var paramCount: Int
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

    若参数个数小于零则忽略并使用 param

    returnType - field

    var returnType: Any?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 返回值。

    可不填写返回值。

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 标识符筛选条件。

    可不设置筛选条件。

    emptyParam - method

    fun emptyParam()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 空参数、无参数。

    param - method

    fun param(vararg paramType: Any)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数。

    如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

    如果 Method 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

    Pay Attention

    无参 Method 请使用 emptyParam 设置查找条件。

    有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

    param - method

    fun param(conditions: ObjectsConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数条件。

    Pay Attention

    无参 Method 请使用 emptyParam 设置查找条件。

    有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

    name - method

    fun name(conditions: NameConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 名称条件。

    paramCount - method

    fun paramCount(numRange: IntRange)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数个数范围。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

    paramCount - method

    fun paramCount(conditions: CountConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数个数条件。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

    returnType - method

    fun returnType(conditions: ObjectConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 返回值条件。

    可不填写返回值。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html new file mode 100644 index 0000000..148846c --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html @@ -0,0 +1,39 @@ + + + + + + + + + MemberRulesResult - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    MemberRulesResult - class

    class MemberRulesResult internal constructor(private val rulesData: MemberRulesData)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    当前 Member 查找条件结果实现类。

    none - method

    fun none(): MemberRulesResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置当前 Member 在查找条件中个数为 0

    count - method

    fun count(num: Int): MemberRulesResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置当前 Member 在查找条件中需要全部匹配的个数。

    count - method

    fun count(numRange: IntRange): MemberRulesResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置当前 Member 在查找条件中需要全部匹配的个数范围。

    count - method

    fun count(conditions: CountConditions): MemberRulesResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置当前 Member 在查找条件中需要全部匹配的个数条件。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html b/en/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html new file mode 100644 index 0000000..9f2faea --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html @@ -0,0 +1,99 @@ + + + + + + + + + ConstructorFinder - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    ConstructorFinder - class

    class ConstructorFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Constructor 查找类。

    可通过指定类型查找指定 Constructor 或一组 Constructor

    paramCount - field

    var paramCount: Int
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

    若参数个数小于零则忽略并使用 param

    modifiers - method

    fun modifiers(conditions: ModifierConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 标识符筛选条件。

    可不设置筛选条件,默认模糊查找并取第一个匹配的 Constructor

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    emptyParam - method

    fun emptyParam(): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 空参数、无参数。

    param - method

    fun param(vararg paramType: Any): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数。

    如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

    如果 Constructor 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

    Pay Attention

    无参 Constructor 请使用 emptyParam 设置查找条件。

    有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    param - method

    fun param(conditions: ObjectsConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数条件。

    Pay Attention

    无参 Constructor 请使用 emptyParam 设置查找条件。

    有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(num: Int): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数。

    若参数个数小于零则忽略并使用 param

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(numRange: IntRange): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数个数范围。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(conditions: CountConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Constructor 参数个数条件。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    superClass - method

    fun superClass(isOnlySuperClass: Boolean)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置在 classSet 的所有父类中查找当前 Constructor

    Notice

    若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

    RemedyPlan - class

    inner class RemedyPlan internal constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Constructor 重查找实现类,可累计失败次数直到查找成功。

    constructor - method

    inline fun constructor(initiate: ConstructorConditions)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建需要重新查找的 Constructor

    你可以添加多个备选 Constructor,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

    Result - class

    inner class Result internal constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    RemedyPlan 结果实现类。

    onFind - method

    fun onFind(initiate: MutableList<Constructor<*>>.() -> Unit)
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    initiate 类型由 HashSet 修改为 MutableList

    Function Illustrate

    当在 RemedyPlan 中找到结果时。

    Function Example

    你可以方便地对重查找的 Constructor 实现 onFind 方法。

    The following example

    constructor {
    +    // Your code here.
    +}.onFind {
    +    // Your code here.
    +}
    +

    Result - class

    inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Constructor 查找结果实现类。

    result - method

    inline fun result(initiate: Result.() -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建监听结果事件方法体。

    Function Example

    你可以使用 lambda 形式创建 Result 类。

    The following example

    constructor {
    +    // Your code here.
    +}.result {
    +    get().call()
    +    all()
    +    remedys {}
    +    onNoSuchConstructor {}
    +}
    +

    get - method

    fun get(): Instance
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得 Constructor 实例处理类。

    若有多个 Constructor 结果只会返回第一个。

    Pay Attention

    若你设置了 remedys 请使用 wait 回调结果方法。

    Function Example

    你可以通过获得方法所在实例来执行构造方法创建新的实例对象。

    The following example

    constructor {
    +    // Your code here.
    +}.get().call()
    +

    你可以 cast 构造方法为指定类型的实例对象。

    The following example

    constructor {
    +    // Your code here.
    +}.get().newInstance<TestClass>()
    +

    Pay Attention

    若构造方法含有参数则后方参数必填。

    The following example

    constructor {
    +    // Your code here.
    +}.get().newInstance<TestClass>("param1", "param2")
    +

    all - method

    fun all(): MutableList<Instance>
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    返回值类型由 ArrayList 修改为 MutableList

    Function Illustrate

    获得 Constructor 实例处理类数组。

    返回全部查找条件匹配的多个 Constructor 实例结果。

    Function Example

    你可以通过此方法来获得当前条件结果中匹配的全部 Constructor

    The following example

    constructor {
    +    // Your code here.
    +}.all().forEach { instance ->
    +    instance.call(...)
    +}
    +

    give - method

    fun give(): Constructor<*>?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到 Constructor 本身。

    若有多个 Constructor 结果只会返回第一个。

    在查找条件找不到任何结果的时候将返回 null

    giveAll - method

    fun giveAll(): MutableList<Constructor<*>>
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    返回值类型由 HashSet 修改为 MutableList

    Function Illustrate

    得到 Constructor 本身数组。

    返回全部查找条件匹配的多个 Constructor 实例。

    在查找条件找不到任何结果的时候将返回空的 MutableList

    wait - method

    fun wait(initiate: Instance.() -> Unit)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得 Constructor 实例处理类,配合 RemedyPlan 使用。

    若有多个 Constructor 结果只会返回第一个。

    Pay Attention

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    waitAll - method

    fun waitAll(initiate: MutableList<Instance>.() -> Unit)
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    initiate 类型由 ArrayList 修改为 MutableList

    Function Illustrate

    获得 Constructor 实例处理类数组,配合 RemedyPlan 使用。

    返回全部查找条件匹配的多个 Constructor 实例结果。

    Pay Attention

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    remedys - method

    inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建 Constructor 重查找功能。

    Function Example

    当你遇到一种 Constructor 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchConstructor 捕获异常二次查找 Constructor

    若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

    The following example

    constructor {
    +    // Your code here.
    +}.remedys {
    +    constructor {
    +        // Your code here.
    +    }
    +    constructor {
    +        // Your code here.
    +    }
    +}
    +

    onNoSuchConstructor - method

    inline fun onNoSuchConstructor(result: (Throwable) -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    监听找不到 Constructor 时。

    只会返回第一次的错误信息,不会返回 RemedyPlan 的错误信息。

    ignored - method

    fun ignored(): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    忽略异常并停止打印任何错误日志。

    Notice

    此时若要监听异常结果,你需要手动实现 onNoSuchConstructor 方法。

    Instance - class

    inner class Instance internal constructor(private val constructor: Constructor<*>?)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Constructor 实例处理类。

    call - method

    fun call(vararg args: Any?): Any?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Constructor 创建目标实例,不指定目标实例类型。

    newInstance - method

    fun <T> newInstance(vararg args: Any?): T?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Constructor 创建目标实例 ,指定 T 目标实例类型。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html b/en/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html new file mode 100644 index 0000000..0e7f492 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html @@ -0,0 +1,117 @@ + + + + + + + + + FieldFinder - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    FieldFinder - class

    class FieldFinder internal constructor(override val classSet: Class<*>?) : MemberBaseFinder
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Field 查找类。

    可通过指定类型查找指定 Field 或一组 Field

    name - field

    var name: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 名称。

    Pay Attention

    若不填写名称则必须存在一个其它条件。

    type - field

    var type: Any?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 类型。

    可不填写类型。

    modifiers - method

    fun modifiers(conditions: ModifierConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 标识符筛选条件。

    可不设置筛选条件。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    order - method

    fun order(): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    顺序筛选字节码的下标。

    name - method

    fun name(value: String): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 名称。

    Pay Attention

    若不填写名称则必须存在一个其它条件。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    name - method

    fun name(conditions: NameConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 名称条件。

    Pay Attention

    若不填写名称则必须存在一个其它条件。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    type - method

    fun type(value: Any): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 类型。

    可不填写类型。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    type - method

    fun type(conditions: ObjectConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Field 类型条件。

    可不填写类型。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    superClass - method

    fun superClass(isOnlySuperClass: Boolean)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置在 classSet 的所有父类中查找当前 Field

    Notice

    若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

    RemedyPlan - class

    inner class RemedyPlan internal constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Field 重查找实现类,可累计失败次数直到查找成功。

    field - method

    inline fun field(initiate: FieldConditions): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建需要重新查找的 Field

    你可以添加多个备选 Field,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

    Result - class

    inner class Result internal constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    RemedyPlan 结果实现类。

    onFind - method

    fun onFind(initiate: MutableList<Field>.() -> Unit)
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    initiate 类型由 HashSet 修改为 MutableList

    Function Illustrate

    当在 RemedyPlan 中找到结果时。

    Function Example

    你可以方便地对重查找的 Field 实现 onFind 方法。

    The following example

    field {
    +    // Your code here.
    +}.onFind {
    +    // Your code here.
    +}
    +

    Result - class

    inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Field 查找结果实现类。

    result - method

    inline fun result(initiate: Result.() -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建监听结果事件方法体。

    Function Example

    你可以使用 lambda 形式创建 Result 类。

    The following example

    field {
    +    // Your code here.
    +}.result {
    +    get(instance).set("something")
    +    get(instance).string()
    +    get(instance).cast<CustomClass>()
    +    get().boolean()
    +    all(instance)
    +    give()
    +    giveAll()
    +    onNoSuchField {}
    +}
    +

    get - method

    fun get(instance: Any?): Instance
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得 Field 实例处理类。

    若有多个 Field 结果只会返回第一个。

    Function Example

    你可以轻松地得到 Field 的实例以及使用它进行设置实例。

    The following example

    field {
    +    // Your code here.
    +}.get(instance).set("something")
    +

    如果你取到的是静态 Field,可以不需要设置实例。

    The following example

    field {
    +    // Your code here.
    +}.get().set("something")
    +

    all - method

    fun all(instance: Any?): MutableList<Instance>
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    返回值类型由 ArrayList 修改为 MutableList

    Function Illustrate

    获得 Field 实例处理类数组。

    返回全部查找条件匹配的多个 Field 实例结果。

    Function Example

    你可以通过此方法来获得当前条件结果中匹配的全部 Field,其 Field 所在实例用法与 get 相同。

    The following example

    field {
    +    // Your code here.
    +}.all(instance).forEach { instance ->
    +    instance.self
    +}
    +

    give - method

    fun give(): Field?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到 Field 本身。

    若有多个 Field 结果只会返回第一个。

    在查找条件找不到任何结果的时候将返回 null

    giveAll - method

    fun giveAll(): MutableList<Field>
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    返回值类型由 HashSet 修改为 MutableList

    Function Illustrate

    得到 Field 本身数组。

    返回全部查找条件匹配的多个 Field 实例。

    在查找条件找不到任何结果的时候将返回空的 MutableList

    wait - method

    fun wait(instance: Any?, initiate: Instance.() -> Unit)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得 Field 实例处理类,配合 RemedyPlan 使用。

    若有多个 Field 结果只会返回第一个。

    Pay Attention

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    waitAll - method

    fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
    +

    Change Records

    v1.0.0 first

    v1.0.3 modified

    initiate 类型由 ArrayList 修改为 MutableList

    Function Illustrate

    获得 Field 实例处理类数组,配合 RemedyPlan 使用。

    返回全部查找条件匹配的多个 Field 实例结果。

    Pay Attention

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    remedys - method

    inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建 Field 重查找功能。

    Function Example

    当你遇到一种 Field 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchField 捕获异常二次查找 Field

    若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

    The following example

    field {
    +    // Your code here.
    +}.remedys {
    +    field {
    +        // Your code here.
    +    }
    +    field {
    +        // Your code here.
    +    }
    +}
    +

    onNoSuchField - method

    fun onNoSuchField(result: (Throwable) -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    监听找不到 Field 时。

    ignored - method

    fun ignored(): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    忽略异常并停止打印任何错误日志。

    Notice

    此时若要监听异常结果,你需要手动实现 onNoSuchField 方法。

    Instance - class

    inner class Instance internal constructor(private val instance: Any?, private val field: Field?)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Field 实例变量处理类。

    current - method

    fun current(ignored: Boolean): CurrentClass?
    +
    inline fun current(ignored: Boolean, initiate: CurrentClass.() -> Unit): Any?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得当前 Field 自身 self 实例的类操作对象 CurrentClass

    cast - method

    fun <T> cast(): T?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field 实例。

    byte - method

    fun byte(): Byte?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Byte 实例。

    int - method

    fun int(): Int
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Int 实例。

    long - method

    fun long(): Long
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Long 实例。

    short - method

    fun short(): Short
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Short 实例。

    double - method

    fun double(): Double
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Double 实例。

    float - method

    fun float(): Float
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Float 实例。

    string - method

    fun string(): String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field String 实例。

    char - method

    fun char(): Char
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Char 实例。

    boolean - method

    fun boolean(): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Boolean 实例。

    any - method

    fun any(): Any?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Any 实例。

    array - method

    inline fun <reified T> array(): Array<T>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field Array 实例。

    list - method

    inline fun <reified T> list(): List<T>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到当前 Field List 实例。

    set - method

    fun set(any: Any?)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置当前 Field 实例。

    setTrue - method

    fun setTrue()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置当前 Field 实例为 true

    Pay Attention

    请确保实例对象类型为 Boolean

    setFalse - method

    fun setFalse()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置当前 Field 实例为 false

    Pay Attention

    请确保实例对象类型为 Boolean

    setNull - method

    fun setNull()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置当前 Field 实例为 null

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html b/en/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html new file mode 100644 index 0000000..b77f2af --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html @@ -0,0 +1,114 @@ + + + + + + + + + MethodFinder - class | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    MethodFinder - class

    class MethodFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Method 查找类。

    可通过指定类型查找指定 Method 或一组 Method

    name - field

    var name: String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 名称。

    Pay Attention

    若不填写名称则必须存在一个其它条件。

    paramCount - field

    var paramCount: Int
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

    若参数个数小于零则忽略并使用 param

    returnType - field

    var returnType: Any?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 返回值,可不填写返回值。

    modifiers - method

    fun modifiers(conditions: ModifierConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 标识符筛选条件。

    可不设置筛选条件。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    emptyParam - method

    fun emptyParam(): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 空参数、无参数。

    param - method

    fun param(vararg paramType: Any): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数。

    如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

    如果 Method 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

    Pay Attention

    无参 Method 请使用 emptyParam 设置查找条件。

    有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    param - method

    fun param(conditions: ObjectsConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数条件。

    Pay Attention

    无参 Method 请使用 emptyParam 设置查找条件。

    有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    order - method

    fun order(): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    顺序筛选字节码的下标。

    name - method

    fun name(value: String): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 名称。

    Pay Attention

    若不填写名称则必须存在一个其它条件。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    name - method

    fun name(conditions: NameConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 名称条件。

    Pay Attention

    若不填写名称则必须存在一个其它条件。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(num: Int): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数。

    若参数个数小于零则忽略并使用 param

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(numRange: IntRange): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数个数范围。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(conditions: CountConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 参数个数条件。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    returnType - method

    fun returnType(value: Any): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 返回值。

    可不填写返回值。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    returnType - method

    fun returnType(conditions: ObjectConditions): IndexTypeCondition
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置 Method 返回值条件。

    可不填写返回值。

    Pay Attention

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    superClass - method

    fun superClass(isOnlySuperClass: Boolean)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    设置在 classSet 的所有父类中查找当前 Method

    Notice

    若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

    RemedyPlan - class

    inner class RemedyPlan internal constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Method 重查找实现类,可累计失败次数直到查找成功。

    method - method

    inline fun method(initiate: MethodConditions): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建需要重新查找的 Method

    你可以添加多个备选 Method,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

    Result - class

    inner class Result internal constructor()
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    RemedyPlan 结果实现类。

    onFind - method

    fun onFind(initiate: MutableList<Method>.() -> Unit)
    +

    Change Records

    v1.0.0 first

    v1.0.3 修改

    initiate 类型由 HashSet 修改为 MutableList

    Function Illustrate

    当在 RemedyPlan 中找到结果时。

    Function Example

    你可以方便地对重查找的 Method 实现 onFind 方法。

    The following example

    method {
    +    // Your code here.
    +}.onFind {
    +    // Your code here.
    +}
    +

    Result - class

    inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Method 查找结果实现类。

    result - method

    inline fun result(initiate: Result.() -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建监听结果事件方法体。

    Function Example

    你可以使用 lambda 形式创建 Result 类。

    The following example

    method {
    +    // Your code here.
    +}.result {
    +    get(instance).call()
    +    all(instance)
    +    remedys {}
    +    onNoSuchMethod {}
    +}
    +

    get - method

    fun get(instance: Any?): Instance
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得 Method 实例处理类。

    若有多个 Method 结果只会返回第一个。

    Pay Attention

    若你设置了 remedys 请使用 wait 回调结果方法。

    Function Example

    你可以通过获得方法所在实例来执行 Method

    The following example

    method {
    +    // Your code here.
    +}.get(instance).call()
    +

    若当前为静态方法,你可以不设置实例。

    The following example

    method {
    +    // Your code here.
    +}.get().call()
    +

    all - method

    fun all(instance: Any?): MutableList<Instance>
    +

    Change Records

    v1.0.0 first

    v1.0.3 修改

    返回值类型由 ArrayList 修改为 MutableList

    Function Illustrate

    获得 Method 实例处理类数组。

    返回全部查找条件匹配的多个 Method 实例结果。

    Function Example

    你可以通过此方法来获得当前条件结果中匹配的全部 Method,其方法所在实例用法与 get 相同。

    The following example

    method {
    +    // Your code here.
    +}.all(instance).forEach { instance ->
    +    instance.call(...)
    +}
    +

    give - method

    fun give(): Method?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到 Method 本身。

    若有多个 Method 结果只会返回第一个。

    在查找条件找不到任何结果的时候将返回 null

    giveAll - method

    fun giveAll(): MutableList<Method>
    +

    Change Records

    v1.0.0 first

    v1.0.3 修改

    返回值类型由 HashSet 修改为 MutableList

    Function Illustrate

    得到 Method 本身数组。

    返回全部查找条件匹配的多个 Method 实例。

    在查找条件找不到任何结果的时候将返回空的 MutableList

    wait - method

    fun wait(instance: Any?, initiate: Instance.() -> Unit)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    获得 Method 实例处理类,配合 RemedyPlan 使用。

    若有多个 Method 结果只会返回第一个。

    Pay Attention

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    waitAll - method

    fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
    +

    Change Records

    v1.0.0 first

    v1.0.3 修改

    initiate 类型由 ArrayList 修改为 MutableList

    Function Illustrate

    获得 Method 实例处理类数组,配合 RemedyPlan 使用。

    返回全部查找条件匹配的多个 Method 实例结果。

    Pay Attention

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    remedys - method

    inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    创建 Method 重查找功能。

    Function Example

    当你遇到一种 Method 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchMethod 捕获异常二次查找 Method

    若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

    The following example

    method {
    +    // Your code here.
    +}.remedys {
    +    method {
    +        // Your code here.
    +    }
    +    method {
    +        // Your code here.
    +    }
    +}
    +

    onNoSuchMethod - method

    inline fun onNoSuchMethod(result: (Throwable) -> Unit): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    监听找不到 Method 时。

    只会返回第一次的错误信息,不会返回 RemedyPlan 的错误信息。

    ignored - method

    fun ignored(): Result
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    忽略异常并停止打印任何错误日志。

    Notice

    此时若要监听异常结果,你需要手动实现 onNoSuchMethod 方法。

    Instance - class

    inner class Instance internal constructor(private val instance: Any?, private val method: Method?)
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    Method 实例处理类。

    call - method

    fun call(vararg args: Any?): Any?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,不指定返回值类型。

    invoke - method

    fun <T> invoke(vararg args: Any?): T?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 T 返回值类型。

    byte - method

    fun byte(vararg args: Any?): Byte?
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 Byte 返回值类型。

    int - method

    fun int(vararg args: Any?): Int
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 Int 返回值类型。

    long - method

    fun long(vararg args: Any?): Long
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 Long 返回值类型。

    short - method

    fun short(vararg args: Any?): Short
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 Short 返回值类型。

    double - method

    fun double(vararg args: Any?): Double
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 Double 返回值类型。

    float - method

    fun float(vararg args: Any?): Float
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 Float 返回值类型。

    string - method

    fun string(vararg args: Any?): String
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 String 返回值类型。

    char - method

    fun char(vararg args: Any?): Char
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 Char 返回值类型。

    boolean - method

    fun boolean(vararg args: Any?): Boolean
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 Boolean 返回值类型。

    array - method

    inline fun <reified T> array(vararg args: Any?): Array<T>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 Array 返回值类型。

    list - method

    inline fun <reified T> list(vararg args: Any?): List<T>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    执行 Method,指定 List 返回值类型。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/log/YLog.html b/en/api/public/com/highcapable/yukireflection/log/YLog.html new file mode 100644 index 0000000..5016c7c --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/log/YLog.html @@ -0,0 +1,38 @@ + + + + + + + + + YLog - object | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    YLog - object

    object YLog
    +

    Change Records

    v1.0.3 added

    Function Illustrate

    全局 Log 管理类。

    Configs - object

    object Configs
    +

    Change Records

    v1.0.3 added

    Function Illustrate

    配置 YLog

    tag - field

    var tag: String
    +

    Change Records

    v1.0.3 added

    Function Illustrate

    这是一个调试日志的全局标识。

    默认文案为 YukiReflection

    你可以修改为你自己的文案。

    isEnable - field

    var isEnable: Boolean
    +

    Change Records

    v1.0.3 added

    Function Illustrate

    是否启用调试日志的输出功能。

    关闭后将会停用 YukiReflection 对全部日志的输出。

    isEnable 关闭后 YukiReflection.Configs.isDebug 也将同时关闭。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html b/en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html new file mode 100644 index 0000000..306158a --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html @@ -0,0 +1,34 @@ + + + + + + + + + ComponentTypeFactory - kt | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    ComponentTypeFactory - kt

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个预置反射类型的常量类,主要为 Android 相关组件的 Class 内容,跟随版本更新会逐一进行增加。

    详情可 点击这里open in new window 进行查看。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html b/en/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html new file mode 100644 index 0000000..4888070 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html @@ -0,0 +1,34 @@ + + + + + + + + + GraphicsTypeFactory - kt | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    GraphicsTypeFactory - kt

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个预置反射类型的常量类,主要为 Android 相关 GraphicsClass 内容,跟随版本更新会逐一进行增加。

    详情可 点击这里open in new window 进行查看。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html b/en/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html new file mode 100644 index 0000000..4618491 --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html @@ -0,0 +1,34 @@ + + + + + + + + + ViewTypeFactory - kt | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    ViewTypeFactory - kt

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个预置反射类型的常量类,主要为 Android 相关 WidgetClass 内容,跟随版本更新会逐一进行增加。

    详情可 点击这里open in new window 进行查看。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html b/en/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html new file mode 100644 index 0000000..241499c --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html @@ -0,0 +1,35 @@ + + + + + + + + + DefinedTypeFactory - kt | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    DefinedTypeFactory - kt

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个内部类型的定义常量类,主要用于反射 API 相关用法的延伸。

    VagueType - field

    val VagueType: Class<*>
    +

    Change Records

    v1.0.0 first

    Function Illustrate

    得到模糊类型。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html b/en/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html new file mode 100644 index 0000000..706b96b --- /dev/null +++ b/en/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html @@ -0,0 +1,34 @@ + + + + + + + + + VariableTypeFactory - kt | Yuki Reflection + + + + + +

    Notice

    The English translation of this page has not been completed, you are welcome to contribute translations to us.

    You can use the Chrome Translation Plugin to translate entire pages for reference.

    VariableTypeFactory - kt

    Change Records

    v1.0.0 first

    Function Illustrate

    这是一个预置反射类型的常量类,主要为 Java 相关基本变量类型的 Class 内容,跟随版本更新会逐一进行增加。

    详情可 点击这里open in new window 进行查看。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/config/api-example.html b/en/config/api-example.html new file mode 100644 index 0000000..b5328af --- /dev/null +++ b/en/config/api-example.html @@ -0,0 +1,67 @@ + + + + + + + + + API Basic Configs | Yuki Reflection + + + + + +

    API Basic Configs

    The basic configuration method of YukiReflection is introduced here.

    YukiReflection can be used directly without some complex configuration, and does not conflict with Java's native Reflection API.

    You can configure some functions of YukiReflection before using it.

    Get the API Tag & Version

    You can get the current tag and version of YukiReflection as follows.

    The following example

    // Get the tag
    +val tag = YukiReflection.TAG
    +// Get the version
    +val version = YukiReflection.VERSION
    +

    You can judge the difference between different versions or display it in the about information by obtaining the version.

    Tips

    For more functions, please refer to YukiReflection.

    You can configure related functions through YukiReflection.configs { ... } method or YukiReflection.Configs.

    Custom Debug Log Tag

    You can use the following methods to customize the tag of the debug log.

    Logs inside the API will be printed using this tag.

    The following example

    // Via the configs method
    +YukiReflection.configs {
    +    debugLog {
    +        tag = "YourCustomTag"
    +    }
    +}
    +// Set directly
    +YLog.Configs.tag = "YourCustomTag"
    +

    Enable or Disable Debug Mode

    You can use the following methods to enable or disable Debug mode.

    The Debug mode is disabled by default, and when enabled, detailed logs (such as the time spent on the reflective search function) will be printed to the console.

    The following example

    // Via the configs method
    +YukiReflection.configs {
    +    isDebug = true
    +}
    +// Set directly
    +YukiReflection.Configs.isDebug = true
    +

    Enable or Disable Debug Logs

    You can use the following methods to enable or disable debug logs.

    This function is enabled by default, and disable will stop YukiReflection output all logs.

    The following example

    // Via the configs method
    +YukiReflection.configs {
    +    debugLog {
    +        isEnable = true
    +    }
    +}
    +// Set directly
    +YLog.Configs.isEnable = true
    +

    Use the configs Method to Configure

    In order to configure multiple features at once, you can directly use the YukiReflection.configs { ... } method to configure.

    The following example

    YukiReflection.configs {
    +    debugLog {
    +        tag = "YourCustomTag"
    +        isEnable = true
    +    }
    +    isDebug = true
    +}
    +

    Tips

    For more functions, please refer to YukiReflection.configs method, YukiReflection.Configs.

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/config/api-exception.html b/en/config/api-exception.html new file mode 100644 index 0000000..87500a7 --- /dev/null +++ b/en/config/api-exception.html @@ -0,0 +1,116 @@ + + + + + + + + + API Exception Handling | Yuki Reflection + + + + + +

    API Exception Handling

    Exceptions are the main problems often encountered in the development process. Here are some common exceptions that may be encountered during the use of YukiReflection and how to deal with them.

    The exception description here will only synchronize the latest API version, and the exception of the older API version will not be described again, please always keep the API version up-to-date.

    Non-Blocking Exceptions

    These exceptions will not cause the app to stop running (FC), but will print E level logs on the console, and may also stop continuing to execute related functions.

    exception

    loggerE

    Method/Constructor/Field match type "TYPE" not allowed

    Abnormal

    A disallowed parameter type was set when looking up methods, constructors, and variables.

    The following example

    // Find a method
    +method {
    +    //  Invalid type example is set
    +    param(false, 1, 0)
    +    //  Invalid type example is set
    +    returnType = false
    +}
    +
    +// Find a variable
    +field {
    +    //  Invalid type example is set
    +    type = false
    +}
    +

    Solution

    In the search, param, returnType, type only accept Class, String, VariousClass types, and parameter instances cannot be passed in.

    The following example

    // Find a method
    +method {
    +    // ✅ Examples of correct usage
    +    param(BooleanType, IntType, IntType)
    +    // ✅ Examples of correct usage
    +    returnType = BooleanType
    +    // ✅ The following scheme is also correct
    +    returnType = "java.lang.Boolean"
    +}
    +
    +// Find a variable
    +field {
    +    // ✅ Examples of correct usage
    +    type = BooleanType
    +}
    +
    exception

    loggerE

    NoSuchMethod/NoSuchConstructor/NoSuchField happend in [NAME]

    Abnormal

    The target method, constructor, and variable were not found when looking for methods, constructors, and variables.

    Solution

    Please confirm that your search criteria can correctly match the specified methods, constructors and variables in the target Class.

    exception

    loggerE

    Trying COUNT times and all failure by RemedyPlan

    Abnormal

    When using RemedyPlan to search for methods, constructors, and variables, the methods, constructors, and variables are still not found.

    Solution

    Please confirm the RemedyPlan parameter you set and the Class that exists in the current app, and try again.

    exception

    loggerE

    Can't find this Class in [CLASSLOADER]: CONTENT Generated by YukiReflection#ReflectionTool

    Abnormal

    The Class object to be searched for was not found via ClassLoader.searchClass.

    The following example

    customClassLoader?.searchClass {
    +    from(...)
    +    // ...
    +}.get()
    +

    Solution

    This is a security exception, please check the conditions you set, use the relevant tools to view the Class and bytecode object characteristics in the Dex and try again.

    exception

    loggerE

    Can't find this Method/Constructor/Field in [CLASS]: CONTENT Generated by YukiReflection#ReflectionTool

    Abnormal

    The methods, constructors, and variables that need to be found cannot be found by specifying conditions.

    The following example

    TargetClass.method {
    +    name = "test"
    +    param(BooleanType)
    +}
    +

    Solution

    This is a security exception, please check the conditions you set, use the relevant tools to view the bytecode object characteristics in the Class, and try again.

    exception

    loggerE

    The number of VagueType must be at least less than the count of paramTypes

    Abnormal

    Incorrect use of VagueType in Method, Constructor lookup conditions.

    The following example

    TargetClass.method {
    +    name = "test"
    +    // <Scenario 1>
    +    param(VagueType)
    +    // <Scenario 2>
    +    param(VagueType, VagueType ...)
    +}
    +

    Solution

    VagueType cannot be completely filled in method and constructor parameters. If there is such a requirement, please use paramCount.

    exception

    loggerE

    Field match type class is not found

    Abnormal

    An instance of Class for type was not found in the lookup criteria set when looking up the variable.

    The following example

    field {
    +    name = "test"
    +    // Assume that the Class of the type set here does not exist
    +    type = "com.example.TestClass"
    +}
    +

    Solution

    Please check if Class of type in the lookup condition exists and try again.

    exception

    loggerE

    Method match returnType class is not found

    Abnormal

    An instance of Class of returnType was not found in the search criteria set when looking up the method.

    The following example

    method {
    +    name = "test"
    +    // Assume that the Class of returnType set here does not exist
    +    returnType = "com.example.TestClass"
    +}
    +

    Solution

    Please check if Class of returnType in the lookup condition exists and try again.

    exception

    loggerE

    Method/Constructor match paramType[INDEX] class is not found

    Abnormal

    The Class instance subscripted by the index number of param was not found in the search conditions set when searching for methods and constructors.

    method {
    +    name = "test"
    +    // Assume that the Class with subscript "No.1" set here does not exist
    +    param(StringClass, "com.example.TestClass", BooleanType)
    +}
    +

    Solution

    Please check if the Class subscripted by the index number of param in the lookup condition exists and try again.

    Blocking Exceptions

    These exceptions will directly cause the app to stop running (FC), at the same time print E level logs on the console.

    exception

    NoClassDefFoundError

    Can't find this Class in [CLASSLOADER]: CONTENT Generated by YukiReflection#ReflectionTool

    Abnormal

    The Class object you were looking for was not found via String.toClass(...) or classOf<...>().

    The following example

    "com.demo.Test".toClass()
    +

    Solution

    Please check if the Class matched by the current string or entity exists in the current ClassLoader and try again.

    exception

    IllegalStateException

    ClassLoader [CLASSLOADER] is not a DexClassLoader

    Abnormal

    Use ClassLoader.searchClass to find Class but currently ClassLoader does not extends BaseDexClassLoader.

    Solution

    This situation basically does not exist, unless the current app references a Non-ART platform executable (which not realistic) or the current ClassLoader is null.

    exception

    IllegalStateException

    VariousClass match failed of those CLASSES

    Abnormal

    All Class were not found when creating indeterminate Class objects using VariousClass.

    Solution

    After checking whether there is a matching Class in the current app and try again.

    exception

    IllegalStateException

    paramTypes is empty, please use emptyParam() instead

    Abnormal

    The empty param method is preserved when looking up methods, constructors.

    The following example

    method {
    +    name = "test"
    +    // No parameters are filled in parentheses
    +    param()
    +}
    +

    Solution

    To identify this method, the constructor has no parameters, you can have a setter method as follows.

    The first way, set emptyParam (recommended)

    The following example

    method {
    +    name = "test"
    +    emptyParam()
    +}
    +

    The second way, set paramCount = 0

    The following example

    method {
    +    name = "test"
    +    paramCount = 0
    +}
    +
    exception

    IllegalStateException

    Cannot create classes cache for "android", please remove "name" param

    Abnormal

    The DexClassFinder cache function searchClass(name = ...) is used in the System Framework ("android") app.

    The following example

    searchClass(name = "test") {
    +    from(...)
    +    // ...
    +}.get()
    +

    Solution

    Since the cache will store the found Class name in SharedPreferences, but the data directory does not exist in the System Framework, so please do not use this function in the System Framework.

    exception

    IllegalStateException

    Target Class type cannot cast to TYPE

    Abnormal

    Wrong type declared when converting string class name to target Class using Class.toClass, Class.toClassOrNull, GenericClass.argument methods.

    The following uses the Class.toClass method as an example.

    The following example

    // Assume the target type is Activity but it was wrongly cast to WrongClass type
    +val clazz = "android.app.Activity".toClass<WrongClass>()
    +

    Solution

    The following example

    // <Solution 1> Fill in the correct type
    +val clazz1 = "android.app.Activity".toClass<Activity>()
    +// <Solution 2> Do not fill in the generic declaration
    +val clazz2 = "android.app.Activity".toClass()
    +

    Please ensure that the generic type declared after executing the method is the specified target Class type, and you do not need to fill in the generic declaration if the target type is not sure.

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/guide/home.html b/en/guide/home.html new file mode 100644 index 0000000..5cc3c2a --- /dev/null +++ b/en/guide/home.html @@ -0,0 +1,43 @@ + + + + + + + + + Introduce | Yuki Reflection + + + + + +

    Introduce

    YukiReflection is a Reflection API based on the Java and Android platform.

    Background

    This is a set of simple and efficient Reflection API rebuilt based on Java native Reflection API using Kotlin.

    YukiReflection is also the core functionality that YukiHookAPIopen in new window is using.

    The name is taken from "ももくり" heroine Yuki Kuriharaopen in new window.

    Usage

    YukiReflection is fully built with Kotlin lambda syntax.

    It can replace Java's native Reflection APIopen in new window and implement a more complete reflection solution in a more human-friendly language.

    Language Requirement

    Please use Kotlin, the code composition of the API part is also compatible with Java, but the implementation of the basic reflection scene may not be used at all.

    All Demo sample codes in the document will be described using Kotlin, if you don’t know how to use Kotlin at all, you may not be able to use YukiReflection.

    Source of Inspiration

    YukiReflection was originally the core function integrated in the YukiHookAPIopen in new window project, and now it is decoupled so that this Reflection API can be used in any Java and Android platform project.

    Now, we only need to write a small amount of code to implement a simple reflection call.

    With Kotlin elegant lambda and YukiReflection, you can make your reflection logic more beautiful and clear.

    The following example

    "android.os.SystemProperties".toClass()
    +    .method {
    +        name = "get"
    +        param(StringClass, StringClass)
    +    }.get().call("ro.system.build.fingerprint", "none")
    +
    Class.forName("android.os.SystemProperties")
    +    .getDeclaredMethod("get", String::class.java, String::class.java)
    +    .apply { isAccessible = true }
    +    .invoke(null, "ro.system.build.fingerprint", "none")
    +
    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/guide/quick-start.html b/en/guide/quick-start.html new file mode 100644 index 0000000..c3ebace --- /dev/null +++ b/en/guide/quick-start.html @@ -0,0 +1,86 @@ + + + + + + + + + Quick Start | Yuki Reflection + + + + + +

    Quick Start

    Integrate YukiReflection into your project.

    Environment Requirements

    • Windows 7 and above / macOS 10.14 and above / Linux distributions (Arch/Debian)

    • Android Studio 2021.1 and above

    • IntelliJ IDEA 2021.1 and above

    • Kotlin 1.7.0 and above

    • Android Gradle Plugin 7.0 and above

    • Gradle 7.0 and above

    • Java 11 and above

    • Java 17 and above (Since API 1.0.3)

    Project Requirements

    The project needs to be created using Android Studio or IntelliJ IDEA and the type is an Java or Android project and the Kotlin environment dependency has been integrated.

    Integration Dependencies

    We recommend using Kotlin DSL as the Gradle build script language and SweetDependencyopen in new window to manage dependencies.

    Add the repositories and dependencies in your project's SweetDependency configuration file.

    The following example

    repositories:
    +  # MavenCentral has a 2-hour cache,
    +  # if the latest version cannot be integrated, please add this
    +  sonatype-oss-releases:
    +
    +libraries:
    +  com.highcapable.yukireflection:
    +    api:
    +      version: +
    +  ...
    +

    After adding it, run Gradle Sync and all dependencies will be autowired.

    Next, deploy dependencies in your project build.gradle.kts.

    The following example

    dependencies {
    +    implementation(com.highcapable.yukireflection.api)
    +    // ...
    +}
    +

    Traditional Method

    Add repositories in your project build.gradle.kts or build.gradle.

    Kotlin DSL

    repositories {
    +    google()
    +    mavenCentral()
    +    // MavenCentral has a 2-hour cache, if the latest version cannot be integrated, please add this URL
    +    maven { url("https://s01.oss.sonatype.org/content/repositories/releases/") }
    +}
    +

    Groovy DSL

    repositories {
    +    google()
    +    mavenCentral()
    +    // MavenCentral has a 2-hour cache, if the latest version cannot be integrated, please add this URL
    +    maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
    +}
    +

    Add dependencies in your project build.gradle.kts or build.gradle.

    Kotlin DSL

    dependencies {
    +    implementation("com.highcapable.yukireflection:api:<yuki-version>")
    +    // ...
    +}
    +

    Groovy DSL

    dependencies {
    +    implementation 'com.highcapable.yukireflection:api:<yuki-version>'
    +    // ...
    +}
    +

    Please change <yuki-version> to the latest version here.

    Pay Attention

    If your project is currently using the 1.x.x version of YukiHookAPIopen in new window, please do not integrate YukiReflection repeatedly, because YukiHookAPI already includes it functions and there are changes to related functions.

    Repeated integration will cause functional conflicts and cause exceptions.

    In this case, you should go to the Documentationopen in new window of YukiHookAPI view the corresponding usage tutorial.

    YukiHookAPI will be completely separated from YukiReflection in version 2.0.0, by which time you can use it with YukiHookAPI at the same time.

    Configure Java Version

    Modify the Java version of Kotlin in your project build.gradle.kts or build.gradle to 17 or above.

    Kotlin DSL

    android {
    +    compileOptions {
    +        sourceCompatibility = JavaVersion.VERSION_17
    +        targetCompatibility = JavaVersion.VERSION_17
    +    }
    +    kotlinOptions {
    +        jvmTarget = "17"
    +    }
    +}
    +

    Groovy DSL

    android {
    +    compileOptions {
    +        sourceCompatibility JavaVersion.VERSION_17
    +        targetCompatibility JavaVersion.VERSION_17
    +    }
    +    kotlinOptions {
    +        jvmTarget = '17'
    +    }
    +}
    +

    Notice

    Since API 1.0.3, the Java version used by Kotlin defaults to 17, and versions 11 and below are no longer supported.

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/en/index.html b/en/index.html new file mode 100644 index 0000000..a56466c --- /dev/null +++ b/en/index.html @@ -0,0 +1,46 @@ + + + + + + + + + Home | Yuki Reflection + + + + + +
    Yuki Reflection

    Yuki Reflection

    An efficient Reflection API for Java and Android built in Kotlin

    Get Started Changelog

    Light and Elegant

    A powerful, elegant, beautiful API built with Kotlin lambda can help you quickly implement bytecode finding and reflection functions.

    Cross-Platform Available

    Not only the Android platform, it is highly compatible with the Java API and can be used on any Kotlin on JVM project, wherever Java is available.

    Quickly Started

    Simple and easy to use it now! Do not need complex configuration and full development experience, Integrate dependencies and enjoy yourself.

    Bring it on! Let reflection become poetic and picturesque

    public class World {
    +
    +    private void sayHello(String content) {
    +        System.out.println("Hello " + content + "!");
    +    }
    +}
    +
    val newWorld = World()
    +classOf<World>().method {
    +    name = "sayHello"
    +    param(StringClass)
    +    type = UnitType
    +}.get(newWorld).call("YukiReflection")
    +
    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..36848de Binary files /dev/null and b/images/logo.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..2b44912 --- /dev/null +++ b/index.html @@ -0,0 +1,34 @@ + + + + + + + + + Yuki Reflection + + + + + +

    Select a language

    English 简体中文

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/about/about.html b/zh-cn/about/about.html new file mode 100644 index 0000000..8ba4803 --- /dev/null +++ b/zh-cn/about/about.html @@ -0,0 +1,49 @@ + + + + + + + + + 关于此文档 | Yuki Reflection + + + + + +

    关于此文档

    此文档由 VuePress在新窗口中打开 强力驱动。

    许可证

    Apache-2.0在新窗口中打开

    Apache License Version 2.0
    +
    +Copyright (C) 2019 HighCapable
    +
    +Licensed under the Apache License, Version 2.0 (the "License");
    +you may not use this file except in compliance with the License.
    +You may obtain a copy of the License at
    +
    +    https://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing, software
    +distributed under the License is distributed on an "AS IS" BASIS,
    +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +See the License for the specific language governing permissions and
    +limitations under the License.
    +

    版权所有 © 2019 HighCapable

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/about/changelog.html b/zh-cn/about/changelog.html new file mode 100644 index 0000000..1e4cf11 --- /dev/null +++ b/zh-cn/about/changelog.html @@ -0,0 +1,34 @@ + + + + + + + + + 更新日志 | Yuki Reflection + + + + + +

    更新日志

    这里记录了 YukiReflection 的版本更新历史。

    特别注意

    我们只会对最新的 API 版本进行维护,若你正在使用过时的 API 版本则代表你自愿放弃一切维护的可能性。

    1.0.3 | 2023.10.07  最新

    • 许可协议由 MIT 变更为 Apache-2.0,在此之后的版本将由此许可协议进行分发,您在使用此版本后应变更相关许可协议
    • 将依赖库的类型由 Android Library (aar) 修改回 Java Library (jar)
    • 适配并支持原生 Java 平台 (部分功能仅限 Android 平台)
    • 修复 fix get interfaces of class在新窗口中打开 问题并合并到 YukiReflection
    • 作废了 isAllowPrintingLogs,请开始使用 debugLog 方法
    • 新增 YukiReflection.TAG
    • 作废了 YukiReflection.API_VERSION_NAMEYukiReflection.API_VERSION_CODE,统一合并到 YukiReflection.VERSION
    • 重构方法查找中的 remendy 功能,现在可以对其进行分步打印异常
    • 多重方法查找结果类型由 HashSet 改为 MutableList
    • 新增使用 method()constructor()field() 可直接获取到类中的所有对象功能
    • constructor() 的行为不再是 constructor { emptyParam() }
    • 新增 lazyClasslazyClassOrNull 方法,可延迟装载 Class

    1.0.2 | 2023.04.25  过旧

    • 修复一个严重问题,Member 缓存未生效且持续存储最终引发 APP 内存溢出 (OOM),感谢 Art-Chen在新窗口中打开
    • 移除 Member 的直接缓存功能并作废 YukiReflection.Configs.isEnableMemberCache,保留 Class 的缓存功能
    • 对接查找功能到 Sequence,优化 Member 的查找速度与性能

    1.0.1 | 2023.04.16  过旧

    • 将依赖库的类型由 Java Library (jar) 修改为 Android Library (aar)
    • 移除了 Android type 中的错误 Class 对象声明

    1.0.0 | 2023.01.26  过旧

    • 首个版本提交至 Maven
    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/about/contacts.html b/zh-cn/about/contacts.html new file mode 100644 index 0000000..a3960ef --- /dev/null +++ b/zh-cn/about/contacts.html @@ -0,0 +1,34 @@ + + + + + + + + + 联系我们 | Yuki Reflection + + + + + +

    联系我们

    如在使用中有任何问题,或有任何建设性的建议,都可以联系我们。

    加入我们的开发者群组。

    酷安 找到我 @星夜不荟在新窗口中打开

    助力维护

    感谢您选择并使用 YukiReflection,如有代码相关的建议和请求,可在 GitHub 提交 Pull Request。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/about/future.html b/zh-cn/about/future.html new file mode 100644 index 0000000..d97d1cf --- /dev/null +++ b/zh-cn/about/future.html @@ -0,0 +1,134 @@ + + + + + + + + + 展望未来 | Yuki Reflection + + + + + +

    展望未来

    未来是美好的,也是不确定的,让我们共同期待 YukiReflection 在未来的发展空间。

    未来的计划

    这里收录了 YukiReflection 可能会在后期添加的功能。

    自动生成反射代码

    使用 stub 的方式创建一个 Kotlin 类,并声明其中的参数,以及其在各个版本中的不同状态。

    比如下面的这个 Java 类就是我们需要反射的目标类。

    示例如下

    package com.example.test;
    +
    +public class MyClass {
    +    
    +    private String myField = "test";
    +
    +    public MyClass() {
    +        // ...
    +    }
    +
    +    private String myMethod1(String var1, int var2) {
    +        // ...
    +    }
    +
    +    private void myMethod2() {
    +        // ...
    +    }
    +
    +    private void myMethod3(String var1) {
    +        // ...
    +    }
    +}
    +

    通过目前 API 的现有用法可以使用如下方式反射调用这个类。

    示例如下

    classOf<MyClass>().buildOf().current {
    +    // 调用 myField
    +    val value = field { name = "myField" }.string()
    +    // 调用 myMethod1
    +    val methodValue = method { name = "myMethod1" }.string("test", 0)
    +    // 调用 myMethod2
    +    method { name = "myMethod2" }.call()
    +    // 调用 myMethod3
    +    method { name = "myMethod3" }.call("test")
    +}
    +

    目前要实现的功能是可以使用反射功能直接定义为如下 Kotlin 类。

    示例如下

    package com.example.test
    +
    +@ReflectClass
    +class MyClass {
    +
    +    @ReflectField
    +    val myField: String = fieldValueOf("none")
    +
    +    @ReflectMethod
    +    fun myMethod1(var1: String, var2: Int): String = methodReturnValueOf("none")
    +
    +    @ReflectMethod
    +    fun myMethod2() = MethodReturnType.Unit
    +
    +    @ReflectMethod
    +    fun myMethod3(var1: String) = MethodReturnType.Unit
    +}
    +

    然后我们就可以直接调用这个定义好的 Kotlin 类来实现反射功能,API 会根据注解自动生成反射代码。

    示例如下

    MyClass().also {
    +    // 调用 myField
    +    val value = it.myField
    +    // 调用 myMethod1
    +    val methodValue = it.myMethod1("test", 0)
    +    // 调用 myMethod2
    +    it.myMethod2()
    +    // 调用 myMethod3
    +    it.myMethod3("test")
    +}
    +

    小提示

    以上功能可能会在实际推出后有所变化,最终以实际版本的功能为准。

    自动生成可直接调用的 Class 对象

    在 Kotlin 中,表示 Java 的类对象的方式是 YourObject::class.java,这个写法通常会很长,在反射过程中大量使用会很不美观。

    在现有版本中,我们内置了常用的 Class 对象,但是这会增大依赖的体积,而且大多数情况下可能都用不到这些对象。

    例如 StringClassIntType 等等,这些对象都是在 YukiReflection 中内置的。

    所以我们计划在后期添加一个功能,可以使用 properties 的方式创建一个需要生成的 Class 对象列表,通过 Gradle 插件依次生成这些 Class 对象。

    诸如上面提到的这些原始类型的 Class 对象依然会内置在 YukiReflection 中,其余的 Class 对象需要自行定义。

    生成的名称规范为 类名 + Class,为了防止包名冲突,你可以控制生成的 Class 对象的子包名。

    在配置文件中,你无需添加 Class 作为后缀。

    你可以在 Gradle 插件中定义生成的根包名,默认为 com.highcapable.yukireflection.generated.classes

    示例如下

    # 最基本的定义方式就是直接写名称
    +# 将会生成到 com.highcapable.yukireflection.generated.classes.BundleClass
    +android.os.Bundle=Bundle
    +# 你可以在前方使用 "." 的形式来定义前置子包名
    +# 例如我们想把这个类定义到想要的包名
    +# 将会生成到 com.highcapable.yukireflection.generated.classes.myandroid.myos.BundleClass
    +android.os.Bundle=myandroid.myos.Bundle
    +# 你也可以不填写键值内容,这将使用键值名称作为定义的包名和类名
    +# 将会生成到 com.highcapable.yukireflection.generated.classes.android.os.BundleClass
    +android.os.Bundle
    +

    上述方式生成的 Class 对象的大概代码形式如下。

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +// 在默认 ClassLoader 的情况下使用
    +val BundleClass: Class<*> = "android.os.Bundle".toClass()
    +
    +// 在指定 ClassLoader 的情况下使用
    +fun BundleClass(loader: ClassLoader): Class<*> = "android.os.Bundle".toClass(loader)
    +

    也许这个 Class 可能在一些情况下无法被得到,这个时候你可以参考以下配置方式。

    示例如下

    # 在键值后添加 "?" 的形式来定义可空的 Class 对象
    +android.os.Bundle?
    +

    上述方式生成的 Class 对象的大概代码形式如下。

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +// 在默认 ClassLoader 的情况下使用
    +val BundleClass: Class<*>? = "android.os.Bundle".toClassOrNull()
    +
    +// 在指定 ClassLoader 的情况下使用
    +fun BundleClass(loader: ClassLoader): Class<*>? = "android.os.Bundle".toClassOrNull(loader)
    +

    如果这个 Class 对象能使用直接调用的方式进行引用,这个时候你可以参考以下配置方式。

    示例如下

    # 在键值后添加 "!!" 的形式来定义可直接调用的 Class 对象
    +android.os.Bundle!!
    +

    上述方式生成的 Class 对象的大概代码形式如下。

    package com.highcapable.yukireflection.generated.classes.android.os
    +
    +import android.os.Bundle
    +
    +// 在默认 ClassLoader 的情况下使用
    +val BundleClass: Class<Bundle> = classOf<Bundle>()
    +
    +// 在指定 ClassLoader 的情况下使用
    +fun BundleClass(loader: ClassLoader): Class<Bundle> = classOf<Bundle>(loader)
    +

    有了生成的 Class 对象,我们就可以愉快地使用 YukiReflection 进行反射了。

    示例如下

    method {
    +    name = "onCreate"
    +    param(BundleClass)
    +}
    +

    小提示

    以上功能可能会在实际推出后有所变化,最终以实际版本的功能为准。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/features.html b/zh-cn/api/features.html new file mode 100644 index 0000000..bc9ecb2 --- /dev/null +++ b/zh-cn/api/features.html @@ -0,0 +1,802 @@ + + + + + + + + + 功能介绍 | Yuki Reflection + + + + + +

    功能介绍

    这里包含了 YukiReflection 全部核心功能的用法示例。

    Class 扩展

    这里是 Class 对象自身相关的扩展功能。

    对象转换

    假设我们要得到一个不能直接调用的 Class,通常情况下,我们可以使用标准的反射 API 去查找这个 Class

    示例如下

    // 默认 ClassLoader 环境下的 Class
    +var instance = Class.forName("com.demo.Test")
    +// 指定 ClassLoader 环境下的 Class
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var instance = customClassLoader?.loadClass("com.demo.Test")
    +

    这种写法大概不是很友好,此时 YukiReflection 就为你提供了一个可在任意地方使用的语法糖。

    以上写法换做 YukiReflection 可写作如下形式。

    示例如下

    // 直接得到这个 Class
    +var instance = "com.demo.Test".toClass()
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var instance = "com.demo.Test".toClass(customClassLoader)
    +

    如果当前 Class 并不存在,使用上述方法会抛出异常,如果你不确定 Class 是否存在,可以参考下面的解决方案。

    示例如下

    // 直接得到这个 Class
    +// 得不到时结果会为 null 但不会抛出异常
    +var instance = "com.demo.Test".toClassOrNull()
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +// 得不到时结果会为 null 但不会抛出异常
    +var instance = "com.demo.Test".toClassOrNull(customClassLoader)
    +

    我们还可以通过映射来得到一个存在的 Class 对象。

    示例如下

    // 假设这个 Class 是能够被直接得到的
    +var instance = classOf<Test>()
    +// 我们同样可以自定义 Class 所在的 ClassLoader,这对于 stub 来说非常有效
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var instance = classOf<Test>(customClassLoader)
    +

    小提示

    更多功能请参考 classOfString.toClassString.toClassOrNull 方法。

    延迟装载

    假设我们要得到一个不能直接调用的 Class,但是我们也不是立刻就需要这个 Class

    这个时候,你可以使用 lazyClass 来完成这个功能。

    示例如下

    // 延迟装载这个 Class
    +val instance by lazyClass("com.demo.Test")
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +val instance by lazyClass("com.demo.Test") { customClassLoader }
    +// 在适当的时候调用这个 Class
    +instance.method { 
    +    // ...   
    +}
    +

    如果当前 Class 并不存在,使用上述方法会抛出异常,如果你不确定 Class 是否存在,可以参考下面的解决方案。

    示例如下

    // 延迟装载这个 Class
    +// 得不到时结果会为 null 但不会抛出异常
    +val instance by lazyClassOrNull("com.demo.Test")
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +// 得不到时结果会为 null 但不会抛出异常
    +val instance by lazyClassOrNull("com.demo.Test") { customClassLoader }
    +// 在适当的时候调用这个 Class
    +instance?.method { 
    +    // ...   
    +}
    +

    小提示

    更多功能请参考 lazyClasslazyClassOrNull 方法。

    存在判断

    假设我们要判断一个 Class 是否存在,通常情况下,我们可以使用标准的反射 API 去查找这个 Class 通过异常来判断是否存在。

    示例如下

    // 默认 ClassLoader 环境下的 Class
    +var isExist = try {
    +    Class.forName("com.demo.Test")
    +    true
    +} catch (_: Throwable) {
    +    false
    +}
    +// 指定 ClassLoader 环境下的 Class
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var isExist = try {
    +    customClassLoader?.loadClass("com.demo.Test")
    +    true
    +} catch (_: Throwable) {
    +    false
    +}
    +

    这种写法大概不是很友好,此时 YukiReflection 就为你提供了一个可在任意地方使用的语法糖。

    以上写法换做 YukiReflection 可写作如下形式。

    示例如下

    // 判断这个 Class 是否存在
    +var isExist = "com.demo.Test".hasClass()
    +// 自定义 Class 所在的 ClassLoader
    +val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +var isExist = "com.demo.Test".hasClass(customClassLoader)
    +

    小提示

    更多功能请参考 String.hasClass 方法。

    模糊查找 Beta

    在 R8 等工具混淆后的当前 APP Dex 中的 Class 名称将会难以分辨,且不确定其正确位置,不能直接通过 对象转换 来得到。

    此时就有了 DexClassFinder,它的作用是通过需要查找的 Class 中的字节码特征来确定这个 Class 的实例。

    注意

    此功能仅适用于 Android 平台。

    目前 DexClassFinder 的功能尚在试验阶段,由于仅通过 Java 层实现查找功能,在当前 APP Class 过多时性能可能不能达到最佳水平,如果发生查找不到、定位有误的问题欢迎向我们反馈。

    由于是反射层面的 API,目前它只能通过类与成员的特征来定位指定的 Class,不能通过指定字节码中的字符串和方法内容特征来进行定位。

    查找 Class 的速度取决于当前设备的性能,目前主流的移动端处理器在 10~15w 数量的 Class 中条件不算复杂的情况下大概在 3~10s 区间,条件稍微复杂的情况下最快速度能达到 25s 以内,匹配到的同类型 Class 越多速度越慢。

    特别注意

    YukiHookAPI 发布 2.0.0 版本后,此功能将被标记为作废,且将会直接从 YukiReflection 中移除。

    我们欢迎各位开发者开始使用 DexKit在新窗口中打开,它是一个使用 C++ 实现的 Dex 高性能运行时解析库,在性能方面比 Java 层更加高效与优秀,目前尚在开发阶段,欢迎提出宝贵建议。

    开始使用

    下面是一个简单的用法示例。

    假设下面这个 Class 是我们想要得到的,其中的名称经过了混淆,在每个版本可能都不一样。

    示例如下

    package com.demo;
    +
    +public class a extends Activity implements Serializable {
    +
    +    public a(String var1) {
    +        // ...
    +    }
    +
    +    private String a;
    +
    +    private String b;
    +
    +    private boolean a;
    +
    +    protected void onCreate(Bundle var1) {
    +        // ...
    +    }
    +
    +    private static void a(String var1) {
    +        // ...
    +    }
    +
    +    private String a(boolean var1, String var2) {
    +        // ...
    +    }
    +
    +    private void a() {
    +        // ...
    +    }
    +
    +    public void a(boolean var1, a var2, b var3, String var4) {
    +        // ...
    +    }
    +}
    +

    此时,我们想得到这个 Class,可以直接使用 ClassLoader.searchClass 方法。

    下方演示的条件中每一个都是可选的,条件越复杂定位越精确,同时性能也会越差。

    示例如下

    searchClass {
    +    // 从指定的包名范围开始查找,实际使用时,你可以同时指定多个包名范围
    +    from("com.demo")
    +    // 指定当前 Class 的 getSimpleName 的结果,你可以直接对这个字符串进行逻辑判断
    +    // 这里我们不确定它的名称是不是 a,可以只判断字符串长度
    +    simpleName { it.length == 1 }
    +    // 指定继承的父类对象,如果是存在的 stub,可以直接用泛型表示
    +    extends<Activity>()
    +    // 指定继承的父类对象,可以直接写为完整类名,你还可以同时指定多个
    +    extends("android.app.Activity")
    +    // 指定实现的接口,如果是存在的 stub,可以直接用泛型表示
    +    implements<Serializable>()
    +    // 指定实现的接口,可以直接写为完整类名,你还可以同时指定多个
    +    implements("java.io.Serializable")
    +    // 指定构造方法的类型与样式,以及在当前类中存在的个数 count
    +    constructor { param(StringClass) }.count(num = 1)
    +    // 指定变量的类型与样式,以及在当前类中存在的个数 count
    +    field { type = StringClass }.count(num = 2)
    +    // 指定变量的类型与样式,以及在当前类中存在的个数 count
    +    field { type = BooleanType }.count(num = 1)
    +    // 直接指定所有变量在当前类中存在的个数 count
    +    field().count(num = 3)
    +    // 如果你认为变量的个数是不确定的,还可以使用如下自定义条件
    +    field().count(1..3)
    +    field().count { it >= 3 }
    +    // 指定方法的类型与样式,以及在当前类中存在的个数 count
    +    method {
    +        name = "onCreate"
    +        param(BundleClass)
    +    }.count(num = 1)
    +    // 指定方法的类型与样式,同时指定修饰符,以及在当前类中存在的个数 count
    +    method {
    +        modifiers { isStatic && isPrivate }
    +        param(StringClass)
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // 指定方法的类型与样式,同时指定修饰符,以及在当前类中存在的个数 count
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        param(BooleanType, StringClass)
    +        returnType = StringClass
    +    }.count(num = 1)
    +    // 指定方法的类型与样式,同时指定修饰符,以及在当前类中存在的个数 count
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        emptyParam()
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // 指定方法的类型与样式,同时指定修饰符和模糊类型 VagueType,以及在当前类中存在的个数 count
    +    method {
    +        modifiers { isPrivate && isStatic.not() }
    +        param(BooleanType, VagueType, VagueType, StringClass)
    +        returnType = UnitType
    +    }.count(num = 1)
    +    // 直接指定所有方法在当前类中存在的个数 count
    +    method().count(num = 5)
    +    // 如果你认为方法的个数是不确定的,还可以使用如下自定义条件
    +    method().count(1..5)
    +    method().count { it >= 5 }
    +    // 直接指定所有成员 (Member) 在当前类中存在的个数 count
    +    // 成员包括:Field (变量)、Method (方法)、Constructor (构造方法)
    +    member().count(num = 9)
    +    // 所有成员中一定存在一个 static 修饰符,可以这样加入此条件
    +    member {
    +        modifiers { isStatic }
    +    }
    +}.get() // 得到这个 Class 本身的实例,找不到会返回 null
    +

    小提示

    上述用法中对于 FieldMethodConstructor 的条件用法与 Member 扩展 中的相关用法是一致的,仅有小部分区别。

    更多功能请参考 MemberRulesFieldRulesMethodRulesConstructorRules

    异步查找

    默认情况下 DexClassFinder 会使用同步方式查找 Class,会阻塞当前线程直到找到或找不到发生异常为止,若查找消耗的时间过长,可能会导致当前 APP 发生 ANR 问题。

    针对上述问题,我们可以启用异步,只需要加入参数 async = true,这将不需要你再次启动一个线程,API 已帮你处理好相关问题。

    注意

    若要使用此功能,你需要在方法参数首位传入当前 APP 的 Context

    对于异步情况下你需要使用 wait 方法来得到结果,get 方法将不再起作用。

    示例如下

    val context: Context // 假设这就是当前 APP 的 Context
    +searchClass(context, async = true) {
    +    // ...
    +}.wait { class1 ->
    +    // 得到异步结果
    +}
    +searchClass(context, async = true) {
    +    // ...
    +}.wait { class2 ->
    +    // 得到异步结果
    +}
    +

    这样我们的查找过程就是异步运行了,它将不会阻塞主线程,每个查找都将在单独的线程同时进行,可达到并行任务的效果。

    本地缓存

    由于每次重新打开当前 APP 都会重新进行查找,在当前 APP 版本不变的情况下这是一种重复性能浪费。

    此时我们可以通过指定 name 参数来对当前 APP 版本的查找结果进行本地缓存,下一次将直接从本地缓存中读取查找到的类名。

    本地缓存使用的是 SharedPreferences,它将被保存到当前 APP 的数据目录中,在当前 APP 版本更新后会重新进行缓存。

    启用本地缓存后,将同时设置 async = true,你可以不需要再手动进行设置。

    注意

    若要使用此功能,你需要在方法参数首位传入当前 APP 的 Context

    示例如下

    val context: Context // 假设这就是当前 APP 的 Context
    +searchClass(context, name = "com.demo.class1") {
    +    // ...
    +}.wait { class1 ->
    +    // 得到异步结果
    +}
    +searchClass(context, name = "com.demo.class2") {
    +    // ...
    +}.wait { class2 ->
    +    // 得到异步结果
    +}
    +

    如果你想手动清除本地缓存,可以使用如下方法清除当前 APP 版本的缓存。

    示例如下

    val context: Context // 假设这就是当前 APP 的 Context
    +DexClassFinder.clearCache(context)
    +

    你还可以清除指定版本的 APP 缓存。

    示例如下

    val context: Context // 假设这就是当前 APP 的 Context
    +DexClassFinder.clearCache(context, versionName = "1.0", versionCode = 1)
    +

    多重查找

    如果你需要使用固定的条件同时查找一组 Class,那么你只需要使用 allwaitAll 方法来得到结果。

    // 同步查找,使用 all 得到条件全部查找到的结果
    +searchClass {
    +    // ...
    +}.all().forEach { clazz ->
    +    // 得到每个结果
    +}
    +// 同步查找,使用 all { ... } 遍历每个结果
    +searchClass {
    +    // ...
    +}.all { clazz ->
    +    // 得到每个结果
    +}
    +// 异步查找,使用 waitAll 得到条件全部查找到的结果
    +val context: Context // 假设这就是当前 APP 的 Context
    +searchClass(context, async = true) {
    +    // ...
    +}.waitAll { classes ->
    +    classes.forEach {
    +        // 得到每个结果
    +    }
    +}
    +

    小提示

    更多功能请参考 ClassLoader.searchClass 方法。

    Member 扩展

    这里是 Class 字节码成员变量 FieldMethodConstructor 相关的扩展功能。

    小提示

    MemberFieldMethodConstructor 的接口描述对象,它在 Java 反射中为 Class 中字节码成员的总称。

    假设有一个这样的 Class

    示例如下

    package com.demo;
    +
    +public class BaseTest {
    +
    +    public BaseTest() {
    +        // ...
    +    }
    +
    +    public BaseTest(boolean isInit) {
    +        // ...
    +    }
    +
    +    private void doBaseTask(String taskName) {
    +        // ...
    +    }
    +}
    +
    package com.demo;
    +
    +public class Test extends BaseTest {
    +
    +    public Test() {
    +        // ...
    +    }
    +
    +    public Test(boolean isInit) {
    +        // ...
    +    }
    +
    +    private static TAG = "Test";
    +
    +    private BaseTest baseInstance;
    +
    +    private String a;
    +
    +    private boolean a;
    +
    +    private boolean isTaskRunning = false;
    +
    +    private static void init() {
    +        // ...
    +    }
    +
    +    private void doTask(String taskName) {
    +        // ...
    +    }
    +
    +    private void release(String taskName, Function<boolean, String> task, boolean isFinish) {
    +        // ...
    +    }
    +
    +    private void stop() {
    +        // ...
    +    }
    +
    +    private String getName() {
    +        // ...
    +    }
    +
    +    private void b() {
    +        // ...
    +    }
    +
    +    private void b(String a) {
    +        // ...
    +    }
    +}
    +

    查找与反射调用

    假设我们要得到 Test(以下统称“当前 Class”)的 doTask 方法并执行,通常情况下,我们可以使用标准的反射 API 去查找这个方法。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用反射 API 调用并执行
    +Test::class.java
    +    .getDeclaredMethod("doTask", String::class.java)
    +    .apply { isAccessible = true }
    +    .invoke(instance, "task_name")
    +

    这种写法大概不是很友好,此时 YukiReflection 就为你提供了一个可在任意地方使用的语法糖。

    以上写法换做 YukiReflection 可写作如下形式。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doTask"
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    小提示

    更多功能请参考 MethodFinder

    同样地,我们需要得到 isTaskRunning 变量也可以写作如下形式。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.field {
    +    name = "isTaskRunning"
    +    type = BooleanType
    +}.get(instance).any() // any 为 Field 的任意类型实例化对象
    +

    小提示

    更多功能请参考 FieldFinder

    也许你还想得到当前 Class 的构造方法,同样可以实现。

    示例如下

    Test::class.java.constructor {
    +    param(BooleanType)
    +}.get().call(true) // 可创建一个新的实例
    +

    若想得到的是 Class 的无参构造方法,可写作如下形式。

    示例如下

    Test::class.java.constructor().get().call() // 可创建一个新的实例
    +

    小提示

    更多功能请参考 ConstructorFinder

    可选的查找条件

    假设我们要得到 Class 中的 getName 方法,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "getName"
    +    emptyParam()
    +    returnType = StringClass
    +}.get(instance).string() // 得到方法的结果
    +

    通过观察发现,这个 Class 中只有一个名为 getName 的方法,那我们可不可以再简单一点呢?

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "getName"
    +    emptyParam()
    +}.get(instance).string() // 得到方法的结果
    +

    是的,对于确切不会变化的方法,你可以精简查找条件。

    在只使用 getwait 方法得到结果时 YukiReflection 会默认按照字节码顺序匹配第一个查找到的结果

    问题又来了,这个 Class 中有一个 release 方法,但是它的方法参数很长,而且部分类型可能无法直接得到。

    通常情况下我们会使用 param(...) 来查找这个方法,但是有没有更简单的方法呢。

    此时,在确定方法唯一性后,你可以使用 paramCount 来查找到这个方法。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "release"
    +    // 此时我们不必确定方法参数具体类型,写个数就好
    +    paramCount = 3
    +}.get(instance) // 得到这个方法
    +

    上述示例虽然能够匹配成功,但是不精确,此时你还可以使用 VagueType 来填充你不想填写的方法参数类型。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "release"
    +    // 使用 VagueType 来填充不想填写的类型,同时保证其它类型能够匹配
    +    param(StringClass, VagueType, BooleanType)
    +}.get(instance) // 得到这个方法
    +

    如果你并不确定每一个参数的类型,你可以通过 param { ... } 方法来创建一个条件方法体。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "release"
    +    // 得到 it (Class) 方法参数类型数组实例来仅判断已知的类型和它的位置
    +    param { it[0] == StringClass && it[2] == BooleanType }
    +}.get(instance) // 得到这个方法
    +

    小提示

    使用 param { ... } 创建一个条件方法体,其中的变量 it 即当前方法参数的 Class 类型数组实例,此时你就可以自由使用 Class 中的所有对象及其方法。

    方法体末尾条件需要返回一个 Boolean,即最终的条件判断结果。

    更多功能请参考 FieldFinder.typeMethodFinder.paramMethodFinder.returnTypeConstructorFinder.param 方法。

    在父类查找

    你会注意到 Test 继承于 BaseTest,现在我们想得到 BaseTestdoBaseTask 方法,在不知道父类名称的情况下,要怎么做呢?

    参照上面的查找条件,我们只需要在查找条件中加入一个 superClass 即可实现这个功能。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doBaseTask"
    +    param(StringClass)
    +    // 只需要添加这个条件
    +    superClass()
    +}.get(instance).call("task_name")
    +

    这个时候我们就可以在父类中取到这个方法了。

    superClass 有一个参数为 isOnlySuperClass,设置为 true 后,可以跳过当前 Class 仅查找当前 Class 的父类。

    由于我们现在已知 doBaseTask 方法只存在于父类,可以加上这个条件节省查找时间。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doBaseTask"
    +    param(StringClass)
    +    // 加入一个查找条件
    +    superClass(isOnlySuperClass = true)
    +}.get(instance).call("task_name")
    +

    这个时候我们同样可以得到父类中的这个方法。

    superClass 一旦设置就会自动循环向后查找全部继承的父类中是否有这个方法,直到查找到目标没有父类(继承关系为 java.lang.Object)为止。

    特别注意

    当前查找的 Method 除非指定 superClass 条件,否则只能查找到当前 ClassMethod,这是 Java 反射 API 的默认行为。

    模糊查找

    如果我们想查找一个方法名称,但是又不确定它在每个版本中是否发生变化,此时我们就可以使用模糊查找功能。

    假设我们要得到 Class 中的 doTask 方法,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name {
    +        // 设置名称不区分大小写
    +        it.equals("dotask", isIgnoreCase = true)
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    已知当前 Class 中仅有一个 doTask 方法,我们还可以判断方法名称仅包含其中指定的字符。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name {
    +        // 仅包含 oTas
    +        it.contains("oTas")
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    我们还可以根据首尾字符串进行判断。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name {
    +        // 开头包含 do,结尾包含 Task
    +        it.startsWith("do") && it.endsWith("Task")
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    通过观察发现这个方法名称中只包含字母,我们还可以再增加一个精确的查找条件。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name {
    +        // 开头包含 do,结尾包含 Task,仅包含字母
    +        it.startsWith("do") && it.endsWith("Task") && it.isOnlyLetters()
    +    }
    +    param(StringClass)
    +}.get(instance).call("task_name")
    +

    小提示

    使用 name { ... } 创建一个条件方法体,其中的变量 it 即当前名称的字符串,此时你就可以在 NameRules 的扩展方法中自由使用其中的功能。

    方法体末尾条件需要返回一个 Boolean,即最终的条件判断结果。

    更多功能请参考 FieldFinder.nameMethodFinder.name 方法以及 NameRules

    多重查找

    有些时候,我们可能需要查找一个 Class 中具有相同特征的一组方法、构造方法、变量,此时,我们就可以利用相对条件匹配来完成。

    在查找条件结果的基础上,我们只需要把 get 换为 all 即可得到匹配条件的全部字节码。

    假设这次我们要得到 Class 中方法参数个数范围在 1..3 的全部方法,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    paramCount(1..3)
    +}.all(instance).forEach { instance ->
    +    // 调用执行每个方法
    +    instance.call(...)
    +}
    +

    上述示例可完美匹配到如下 3 个方法。

    private void doTask(String taskName)

    private void release(String taskName, Function<boolean, String> task, boolean isFinish)

    private void b(String a)

    如果你想更加自由地定义参数个数范围的条件,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    paramCount { it < 3 }
    +}.all(instance).forEach { instance ->
    +    // 调用执行每个方法
    +    instance.call(...)
    +}
    +

    上述示例可完美匹配到如下 6 个方法。

    private static void init()

    private void doTask(String taskName)

    private void stop(String a)

    private void getName(String a)

    private void b()

    private void b(String a)

    通过观察 Class 中有两个名称为 b 的方法,可以使用如下实现。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "b"
    +}.all(instance).forEach { instance ->
    +    // 调用执行每个方法
    +    instance.call(...)
    +}
    +

    上述示例可完美匹配到如下 2 个方法。

    private void b()

    private void b(String a)

    小提示

    使用 paramCount { ... } 创建一个条件方法体,其中的变量 it 即当前参数个数的整数,此时你就可以在 CountRules 的扩展方法中自由使用其中的功能。

    方法体末尾条件需要返回一个 Boolean,即最终的条件判断结果。

    更多功能请参考 MethodFinder.paramCountConstructorFinder.paramCount 方法以及 CountRules

    静态字节码

    有些方法和变量在 Class 中是静态的实现,这个时候,我们不需要传入实例就可以调用它们。

    假设我们这次要得到静态变量 TAG 的内容。

    示例如下

    Test::class.java.field {
    +    name = "TAG"
    +    type = StringClass
    +}.get().string() // Field 的类型是字符串,可直接进行 cast
    +

    假设 Class 中存在同名的非静态 TAG 变量,这个时候怎么办呢?

    加入一个筛选条件即可。

    示例如下

    Test::class.java.field {
    +    name = "TAG"
    +    type = StringClass
    +    // 标识查找的这个变量需要是静态
    +    modifiers { isStatic }
    +}.get().string() // Field 的类型是字符串,可直接进行 cast
    +

    我们还可以调用名为 init 的静态方法。

    示例如下

    Test::class.java.method {
    +    name = "init"
    +    emptyParam()
    +}.get().call()
    +

    同样地,你可以标识它是一个静态。

    示例如下

    Test::class.java.method {
    +    name = "init"
    +    emptyParam()
    +    // 标识查找的这个方法需要是静态
    +    modifiers { isStatic }
    +}.get().call()
    +

    小提示

    使用 modifiers { ... } 创建一个条件方法体,此时你就可以在 ModifierRules 中自由使用其中的功能。

    方法体末尾条件需要返回一个 Boolean,即最终的条件判断结果。

    更多功能请参考 FieldFinder.modifiersMethodFinder.modifiersConstructorFinder.modifiers 方法以及 ModifierRules

    混淆的字节码

    你可能已经注意到了,这里给出的示例 Class 中有两个混淆的变量名称,它们都是 a,这个时候我们要怎么得到它们呢?

    有两种方案。

    第一种方案,确定变量的名称和类型。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.field {
    +    name = "a"
    +    type = BooleanType
    +}.get(instance).any() // 得到名称为 a 类型为 Boolean 的变量
    +

    第二种方案,确定变量的类型所在的位置。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.field {
    +    type(BooleanType).index().first()
    +}.get(instance).any() // 得到第一个类型为 Boolean 的变量
    +

    以上两种情况均可得到对应的变量 private boolean a

    同样地,这个 Class 中也有两个混淆的方法名称,它们都是 b

    你也可以有两种方案来得到它们。

    第一种方案,确定方法的名称和方法参数。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "b"
    +    param(StringClass)
    +}.get(instance).call("test_string") // 得到名称为 b 方法参数为 [String] 的方法
    +

    第二种方案,确定方法的参数所在的位置。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    param(StringClass).index().first()
    +}.get(instance).call("test_string") // 得到第一个方法参数为 [String] 的方法
    +

    由于观察到这个方法在 Class 的最后一个,那我们还有一个备选方案。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    order().index().last()
    +}.get(instance).call("test_string") // 得到当前 Class 的最后一个方法
    +

    注意

    请尽量避免使用 order 来筛选字节码的下标,它们可能是不确定的,除非你确定它在这个 Class 中的位置一定不会变。

    直接调用

    上面介绍的调用字节码的方法都需要使用 get(instance) 才能调用对应的方法,有没有简单一点的办法呢?

    此时,你可以在任意实例上使用 current 方法来创建一个调用空间。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 假设这个 Class 是不能被直接得到的
    +instance.current {
    +    // 执行 doTask 方法
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +    // 执行 stop 方法
    +    method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +    // 得到 name
    +    val name = method { name = "getName" }.string()
    +}
    +

    我们还可以用 superClass 调用当前 Class 父类的方法。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 假设这个 Class 是不能被直接得到的
    +instance.current {
    +    // 执行父类的 doBaseTask 方法
    +    superClass().method {
    +        name = "doBaseTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}
    +

    如果你不喜欢使用一个大括号的调用域来创建当前实例的命名空间,你可以直接使用 current() 方法。

    示例如下

    // 假设这就是这个 Class 的实例,这个 Class 是不能被直接得到的
    +val instance = Test()
    +// 执行 doTask 方法
    +instance
    +    .current()
    +    .method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +// 执行 stop 方法
    +instance
    +    .current()
    +    .method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +// 得到 name
    +val name = instance.current().method { name = "getName" }.string()
    +

    同样地,它们之间可以连续调用,但不允许内联调用

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 假设这个 Class 是不能被直接得到的
    +instance.current {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}.current()
    +    .method {
    +        name = "stop"
    +        emptyParam()
    +    }.call()
    +// 注意,因为 current() 返回的是 CurrentClass 自身对象,所以不能像下面这样调用
    +instance.current().current()
    +

    针对 Field 实例,还有一个便捷的方法,可以直接获取 Field 所在实例的对象。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 假设这个 Class 是不能被直接得到的
    +instance.current {
    +    // <方案1>
    +    field {
    +        name = "baseInstance"
    +    }.current {
    +        method {
    +            name = "doBaseTask"
    +            param(StringClass)
    +        }.call("task_name")
    +    }
    +    // <方案2>
    +    field {
    +        name = "baseInstance"
    +    }.current()
    +        ?.method {
    +            name = "doBaseTask"
    +            param(StringClass)
    +        }?.call("task_name")
    +}
    +

    注意

    上述 current 方法相当于帮你调用了 CurrentClass 中的 field { ... }.any()?.current() 方法。

    若不存在 CurrentClass 调用域,你需要使用 field { ... }.get(instance).current() 来进行调用。

    问题又来了,我想使用反射的方式创建如下的实例并调用其中的方法,该怎么做呢?

    示例如下

    Test(true).doTask("task_name")
    +

    通常情况下,我们可以使用标准的反射 API 来调用。

    示例如下

    "com.demo.Test".toClass()
    +    .getDeclaredConstructor(Boolean::class.java)
    +    .apply { isAccessible = true }
    +    .newInstance(true)
    +    .apply {
    +        javaClass
    +            .getDeclaredMethod("doTask", String::class.java)
    +            .apply { isAccessible = true }
    +            .invoke(this, "task_name")
    +    }
    +

    但是感觉这种做法好麻烦,有没有更简洁的调用方法呢?

    这个时候,我们还可以借助 buildOf 方法来创建一个实例。

    示例如下

    "com.demo.Test".toClass().buildOf(true) { param(BooleanType) }?.current {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.call("task_name")
    +}
    +

    若你希望 buildOf 方法返回当前实例的类型,你可以在其中加入类型泛型声明,而无需使用 ascast 目标类型。

    这种情况多用于实例本身的构造方法是私有的,但是里面的方法是公有的,这样我们只需要对其构造方法进行反射创建即可。

    示例如下

    // 假设这个 Class 是能够直接被得到的
    +val test = Test::class.java.buildOf<Test>(true) { param(BooleanType) }
    +test.doTask("task_name")
    +

    小提示

    更多功能请参考 CurrentClass 以及 Class.buildOf 方法。

    再次查找

    假设有三个不同版本的 Class,它们都是这个 APP 不同版本相同的 Class

    这里面同样都有一个方法 doTask,假设它们的功能是一样的。

    版本 A 示例如下

    public class Test {
    +
    +    public void doTask() {
    +        // ...
    +    }
    +}
    +

    版本 B 示例如下

    public class Test {
    +
    +    public void doTask(String taskName) {
    +        // ...
    +    }
    +}
    +

    版本 C 示例如下

    public class Test {
    +
    +    public void doTask(String taskName, int type) {
    +        // ...
    +    }
    +}
    +

    我们需要在不同的版本中得到这个相同功能的 doTask 方法,要怎么做呢?

    此时,你可以使用 RemedyPlan 完成你的需求。

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doTask"
    +    emptyParam()
    +}.remedys {
    +    method {
    +        name = "doTask"
    +        param(StringClass)
    +    }.onFind {
    +        // 可在这里实现找到的逻辑
    +    }
    +    method {
    +        name = "doTask"
    +        param(StringClass, IntType)
    +    }.onFind {
    +        // 可在这里实现找到的逻辑
    +    }
    +}.wait(instance) {
    +    // 得到方法的结果
    +}
    +

    特别注意

    使用了 RemedyPlan 的方法查找结果不能再使用 get 的方式得到方法实例,应当使用 wait 方法。

    另外,你还可以在使用 多重查找 的情况下继续使用 RemedyPlan

    示例如下

    // 假设这就是这个 Class 的实例
    +val instance = Test()
    +// 使用 YukiReflection 调用并执行
    +Test::class.java.method {
    +    name = "doTask"
    +    emptyParam()
    +}.remedys {
    +    method {
    +        name = "doTask"
    +        paramCount(0..1)
    +    }.onFind {
    +        // 可在这里实现找到的逻辑
    +    }
    +    method {
    +        name = "doTask"
    +        paramCount(1..2)
    +    }.onFind {
    +        // 可在这里实现找到的逻辑
    +    }
    +}.waitAll(instance) {
    +    // 得到方法的结果
    +}
    +

    相对匹配

    假设当前 APP 中不同版本中存在功能相同的 Class 但仅有 Class 的名称不一样。

    版本 A 示例如下

    public class ATest {
    +
    +    public static void doTask() {
    +        // ...
    +    }
    +}
    +

    版本 B 示例如下

    public class BTest {
    +
    +    public static void doTask() {
    +        // ...
    +    }
    +}
    +

    这个时候我们想在每个版本都调用这个 Class 里的 doTask 方法该怎么做呢?

    通常做法是判断 Class 是否存在。

    示例如下

    // 首先查找到这个 Class
    +val currentClass = 
    +    if("com.demo.ATest".hasClass()) "com.demo.ATest".toClass() else "com.demo.BTest".toClass()
    +// 然后再查找这个方法并调用
    +currentClass.method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    感觉这种方案非常的不优雅且繁琐,那么此时 YukiReflection 就为你提供了一个非常方便的 VariousClass 专门来解决这个问题。

    现在,你可以直接使用以下方式获取到这个 Class

    示例如下

    VariousClass("com.demo.ATest", "com.demo.BTest").get().method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    若当前 Class 在指定的 ClassLoader 中存在,你可以在 get 中填入你的 ClassLoader

    示例如下

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +VariousClass("com.demo.ATest", "com.demo.BTest").get(customClassLoader).method {
    +    name = "doTask"
    +    emptyParam()
    +}.get().call()
    +

    若你不确定所有的 Class 一定会被匹配到,你可以使用 getOrNull 方法。

    示例如下

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +VariousClass("com.demo.ATest", "com.demo.BTest").getOrNull(customClassLoader)?.method {
    +    name = "doTask"
    +    emptyParam()
    +}?.get()?.call()
    +

    小提示

    更多功能请参考 VariousClass

    调用泛型

    在反射过程中,我们可能会遇到泛型问题,在泛型的反射处理上,YukiReflection 同样提供了一个可在任意地方使用的语法糖。

    例如我们有如下的泛型类。

    示例如下

    class TestGeneric<T, R> (t: T, r: R) {
    +
    +    fun foo() {
    +        // ...
    +    }
    +}
    +

    当我们想在当前 Class 中获得泛型 TRClass 实例,只需要如下实现。

    示例如下

    class TestGeneric<T, R> (t: T, r: R) {
    +
    +    fun foo() {
    +        // 获得当前实例的操作对象
    +        // 获得 T 的 Class 实例,在参数第 0 位,默认值可以不写
    +        val tClass = current().generic()?.argument()
    +        // 获得 R 的 Class 实例,在参数第 1 位
    +        val rClass = current().generic()?.argument(index = 1)
    +        // 你还可以使用如下写法
    +        current().generic {
    +             // 获得 T 的 Class 实例,在参数第 0 位,默认值可以不写
    +            val tClass = argument()
    +            // 获得 R 的 Class 实例,在参数第 1 位
    +            val rClass = argument(index = 1)
    +        }
    +    }
    +}
    +

    当我们想在外部调用这个 Class 时,就可以有如下实现。

    示例如下

    // 假设这个就是 T 的 Class
    +class TI {
    +
    +    fun foo() {
    +        // ...
    +    }
    +}
    +// 假设这个就是 T 的实例
    +val tInstance: TI? = ...
    +// 获得 T 的 Class 实例,在参数第 0 位,默认值可以不写,并获得其中的方法 foo 并调用
    +TestGeneric::class.java.generic()?.argument()?.method {
    +    name = "foo"
    +    emptyParam()
    +}?.get(tInstance)?.invoke<TI>()
    +

    小提示

    更多功能请参考 CurrentClass.genericClass.generic 方法以及 GenericClass

    注意误区

    这里列举了使用时可能会遇到的误区部分,可供参考。

    限制性查找条件

    在查找条件中,除了 order只能使用一次 index 功能。

    示例如下

    method {
    +    name = "test"
    +    param(BooleanType).index(num = 2)
    +    // 错误的使用方法,请仅保留一个 index 方法
    +    returnType(StringClass).index(num = 1)
    +}
    +

    以下查找条件的使用是没有任何问题的。

    示例如下

    method {
    +    name = "test"
    +    param(BooleanType).index(num = 2)
    +    order().index(num = 1)
    +}
    +

    必要的查找条件

    在普通方法查找条件中,即使是无参的方法也需要设置查找条件

    假设我们有如下的 Class

    示例如下

    public class TestFoo {
    +
    +    public void foo(String string) {
    +        // ...
    +    }
    +
    +    public void foo() {
    +        // ...
    +    }
    +}
    +

    我们要得到其中的 public void foo() 方法,可以写作如下形式。

    示例如下

    TestFoo::class.java.method {
    +    name = "foo"
    +}
    +

    但是,上面的例子是错误的

    你会发现这个 Class 中有两个 foo 方法,其中一个带有方法参数。

    由于上述例子没有设置 param 的查找条件,得到的结果将会是匹配名称且匹配字节码顺序的第一个方法 public void foo(String string),而不是我们需要的最后一个方法。

    这是一个经常会出现的错误没有方法参数就会丢失方法参数查找条件的使用问题。

    正确的使用方法如下。

    示例如下

    TestFoo::class.java.method {
    +    name = "foo"
    +    // ✅ 正确的使用方法,添加详细的筛选条件
    +    emptyParam()
    +}
    +

    至此,上述的示例将可以完美地匹配到 public void foo() 方法。

    兼容性说明

    在过往历史版本的 API 中是允许匹配不写默认匹配无参方法的做法的,但是最新版本更正了这一问题,请确保你使用的是最新的 API 版本。

    在构造方法查找条件中,即使是无参的构造方法也需要设置查找条件

    假设我们有如下的 Class

    示例如下

    public class TestFoo {
    +
    +    public TestFoo() {
    +        // ...
    +    }
    +}
    +

    我们要得到其中的 public TestFoo() 构造方法,必须写作如下形式。

    示例如下

    TestFoo::class.java.constructor { emptyParam() }
    +

    上面的例子可以成功获取到 public TestFoo() 构造方法。

    如果你写作 constructor() 而丢失了 emptyParam(),此时查找到的结果会是按照字节码顺序排列的的第一位,可能并不是无参的

    兼容性说明

    在过往历史版本的 API 中构造方法不填写任何查找参数会直接找不到构造方法,这是一个 BUG,最新版本已经进行修复,请确保你使用的是最新的 API 版本。

    API 行为变更

    1.2.0 及之后的版本中,constructor() 的行为不再是 constructor { emptyParam() } 而是 constructor {},请注意行为变更合理调整查找参数。

    不设置查找条件

    在不设置查找条件的情况下,使用 field()constructor()method() 将返回当前 Class 下的所有成员对象。

    使用 get(...)give() 的方式获取将只能得到按照字节码顺序排列的的第一位。

    示例如下

    Test::class.java.field().get(...)
    +Test::class.java.method().give()
    +

    如果你想得到全部成员对象,你可以使用 all(...)giveAll()

    示例如下

    Test::class.java.field().all(...)
    +Test::class.java.method().giveAll()
    +

    兼容性说明

    在过往历史版本的 API 中,不设置查找条件将抛出异常,此特性在 1.2.0 及之后的版本中加入。

    字节码类型

    在字节码调用结果中,cast 方法只能指定字节码对应的类型。

    例如我们想得到一个 Boolean 类型的变量,把他转换为 String

    以下是错误的使用方法。

    示例如下

    field {
    +    name = "test"
    +    type = BooleanType
    +}.get().string() // 错误的使用方法,必须 cast 为字节码目标类型
    +

    以下是正确的使用方法。

    示例如下

    field {
    +    name = "test"
    +    type = BooleanType
    +}.get().boolean().toString() // ✅ 正确的使用方法,得到类型后再进行转换
    +

    常用类型扩展

    在查找方法、变量的时候我们通常需要指定所查找的类型。

    示例如下

    field {
    +    name = "test"
    +    type = Boolean::class.javaPrimitiveType
    +}
    +

    在 Kotlin 中表达出 Boolean::class.javaPrimitiveType 这个类型的写法很长,感觉并不方便。

    因此,YukiReflection 为开发者封装了常见的类型调用,其中包含了 Android 的相关类型和 Java 的常见类型与原始类型关键字

    这个时候上面的类型就可以写作如下形式了。

    示例如下

    field {
    +    name = "test"
    +    type = BooleanType
    +}
    +

    在 Java 常见类型中的原始类型 (或基本类型) 关键字都已被封装为 类型 + Type 的方式,例如 IntTypeFloatType (它们的字节码类型为 intfloat)。

    相应地,数组类型也有方便的使用方法,假设我们要获得 String[] 类型的数组。

    需要写做 java.lang.reflect.Array.newInstance(String::class.java, 0).javaClass 才能得到这个类型。

    感觉是不是很麻烦,这个时候我们可以使用方法 ArrayClass(StringClass) 来得到这个类型。

    同时由于 String 是常见类型,所以还可以直接使用 StringArrayClass 来得到这个类型。

    一些常见需求中查找的方法,都有其对应的封装类型以供使用,格式为 类型 + Class

    以下是 Java 中一些特例类型在 YukiReflection 中的封装名称。

    • voidUnitType

    • java.lang.VoidUnitClass

    • java.lang.ObjectAnyClass

    • java.lang.IntegerIntClass

    • java.lang.CharacterCharClass

    注意

    类型 + Type 封装类型会且仅会表示为 Java 原始类型关键字,由于 Kotlin 中不存在原始类型这个概念,所以它们都会被定义为 KClass

    Java 中共有 9 个原始类型关键字,其中 8 个为原始类型,分别为 booleancharbyteshortintfloatlongdouble,其中 void 类型是一个特例。

    同时它们都有 Java 自身对应的封装类型,例如 java.lang.Booleanjava.lang.Integer,这些类型是不相等的,请注意区分。

    同样地,数组也有对应的封装类型,它们也需要与 Java 原始类型关键字 进行区分。

    例如 byte[] 的封装类型为 ByteArrayTypeArrayClass(ByteType),而 Byte[] 的封装类型为 ByteArrayClassArrayClass(ByteClass),这些类型也是不相等的

    同时,欢迎你能贡献更多的常用类型。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/home.html b/zh-cn/api/home.html new file mode 100644 index 0000000..f19ad08 --- /dev/null +++ b/zh-cn/api/home.html @@ -0,0 +1,34 @@ + + + + + + + + + 文档介绍 | Yuki Reflection + + + + + +

    文档介绍

    这里的文档将同步最新 API 版本的相关用法,请保持 YukiReflection 为最新版本以使用最新版本的功能。

    功能描述说明

    功能描述主要介绍当前 API 的相关用法和用途。

    功能示例说明

    功能示例主要展示了当前 API 的基本用法示例,可供参考。

    变更记录说明

    首个版本的功能将标记为 v<version> 添加

    后期新增加的功能将标记为 v<version> 新增

    后期修改的功能将被追加为 v<version> 修改

    后期被作废的功能将标记为 v<version> 作废 并会标注删除线;

    后期被删除的功能将标记为 v<version> 移除 并会标注删除线。

    相关符号说明

    • kt  Kotlin Static File

    • annotation  注解

    • interface  接口

    • object  类 (单例)

    • class  类

    • field  变量或 getset 方法或只读的 get 方法

    • method  方法

    • enum  Enum 常量

    • ext-field  扩展的变量 (全局)

    • ext-method  扩展的方法 (全局)

    • i-ext-field  扩展的变量 (调用域限制)

    • i-ext-method  扩展的方法 (调用域限制)

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/YukiReflection.html b/zh-cn/api/public/com/highcapable/yukireflection/YukiReflection.html new file mode 100644 index 0000000..e6fe0c7 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/YukiReflection.html @@ -0,0 +1,41 @@ + + + + + + + + + YukiReflection - object | Yuki Reflection + + + + + +

    YukiReflection - object

    object YukiReflection
    +

    变更记录

    v1.0.0 添加

    功能描述

    这是 YukiReflection 的装载调用类。

    TAG - field

    const val TAG: String
    +

    变更记录

    v1.0.3 新增

    功能描述

    获取当前 YukiReflection 的名称 (标签)。

    VERSION - field

    const val VERSION: String
    +

    变更记录

    v1.0.3 新增

    功能描述

    获取当前 YukiReflection 的版本。

    API_VERSION_NAME - field

    变更记录

    v1.0.0 添加

    v1.0.3 作废

    不再区分版本名称和版本号,请迁移到 VERSION

    API_VERSION_CODE - field

    变更记录

    v1.0.0 添加

    v1.0.3 作废

    不再区分版本名称和版本号,请迁移到 VERSION

    Configs - object

    object Configs
    +

    变更记录

    v1.0.0 添加

    功能描述

    对 API 相关功能的配置类。

    debugLog - method

    inline fun debugLog(initiate: YLog.Configs.() -> Unit)
    +

    变更记录

    v1.0.3 新增

    功能描述

    配置 YLog.Configs 相关参数。

    debugTag - field

    变更记录

    v1.0.0 添加

    v1.0.3 作废

    请迁移到 debugLog

    isDebug - field

    var isDebug: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    是否启用 Debug 模式。

    默认不启用,启用后将交由日志输出管理器打印详细日志 (例如反射查找功能的耗时) 到控制台。

    isAllowPrintingLogs - field

    变更记录

    v1.0.0 添加

    v1.0.3 作废

    请迁移到 debugLog

    isEnableMemberCache - field

    变更记录

    v1.0.0 添加

    v1.0.2 作废

    Member 的直接缓存功能已被移除,因为其存在内存溢出 (OOM) 问题

    configs - method

    inline fun configs(initiate: Configs.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    功能描述

    Configs 类实现了一个 lambda 方法体。

    你可以轻松地调用它进行配置。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/bean/CurrentClass.html b/zh-cn/api/public/com/highcapable/yukireflection/bean/CurrentClass.html new file mode 100644 index 0000000..ff8865d --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/bean/CurrentClass.html @@ -0,0 +1,49 @@ + + + + + + + + + CurrentClass - class | Yuki Reflection + + + + + +

    CurrentClass - class

    class CurrentClass internal constructor(private val classSet: Class<*>, internal val instance: Any)
    +

    变更记录

    v1.0.0 添加

    功能描述

    当前实例的类操作对象。

    name - field

    val name: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前 classSetClass.getName

    simpleName - field

    val simpleName: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前 classSetClass.getSimpleName

    generic - method

    fun generic(): GenericClass?
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前实例中的泛型父类。

    如果当前实例不存在泛型将返回 null

    generic - method

    inline fun generic(initiate: GenericClass.() -> Unit): GenericClass?
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前实例中的泛型父类。

    如果当前实例不存在泛型将返回 null

    superClass - method

    fun superClass(): SuperClass
    +

    变更记录

    v1.0.0 添加

    功能描述

    调用父类实例。

    field - method

    inline fun field(initiate: FieldConditions): FieldFinder.Result.Instance
    +

    变更记录

    v1.0.0 添加

    功能描述

    调用当前实例中的变量。

    method - method

    inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
    +

    变更记录

    v1.0.0 添加

    功能描述

    调用当前实例中的方法。

    SuperClass - class

    inner class SuperClass internal constructor(private val superClassSet: Class<*>)
    +

    变更记录

    v1.0.0 添加

    功能描述

    当前类的父类实例的类操作对象。

    name - field

    val name: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前 classSet 中父类的 Class.getName

    simpleName - field

    val simpleName: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前 classSet 中父类的 Class.getSimpleName

    generic - method

    fun generic(): GenericClass?
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前实例父类中的泛型父类。

    如果当前实例不存在泛型将返回 null

    generic - method

    inline fun generic(initiate: GenericClass.() -> Unit): GenericClass?
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前实例父类中的泛型父类。

    如果当前实例不存在泛型将返回 null

    field - method

    inline fun field(initiate: FieldConditions): FieldFinder.Result.Instance
    +

    变更记录

    v1.0.0 添加

    功能描述

    调用父类实例中的变量。

    method - method

    inline fun method(initiate: MethodConditions): MethodFinder.Result.Instance
    +

    变更记录

    v1.0.0 添加

    功能描述

    调用父类实例中的方法。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/bean/GenericClass.html b/zh-cn/api/public/com/highcapable/yukireflection/bean/GenericClass.html new file mode 100644 index 0000000..edfcadc --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/bean/GenericClass.html @@ -0,0 +1,37 @@ + + + + + + + + + GenericClass - class | Yuki Reflection + + + + + +

    GenericClass - class

    class GenericClass internal constructor(private val type: ParameterizedType)
    +

    变更记录

    v1.0.0 添加

    功能描述

    当前 Class 的泛型父类操作对象。

    argument - method

    fun argument(index: Int): Class<*>?
    +
    inline fun <reified T> argument(index: Int): Class<T>?
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    方法的返回值可为 null

    功能描述

    获得泛型参数数组下标的 Class 实例。

    注意

    在运行时局部变量的泛型会被擦除,获取不到时将会返回 null

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/bean/VariousClass.html b/zh-cn/api/public/com/highcapable/yukireflection/bean/VariousClass.html new file mode 100644 index 0000000..555016b --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/bean/VariousClass.html @@ -0,0 +1,37 @@ + + + + + + + + + VariousClass - class | Yuki Reflection + + + + + +

    VariousClass - class

    class VariousClass(private vararg val name: String)
    +

    变更记录

    v1.0.0 添加

    功能描述

    这是一个不确定性 Class 类名装载器,通过 name 装载 Class 名称数组。

    get - method

    fun get(loader: ClassLoader? = null, initialize: Boolean): Class<*>
    +

    变更记录

    v1.0.0 添加

    功能描述

    获取匹配的实体类。

    使用当前 loader 装载目标 Class

    getOrNull - method

    fun getOrNull(loader: ClassLoader? = null, initialize: Boolean): Class<*>?
    +

    变更记录

    v1.0.0 添加

    功能描述

    获取匹配的实体类。

    使用当前 loader 装载目标 Class

    匹配不到 Class 会返回 null,不会抛出异常。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html b/zh-cn/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html new file mode 100644 index 0000000..197c7d1 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/factory/ReflectionFactory.html @@ -0,0 +1,132 @@ + + + + + + + + + ReflectionFactory - kt | Yuki Reflection + + + + + +

    ReflectionFactory - kt

    变更记录

    v1.0.0 添加

    功能描述

    这是自定义 MemberClass 相关功能的查找匹配以及 invoke 的封装类。

    LazyClass - class

    open class LazyClass<T> internal constructor(
    +    private val instance: Any,
    +    private val initialize: Boolean,
    +    private val loader: ClassLoaderInitializer?
    +)
    +

    变更记录

    v1.0.3 新增

    功能描述

    懒装载 Class 实例。

    ClassLoader.listOfClasses - ext-method

    fun ClassLoader.listOfClasses(): List<String>
    +

    变更记录

    v1.0.0 添加

    功能描述

    写出当前 ClassLoader 下所有 Class 名称数组。

    注意

    此方法在 Class 数量过多时会非常耗时。

    若要按指定规则查找一个 Class,请使用 ClassLoader.searchClass 方法。

    ClassLoader.searchClass - ext-method

    inline fun ClassLoader.searchClass(context: Context?, name: String, async: Boolean, initiate: ClassConditions): DexClassFinder.Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    通过当前 ClassLoader 按指定条件查找并得到 Dex 中的 Class

    特别注意

    此方法在 Class 数量过多及查找条件复杂时会非常耗时。

    建议启用 async 或设置 name 参数,name 参数将在当前 APP 不同版本中自动进行本地缓存以提升效率。

    如果使用了 asyncname 参数,则必须填写 context 参数。

    此功能尚在试验阶段,性能与稳定性可能仍然存在问题,使用过程遇到问题请向我们报告并帮助我们改进。

    Class.hasExtends - ext-field

    val Class<*>.hasExtends: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    当前 Class 是否有继承关系,父类是 Any 将被认为没有继承关系。

    Class?.extends - ext-method

    infix fun Class<*>?.extends(other: Class<*>?): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    当前 Class 是否继承于 other

    如果当前 Class 就是 other 也会返回 true

    如果当前 Classnullothernull 会返回 false

    功能示例

    你可以使用此方法来判断两个 Class 是否存在继承关系。

    示例如下

    // 假设下面这两个 Class 就是你需要判断的 Class
    +val classA: Class<*>?
    +val classB: Class<*>?
    +// 判断 A 是否继承于 B
    +if (classA extends classB) {
    +    // Your code here.
    +}
    +

    Class?.notExtends - ext-method

    infix fun Class<*>?.notExtends(other: Class<*>?): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    当前 Class 是否不继承于 other

    此方法相当于 extends 的反向判断。

    功能示例

    你可以使用此方法来判断两个 Class 是否不存在继承关系。

    示例如下

    // 假设下面这两个 Class 就是你需要判断的 Class
    +val classA: Class<*>?
    +val classB: Class<*>?
    +// 判断 A 是否不继承于 B
    +if (classA notExtends classB) {
    +    // Your code here.
    +}
    +

    Class?.implements - ext-method

    infix fun Class<*>?.implements(other: Class<*>?): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    当前 Class 是否实现了 other 接口类。

    如果当前 Classnullothernull 会返回 false

    功能示例

    你可以使用此方法来判断两个 Class 是否存在依赖关系。

    示例如下

    // 假设下面这两个 Class 就是你需要判断的 Class
    +val classA: Class<*>?
    +val classB: Class<*>?
    +// 判断 A 是否实现了 B 接口类
    +if (classA implements classB) {
    +    // Your code here.
    +}
    +

    Class?.notImplements - ext-method

    infix fun Class<*>?.notImplements(other: Class<*>?): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    当前 Class 是否未实现 other 接口类。

    此方法相当于 implements 的反向判断。

    功能示例

    你可以使用此方法来判断两个 Class 是否不存在依赖关系。

    示例如下

    // 假设下面这两个 Class 就是你需要判断的 Class
    +val classA: Class<*>?
    +val classB: Class<*>?
    +// 判断 A 是否未实现 B 接口类
    +if (classA notImplements classB) {
    +    // Your code here.
    +}
    +

    Class.toJavaPrimitiveType - ext-method

    fun Class<*>.toJavaPrimitiveType(): Class<*>
    +

    变更记录

    v1.0.0 添加

    功能描述

    自动转换当前 Class 为 Java 原始类型 (Primitive Type)。

    如果当前 Class 为 Java 或 Kotlin 基本类型将自动执行类型转换。

    当前能够自动转换的基本类型如下。

    • kotlin.Unit
    • java.lang.Void
    • java.lang.Boolean
    • java.lang.Integer
    • java.lang.Float
    • java.lang.Double
    • java.lang.Long
    • java.lang.Short
    • java.lang.Character
    • java.lang.Byte

    String.toClass - ext-method

    fun String.toClass(loader: ClassLoader?, initialize: Boolean): Class<*>
    +
    inline fun <reified T> String.toClass(loader: ClassLoader?, initialize: Boolean): Class<T>
    +

    变更记录

    v1.0.0 添加

    功能描述

    通过字符串类名转换为 loader 中的实体类。

    功能示例

    你可以直接填写你要查找的目标 Class,必须在默认 ClassLoader 下存在。

    示例如下

    "com.example.demo.DemoClass".toClass()
    +

    你还可以自定义 Class 所在的 ClassLoader

    示例如下

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +"com.example.demo.DemoClass".toClass(customClassLoader)
    +

    你还可以指定 Class 的目标类型。

    示例如下

    // 指定的 DemoClass 必须存在或为可访问的 stub
    +"com.example.demo.DemoClass".toClass<DemoClass>()
    +

    你还可以设置在获取到这个 Class 时是否自动执行其默认的静态方法块,默认情况下不会执行。

    示例如下

    // 获取并执行 DemoClass 默认的静态方法块
    +"com.example.demo.DemoClass".toClass(initialize = true)
    +

    默认的静态方法块在 Java 中使用如下方式定义。

    示例如下

    public class DemoClass {
    +
    +    static {
    +        // 这里是静态方法块的内容
    +    }
    +
    +    public DemoClass() {
    +        // ...
    +    }
    +}
    +

    String.toClassOrNull - ext-method

    fun String.toClassOrNull(loader: ClassLoader?, initialize: Boolean): Class<*>?
    +
    inline fun <reified T> String.toClassOrNull(loader: ClassLoader?, initialize: Boolean): Class<T>?
    +

    变更记录

    v1.0.0 添加

    功能描述

    通过字符串类名转换为 loader 中的实体类。

    找不到 Class 会返回 null,不会抛出异常。

    功能示例

    用法请参考 String.toClass 方法。

    classOf - method

    inline fun <reified T> classOf(loader: ClassLoader?, initialize: Boolean): Class<T>
    +

    变更记录

    v1.0.0 添加

    功能描述

    通过 T 得到其 Class 实例并转换为实体类。

    功能示例

    我们要获取一个 Class 在 Kotlin 下不通过反射时应该这样做。

    示例如下

    DemoClass::class.java
    +

    现在,你可以直接 cast 一个实例并获取它的 Class 对象,必须在当前 ClassLoader 下存在。

    示例如下

    classOf<DemoClass>()
    +

    若目标存在的 Classstub,通过这种方式,你还可以自定义 Class 所在的 ClassLoader

    示例如下

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +classOf<DemoClass>(customClassLoader)
    +

    lazyClass - method

    fun lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
    +
    inline fun <reified T> lazyClass(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<T>
    +
    fun lazyClass(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.NonNull<Any>
    +

    变更记录

    v1.0.3 新增

    功能描述

    懒装载 Class

    lazyClassOrNull - method

    fun lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
    +
    inline fun <reified T> lazyClassOrNull(name: String, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<T>
    +
    fun lazyClassOrNull(variousClass: VariousClass, initialize: Boolean, loader: ClassLoaderInitializer?): LazyClass.Nullable<Any>
    +

    变更记录

    v1.0.3 新增

    功能描述

    懒装载 Class

    String.hasClass - ext-method

    fun String.hasClass(loader: ClassLoader?): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    通过字符串类名使用指定的 ClassLoader 查找是否存在。

    功能示例

    你可以轻松的使用此方法判断字符串中的类是否存在,效果等同于直接使用 Class.forName

    示例如下

    if("com.example.demo.DemoClass".hasClass()) {
    +    // Your code here.
    +}
    +

    填入方法中的 loader 参数可判断指定的 ClassLoader 中的 Class 是否存在。

    示例如下

    val customClassLoader: ClassLoader? = ... // 假设这个就是你的 ClassLoader
    +if("com.example.demo.DemoClass".hasClass(customClassLoader)) {
    +    // Your code here.
    +}
    +

    Class.hasField - ext-method

    inline fun Class<*>.hasField(initiate: FieldConditions): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    查找变量是否存在。

    Class.hasMethod - ext-method

    inline fun Class<*>.hasMethod(initiate: MethodConditions): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    查找方法是否存在。

    Class.hasConstructor - ext-method

    inline fun Class<*>.hasConstructor(initiate: ConstructorConditions): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    查找构造方法是否存在。

    Member.hasModifiers - ext-method

    inline fun Member.hasModifiers(conditions: ModifierConditions): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    查找 Member 中匹配的描述符。

    Class.hasModifiers - ext-method

    inline fun Class<*>.hasModifiers(conditions: ModifierConditions): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    查找 Class 中匹配的描述符。

    Class.field - ext-method

    inline fun Class<*>.field(initiate: FieldConditions): FieldFinder.Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    查找并得到变量。

    Class.method - ext-method

    inline fun Class<*>.method(initiate: MethodConditions): MethodFinder.Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    查找并得到方法。

    Class.constructor - ext-method

    inline fun Class<*>.constructor(initiate: ConstructorConditions): ConstructorFinder.Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    查找并得到构造方法。

    Class.generic - ext-method

    fun Class<*>.generic(): GenericClass?
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前 Class 的泛型父类。

    如果当前实例不存在泛型将返回 null

    Class.generic - ext-method

    inline fun Class<*>.generic(initiate: GenericClass.() -> Unit): GenericClass?
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前 Class 的泛型父类。

    如果当前实例不存在泛型将返回 null

    Any.current - ext-method

    inline fun <reified T : Any> T.current(ignored: Boolean): CurrentClass
    +
    inline fun <reified T : Any> T.current(ignored: Boolean, initiate: CurrentClass.() -> Unit): T
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前实例的类操作对象。

    Class.buildOf - ext-method

    inline fun Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): Any?
    +
    inline fun <T> Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): T?
    +

    变更记录

    v1.0.0 添加

    功能描述

    通过构造方法创建新实例,指定类型 T 或任意类型 Any

    Class.allMethods - ext-method

    inline fun Class<*>.allMethods(isAccessible: Boolean, result: (index: Int, method: Method) -> Unit)
    +

    变更记录

    v1.0.0 添加

    功能描述

    遍历当前类中的所有方法。

    Class.allConstructors - ext-method

    inline fun Class<*>.allConstructors(isAccessible: Boolean, result: (index: Int, constructor: Constructor<*>) -> Unit)
    +

    变更记录

    v1.0.0 添加

    功能描述

    遍历当前类中的所有构造方法。

    Class.allFields - ext-method

    inline fun Class<*>.allFields(isAccessible: Boolean, result: (index: Int, field: Field) -> Unit)
    +

    变更记录

    v1.0.0 添加

    功能描述

    遍历当前类中的所有变量。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html new file mode 100644 index 0000000..b03536e --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/BaseFinder.html @@ -0,0 +1,42 @@ + + + + + + + + + BaseFinder - class | Yuki Reflection + + + + + +

    BaseFinder - class

    abstract class BaseFinder
    +

    变更记录

    v1.0.0 添加

    功能描述

    这是 ClassMember 查找类功能的基本类实现。

    BaseFinder.IndexTypeCondition - class

    inner class IndexTypeCondition internal constructor(private val type: IndexConfigType)
    +

    变更记录

    v1.0.0 添加

    功能描述

    字节码下标筛选实现类。

    index - method

    fun index(num: Int)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置下标。

    index 小于零则为倒序,此时可以使用 IndexTypeConditionSort.reverse 方法实现。

    可使用 IndexTypeConditionSort.firstIndexTypeConditionSort.last 设置首位和末位筛选条件。

    index - method

    fun index(): IndexTypeConditionSort
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到下标。

    IndexTypeConditionSort - class

    inner class IndexTypeConditionSort internal constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    字节码下标排序实现类。

    first - method

    fun first()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置满足条件的第一个。

    last - method

    fun last()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置满足条件的最后一个。

    reverse - method

    fun reverse(num: Int)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置倒序下标。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html new file mode 100644 index 0000000..fd0ccf6 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/CountRules.html @@ -0,0 +1,39 @@ + + + + + + + + + CountRules - class | Yuki Reflection + + + + + +

    CountRules - class

    class CountRules private constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    这是一个模糊 ClassMember 数组 (下标) 个数条件实现类。

    可对 R8 混淆后的 ClassMember 进行更加详细的定位。

    Int.isZero - i-ext-method

    fun Int.isZero(): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    是否为 0。

    Int.moreThan - i-ext-method

    fun Int.moreThan(count: Int): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    大于 count

    Int.lessThan - i-ext-method

    fun Int.lessThan(count: Int): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    小于 count

    Int.inInterval - i-ext-method

    fun Int.inInterval(countRange: IntRange): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    countRange 区间 A ≤ this ≤ B。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html new file mode 100644 index 0000000..c415f48 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ModifierRules.html @@ -0,0 +1,47 @@ + + + + + + + + + ModifierRules - class | Yuki Reflection + + + + + +

    ModifierRules - class

    class ModifierRules private constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    这是一个 ClassMember 描述符条件实现类。

    可对 R8 混淆后的 ClassMember 进行更加详细的定位。

    isPublic - i-ext-field

    val isPublic: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    ClassMember 类型是否包含 public

    isPrivate - i-ext-field

    val isPrivate: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    ClassMember 类型是否包含 private

    isProtected - i-ext-field

    val isProtected: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    ClassMember 类型是否包含 protected

    isStatic - i-ext-field

    val isStatic: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    ClassMember 类型是否包含 static

    对于任意的静态 ClassMember 可添加此描述进行确定。

    注意

    Kotlin → Jvm 后的 object 类中的方法并不是静态的。

    isFinal - i-ext-field

    val isFinal: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    ClassMember 类型是否包含 final

    注意

    Kotlin → Jvm 后没有 open 符号标识的 ClassMember 和没有任何关联的 ClassMember 都将为 final

    isSynchronized - i-ext-field

    val isSynchronized: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    ClassMember 类型是否包含 synchronized

    isVolatile - i-ext-field

    val isVolatile: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    Field 类型是否包含 volatile

    isTransient - i-ext-field

    val isTransient: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    Field 类型是否包含 transient

    isNative - i-ext-field

    val isNative: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    Method 类型是否包含 native

    对于任意 JNI 对接的 Method 可添加此描述进行确定。

    isInterface - i-ext-field

    val isInterface: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    Class 类型是否包含 interface

    isAbstract - i-ext-field

    val isAbstract: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    ClassMember 类型是否包含 abstract

    对于任意的抽象 ClassMember 可添加此描述进行确定。

    isStrict - i-ext-field

    val isStrict: Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    ClassMember 类型是否包含 strictfp

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html new file mode 100644 index 0000000..20730be --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/NameRules.html @@ -0,0 +1,42 @@ + + + + + + + + + NameRules - class | Yuki Reflection + + + + + +

    NameRules - class

    class NameRules private constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    这是一个模糊 ClassMember 名称条件实现类。

    可对 R8 混淆后的 ClassMember 进行更加详细的定位。

    String.isSynthetic - i-ext-method

    fun String.isSynthetic(index: Int): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    是否为匿名类的主类调用对象。

    String.isOnlySymbols - i-ext-method

    fun String.isOnlySymbols(): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    是否只有符号。

    String.isOnlyLetters - i-ext-method

    fun String.isOnlyLetters(): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    是否只有字母。

    String.isOnlyNumbers - i-ext-method

    fun String.isOnlyNumbers(): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    是否只有数字。

    String.isOnlyLettersNumbers - i-ext-method

    fun String.isOnlyLettersNumbers(): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    是否只有字母或数字。

    String.isOnlyLowercase - i-ext-method

    fun String.isOnlyLowercase(): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    是否只有小写字母。

    在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。

    String.isOnlyUppercase - i-ext-method

    fun String.isOnlyUppercase(): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    是否只有大写字母。

    在没有其它条件的情况下设置此条件允许判断对象存在字母以外的字符。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html new file mode 100644 index 0000000..987ecb5 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/base/rules/ObjectRules.html @@ -0,0 +1,35 @@ + + + + + + + + + ObjectRules - class | Yuki Reflection + + + + + +

    ObjectRules - class

    class ObjectRules private constructor(private val instance: Any)
    +

    变更记录

    v1.0.0 添加

    功能描述

    这是一个任意对象条件实现类。

    可对 R8 混淆后的 ClassMember 进行更加详细的定位。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html new file mode 100644 index 0000000..c74f86e --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/DexClassFinder.html @@ -0,0 +1,79 @@ + + + + + + + + + DexClassFinder - class | Yuki Reflection + + + + + +

    DexClassFinder - class

    class DexClassFinder internal constructor(
    +    private val context: Context?,
    +    internal var name: String,
    +    internal var async: Boolean,
    +    override val loaderSet: ClassLoader?
    +) : ClassBaseFinder
    +

    变更记录

    v1.0.0 添加

    功能描述

    Class 查找类。

    可使用 BaseDexClassLoader 通过指定条件查找指定 Class 或一组 Class

    注意

    此功能尚在试验阶段,性能与稳定性可能仍然存在问题,使用过程遇到问题请向我们报告并帮助我们改进。

    companion object - object

    变更记录

    v1.0.0 添加

    clearCache - method

    fun clearCache(context: Context, versionName: String?, versionCode: Long?)
    +

    变更记录

    v1.0.0 添加

    功能描述

    清除当前 DexClassFinderClass 缓存。

    适用于全部通过 ClassLoader.searchClass 获取的 DexClassFinder

    fullName - field

    var fullName: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 完整名称。

    只会查找匹配到的 Class.getName

    例如 com.demo.Test 需要填写 com.demo.Test

    simpleName - field

    var simpleName: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 简单名称。

    只会查找匹配到的 Class.getSimpleName

    例如 com.demo.Test 只需要填写 Test

    对于匿名类例如 com.demo.Test$InnerTest 会为空,此时你可以使用 singleName

    singleName - field

    var singleName: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 独立名称。

    设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

    例如 com.demo.Test 只需要填写 Test

    对于匿名类例如 com.demo.Test$InnerTest 只需要填写 Test$InnerTest

    from - method

    fun from(vararg name: String): FromPackageRules
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置在指定包名范围查找当前 Class

    设置后仅会在当前 name 开头匹配的包名路径下进行查找,可提升查找速度。

    例如 ↓

    com.demo.test

    com.demo.test.demo

    注意

    建议设置此参数指定查找范围,否则 Class 过多时将会非常慢。

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 标识符筛选条件。

    可不设置筛选条件。

    fullName - method

    fun fullName(value: String): ClassNameRules
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 完整名称。

    只会查找匹配到的 Class.getName

    例如 com.demo.Test 需要填写 com.demo.Test

    simpleName - method

    fun simpleName(value: String): ClassNameRules
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 简单名称。

    只会查找匹配到的 Class.getSimpleName

    例如 com.demo.Test 只需要填写 Test

    对于匿名类例如 com.demo.Test$InnerTest 会为空,此时你可以使用 singleName

    singleName - method

    fun singleName(value: String): ClassNameRules
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 独立名称。

    设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

    例如 com.demo.Test 只需要填写 Test

    对于匿名类例如 com.demo.Test$InnerTest 只需要填写 Test$InnerTest

    fullName - method

    fun fullName(conditions: NameConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 完整名称条件。

    只会查找匹配到的 Class.getName

    simpleName - method

    fun simpleName(conditions: NameConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 简单名称条件。

    只会查找匹配到的 Class.getSimpleName

    singleName - method

    fun singleName(conditions: NameConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 独立名称条件。

    设置后将首先使用 Class.getSimpleName,若为空则会使用 Class.getName 进行处理。

    extends - method

    inline fun <reified T> extends()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 继承的父类。

    extends - method

    fun extends(vararg name: String)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 继承的父类。

    会同时查找 name 中所有匹配的父类。

    implements - method

    inline fun <reified T> implements()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 实现的接口类。

    implements - method

    fun implements(vararg name: String)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 实现的接口类。

    会同时查找 name 中所有匹配的接口类。

    anonymous - method

    fun anonymous()
    +

    变更记录

    v1.0.0 添加

    功能描述

    标识 Class 为匿名类。

    例如 com.demo.Test$1com.demo.Test$InnerTest

    标识后你可以使用 enclosing 来进一步指定匿名类的 (封闭类) 主类。

    noExtends - method

    fun noExtends()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 没有任何继承。

    此时 Class 只应该继承于 Any

    注意

    设置此条件后 extends 将失效。

    noImplements - method

    fun noImplements()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 没有任何接口。

    注意

    设置此条件后 implements 将失效。

    noSuper - method

    fun noSuper()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 没有任何继承与接口。

    此时 Class 只应该继承于 Any

    注意

    设置此条件后 extendsimplements 将失效。

    enclosing - method

    inline fun <reified T> enclosing()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 匿名类的 (封闭类) 主类。

    enclosing - method

    fun enclosing(vararg name: String)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 匿名类的 (封闭类) 主类。

    会同时查找 name 中所有匹配的 (封闭类) 主类。

    FromPackageRules - class

    inner class FromPackageRules internal constructor(private val packages: MutableList<ClassRulesData.PackageRulesData>)
    +

    变更记录

    v1.0.0 添加

    功能描述

    包名范围名称过滤匹配条件实现类。

    absolute - method

    fun absolute()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置包名绝对匹配。

    例如有如下包名 ↓

    com.demo.test.a

    com.demo.test.a.b

    com.demo.test.active

    若包名条件为 com.demo.test.a 则绝对匹配仅能匹配到第一个。

    相反地,不设置以上示例会全部匹配。

    ClassNameRules - class

    inner class ClassNameRules internal constructor(private val name: ClassRulesData.NameRulesData)
    +

    变更记录

    v1.0.0 添加

    功能描述

    类名匹配条件实现类。

    optional - method

    fun optional()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置类名可选。

    例如有如下类名 ↓

    com.demo.Test fullName / Test simpleName

    defpackage.a fullName / a simpleName

    这两个类名都是同一个类,但是在有些版本中被混淆有些版本没有。

    此时可设置类名为 com.demo.Test fullName / Test simpleName

    这样就可在完全匹配类名情况下使用类名而忽略其它查找条件,否则忽略此条件继续使用其它查找条件。

    member - method

    inline fun member(initiate: MemberRules.() -> Unit): MemberRulesResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 满足的 Member 条件。

    field - method

    inline fun field(initiate: FieldRules.() -> Unit): MemberRulesResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 满足的 Field 条件。

    method - method

    inline fun method(initiate: MethodRules.() -> Unit): MemberRulesResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 满足的 Method 条件。

    constructor - method

    inline fun constructor(initiate: ConstructorRules.() -> Unit): MemberRulesResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Class 满足的 Constructor 条件。

    Result - class

    inner class Result internal constructor(internal var isNotFound: Boolean, internal var throwable: Throwable?) : BaseResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    Class 查找结果实现类。

    result - method

    inline fun result(initiate: Result.() -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建监听结果事件方法体。

    get - method

    fun get(): Class<*>?
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到 Class 本身。

    若有多个 Class 结果只会返回第一个。

    在查找条件找不到任何结果的时候将返回 null

    若你设置了 async 请使用 wait 方法。

    all - method

    fun all(): MutableList<Class<*>>
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    返回值类型由 HashSet 修改为 MutableList

    功能描述

    得到 Class 本身数组。

    返回全部查找条件匹配的多个 Class 实例。

    在查找条件找不到任何结果的时候将返回空的 MutableList

    若你设置了 async 请使用 waitAll 方法。

    all - method

    fun all(result: (Class<*>) -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到 Class 本身数组 (依次遍历)。

    回调全部查找条件匹配的多个 Class 实例。

    在查找条件找不到任何结果的时候将不会执行。

    若你设置了 async 请使用 waitAll 方法。

    wait - method

    fun wait(result: (Class<*>?) -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到 Class 本身 (异步)。

    若有多个 Class 结果只会回调第一个。

    在查找条件找不到任何结果的时候将回调 null。

    你需要设置 async 后此方法才会被回调,否则请使用 get 方法。

    waitAll - method

    fun waitAll(result: (MutableList<Class<*>>) -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    result 类型由 HashSet 修改为 MutableList

    功能描述

    得到 Class 本身数组 (异步)。

    回调全部查找条件匹配的多个 Class 实例。

    在查找条件找不到任何结果的时候将回调空的 MutableList

    你需要设置 async 后此方法才会被回调,否则请使用 all 方法。

    onNoClassDefFoundError - method

    fun onNoClassDefFoundError(result: (Throwable) -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    监听找不到 Class 时。

    ignored - method

    fun ignored(): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    忽略异常并停止打印任何错误日志。

    此时若要监听异常结果,你需要手动实现 onNoClassDefFoundError 方法。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html new file mode 100644 index 0000000..5005d05 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.html @@ -0,0 +1,42 @@ + + + + + + + + + ConstructorRules - class | Yuki Reflection + + + + + +

    ConstructorRules - class

    class ConstructorRules internal constructor(private val rulesData: ConstructorRulesData) : BaseRules
    +

    变更记录

    v1.0.0 添加

    功能描述

    Constructor 查找条件实现类。

    paramCount - field

    var paramCount: Int
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

    若参数个数小于零则忽略并使用 param

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 标识符筛选条件。

    可不设置筛选条件。

    emptyParam - method

    fun emptyParam()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 空参数、无参数。

    param - method

    fun param(vararg paramType: Any)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数。

    如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

    如果 Constructor 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

    特别注意

    无参 Constructor 请使用 emptyParam 设置查找条件。

    有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

    param - method

    fun param(conditions: ObjectsConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数条件。

    特别注意

    无参 Constructor 请使用 emptyParam 设置查找条件。

    有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

    paramCount - method

    fun paramCount(numRange: IntRange)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数个数范围。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

    paramCount - method

    fun paramCount(conditions: CountConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数个数条件。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html new file mode 100644 index 0000000..2e13750 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/FieldRules.html @@ -0,0 +1,40 @@ + + + + + + + + + FieldRules - class | Yuki Reflection + + + + + +

    FieldRules - class

    class FieldRules internal constructor(private val rulesData: FieldRulesData) : BaseRules
    +

    变更记录

    v1.0.0 添加

    功能描述

    Field 查找条件实现类。

    name - field

    var name: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 名称。

    type - field

    var type: Any?
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 类型。

    可不填写类型。

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 标识符筛选条件。

    可不设置筛选条件。

    name - method

    fun name(conditions: NameConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 名称条件。

    type - method

    fun type(conditions: ObjectConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 类型条件。

    可不填写类型。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html new file mode 100644 index 0000000..da1c626 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MemberRules.html @@ -0,0 +1,36 @@ + + + + + + + + + MemberRules - class | Yuki Reflection + + + + + +

    MemberRules - class

    class MemberRules internal constructor(private val rulesData: MemberRulesData) : BaseRules
    +

    变更记录

    v1.0.0 添加

    功能描述

    Member 查找条件实现类。

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Member 标识符筛选条件。

    可不设置筛选条件。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html new file mode 100644 index 0000000..a652762 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/MethodRules.html @@ -0,0 +1,46 @@ + + + + + + + + + MethodRules - class | Yuki Reflection + + + + + +

    MethodRules - class

    class MethodRules internal constructor(private val rulesData: MethodRulesData) : BaseRules
    +

    变更记录

    v1.0.0 添加

    功能描述

    Method 查找条件实现类。

    name - field

    var name: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 名称。

    paramCount - field

    var paramCount: Int
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

    若参数个数小于零则忽略并使用 param

    returnType - field

    var returnType: Any?
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 返回值。

    可不填写返回值。

    modifiers - method

    fun modifiers(conditions: ModifierConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 标识符筛选条件。

    可不设置筛选条件。

    emptyParam - method

    fun emptyParam()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 空参数、无参数。

    param - method

    fun param(vararg paramType: Any)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数。

    如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

    如果 Method 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

    特别注意

    无参 Method 请使用 emptyParam 设置查找条件。

    有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

    param - method

    fun param(conditions: ObjectsConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数条件。

    特别注意

    无参 Method 请使用 emptyParam 设置查找条件。

    有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

    name - method

    fun name(conditions: NameConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 名称条件。

    paramCount - method

    fun paramCount(numRange: IntRange)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数个数范围。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

    paramCount - method

    fun paramCount(conditions: CountConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数个数条件。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

    returnType - method

    fun returnType(conditions: ObjectConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 返回值条件。

    可不填写返回值。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html new file mode 100644 index 0000000..062dfc2 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.html @@ -0,0 +1,39 @@ + + + + + + + + + MemberRulesResult - class | Yuki Reflection + + + + + +

    MemberRulesResult - class

    class MemberRulesResult internal constructor(private val rulesData: MemberRulesData)
    +

    变更记录

    v1.0.0 添加

    功能描述

    当前 Member 查找条件结果实现类。

    none - method

    fun none(): MemberRulesResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置当前 Member 在查找条件中个数为 0

    count - method

    fun count(num: Int): MemberRulesResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置当前 Member 在查找条件中需要全部匹配的个数。

    count - method

    fun count(numRange: IntRange): MemberRulesResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置当前 Member 在查找条件中需要全部匹配的个数范围。

    count - method

    fun count(conditions: CountConditions): MemberRulesResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置当前 Member 在查找条件中需要全部匹配的个数条件。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html new file mode 100644 index 0000000..266fad9 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/members/ConstructorFinder.html @@ -0,0 +1,99 @@ + + + + + + + + + ConstructorFinder - class | Yuki Reflection + + + + + +

    ConstructorFinder - class

    class ConstructorFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
    +

    变更记录

    v1.0.0 添加

    功能描述

    Constructor 查找类。

    可通过指定类型查找指定 Constructor 或一组 Constructor

    paramCount - field

    var paramCount: Int
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

    若参数个数小于零则忽略并使用 param

    modifiers - method

    fun modifiers(conditions: ModifierConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 标识符筛选条件。

    可不设置筛选条件,默认模糊查找并取第一个匹配的 Constructor

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    emptyParam - method

    fun emptyParam(): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 空参数、无参数。

    param - method

    fun param(vararg paramType: Any): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数。

    如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

    如果 Constructor 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

    特别注意

    无参 Constructor 请使用 emptyParam 设置查找条件。

    有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    param - method

    fun param(conditions: ObjectsConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数条件。

    特别注意

    无参 Constructor 请使用 emptyParam 设置查找条件。

    有参 Constructor 必须使用此方法设定参数或使用 paramCount 指定个数。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(num: Int): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数。

    若参数个数小于零则忽略并使用 param

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(numRange: IntRange): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数个数范围。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(conditions: CountConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Constructor 参数个数条件。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    superClass - method

    fun superClass(isOnlySuperClass: Boolean)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置在 classSet 的所有父类中查找当前 Constructor

    注意

    若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

    RemedyPlan - class

    inner class RemedyPlan internal constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    Constructor 重查找实现类,可累计失败次数直到查找成功。

    constructor - method

    inline fun constructor(initiate: ConstructorConditions)
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建需要重新查找的 Constructor

    你可以添加多个备选 Constructor,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

    Result - class

    inner class Result internal constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    RemedyPlan 结果实现类。

    onFind - method

    fun onFind(initiate: MutableList<Constructor<*>>.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    initiate 类型由 HashSet 修改为 MutableList

    功能描述

    当在 RemedyPlan 中找到结果时。

    功能示例

    你可以方便地对重查找的 Constructor 实现 onFind 方法。

    示例如下

    constructor {
    +    // Your code here.
    +}.onFind {
    +    // Your code here.
    +}
    +

    Result - class

    inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    Constructor 查找结果实现类。

    result - method

    inline fun result(initiate: Result.() -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建监听结果事件方法体。

    功能示例

    你可以使用 lambda 形式创建 Result 类。

    示例如下

    constructor {
    +    // Your code here.
    +}.result {
    +    get().call()
    +    all()
    +    remedys {}
    +    onNoSuchConstructor {}
    +}
    +

    get - method

    fun get(): Instance
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得 Constructor 实例处理类。

    若有多个 Constructor 结果只会返回第一个。

    特别注意

    若你设置了 remedys 请使用 wait 回调结果方法。

    功能示例

    你可以通过获得方法所在实例来执行构造方法创建新的实例对象。

    示例如下

    constructor {
    +    // Your code here.
    +}.get().call()
    +

    你可以 cast 构造方法为指定类型的实例对象。

    示例如下

    constructor {
    +    // Your code here.
    +}.get().newInstance<TestClass>()
    +

    特别注意

    若构造方法含有参数则后方参数必填。

    示例如下

    constructor {
    +    // Your code here.
    +}.get().newInstance<TestClass>("param1", "param2")
    +

    all - method

    fun all(): MutableList<Instance>
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    返回值类型由 ArrayList 修改为 MutableList

    功能描述

    获得 Constructor 实例处理类数组。

    返回全部查找条件匹配的多个 Constructor 实例结果。

    功能示例

    你可以通过此方法来获得当前条件结果中匹配的全部 Constructor

    示例如下

    constructor {
    +    // Your code here.
    +}.all().forEach { instance ->
    +    instance.call(...)
    +}
    +

    give - method

    fun give(): Constructor<*>?
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到 Constructor 本身。

    若有多个 Constructor 结果只会返回第一个。

    在查找条件找不到任何结果的时候将返回 null

    giveAll - method

    fun giveAll(): MutableList<Constructor<*>>
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    返回值类型由 HashSet 修改为 MutableList

    功能描述

    得到 Constructor 本身数组。

    返回全部查找条件匹配的多个 Constructor 实例。

    在查找条件找不到任何结果的时候将返回空的 MutableList

    wait - method

    fun wait(initiate: Instance.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得 Constructor 实例处理类,配合 RemedyPlan 使用。

    若有多个 Constructor 结果只会返回第一个。

    特别注意

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    waitAll - method

    fun waitAll(initiate: MutableList<Instance>.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    initiate 类型由 ArrayList 修改为 MutableList

    功能描述

    获得 Constructor 实例处理类数组,配合 RemedyPlan 使用。

    返回全部查找条件匹配的多个 Constructor 实例结果。

    特别注意

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    remedys - method

    inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建 Constructor 重查找功能。

    功能示例

    当你遇到一种 Constructor 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchConstructor 捕获异常二次查找 Constructor

    若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

    示例如下

    constructor {
    +    // Your code here.
    +}.remedys {
    +    constructor {
    +        // Your code here.
    +    }
    +    constructor {
    +        // Your code here.
    +    }
    +}
    +

    onNoSuchConstructor - method

    inline fun onNoSuchConstructor(result: (Throwable) -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    监听找不到 Constructor 时。

    只会返回第一次的错误信息,不会返回 RemedyPlan 的错误信息。

    ignored - method

    fun ignored(): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    忽略异常并停止打印任何错误日志。

    注意

    此时若要监听异常结果,你需要手动实现 onNoSuchConstructor 方法。

    Instance - class

    inner class Instance internal constructor(private val constructor: Constructor<*>?)
    +

    变更记录

    v1.0.0 添加

    功能描述

    Constructor 实例处理类。

    call - method

    fun call(vararg args: Any?): Any?
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Constructor 创建目标实例,不指定目标实例类型。

    newInstance - method

    fun <T> newInstance(vararg args: Any?): T?
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Constructor 创建目标实例 ,指定 T 目标实例类型。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html new file mode 100644 index 0000000..a6c5c61 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/members/FieldFinder.html @@ -0,0 +1,117 @@ + + + + + + + + + FieldFinder - class | Yuki Reflection + + + + + +

    FieldFinder - class

    class FieldFinder internal constructor(override val classSet: Class<*>?) : MemberBaseFinder
    +

    变更记录

    v1.0.0 添加

    功能描述

    Field 查找类。

    可通过指定类型查找指定 Field 或一组 Field

    name - field

    var name: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 名称。

    特别注意

    若不填写名称则必须存在一个其它条件。

    type - field

    var type: Any?
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 类型。

    可不填写类型。

    modifiers - method

    fun modifiers(conditions: ModifierConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 标识符筛选条件。

    可不设置筛选条件。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    order - method

    fun order(): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    顺序筛选字节码的下标。

    name - method

    fun name(value: String): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 名称。

    特别注意

    若不填写名称则必须存在一个其它条件。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    name - method

    fun name(conditions: NameConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 名称条件。

    特别注意

    若不填写名称则必须存在一个其它条件。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    type - method

    fun type(value: Any): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 类型。

    可不填写类型。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    type - method

    fun type(conditions: ObjectConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Field 类型条件。

    可不填写类型。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    superClass - method

    fun superClass(isOnlySuperClass: Boolean)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置在 classSet 的所有父类中查找当前 Field

    注意

    若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

    RemedyPlan - class

    inner class RemedyPlan internal constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    Field 重查找实现类,可累计失败次数直到查找成功。

    field - method

    inline fun field(initiate: FieldConditions): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建需要重新查找的 Field

    你可以添加多个备选 Field,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

    Result - class

    inner class Result internal constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    RemedyPlan 结果实现类。

    onFind - method

    fun onFind(initiate: MutableList<Field>.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    initiate 类型由 HashSet 修改为 MutableList

    功能描述

    当在 RemedyPlan 中找到结果时。

    功能示例

    你可以方便地对重查找的 Field 实现 onFind 方法。

    示例如下

    field {
    +    // Your code here.
    +}.onFind {
    +    // Your code here.
    +}
    +

    Result - class

    inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    Field 查找结果实现类。

    result - method

    inline fun result(initiate: Result.() -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建监听结果事件方法体。

    功能示例

    你可以使用 lambda 形式创建 Result 类。

    示例如下

    field {
    +    // Your code here.
    +}.result {
    +    get(instance).set("something")
    +    get(instance).string()
    +    get(instance).cast<CustomClass>()
    +    get().boolean()
    +    all(instance)
    +    give()
    +    giveAll()
    +    onNoSuchField {}
    +}
    +

    get - method

    fun get(instance: Any?): Instance
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得 Field 实例处理类。

    若有多个 Field 结果只会返回第一个。

    功能示例

    你可以轻松地得到 Field 的实例以及使用它进行设置实例。

    示例如下

    field {
    +    // Your code here.
    +}.get(instance).set("something")
    +

    如果你取到的是静态 Field,可以不需要设置实例。

    示例如下

    field {
    +    // Your code here.
    +}.get().set("something")
    +

    all - method

    fun all(instance: Any?): MutableList<Instance>
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    返回值类型由 ArrayList 修改为 MutableList

    功能描述

    获得 Field 实例处理类数组。

    返回全部查找条件匹配的多个 Field 实例结果。

    功能示例

    你可以通过此方法来获得当前条件结果中匹配的全部 Field,其 Field 所在实例用法与 get 相同。

    示例如下

    field {
    +    // Your code here.
    +}.all(instance).forEach { instance ->
    +    instance.self
    +}
    +

    give - method

    fun give(): Field?
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到 Field 本身。

    若有多个 Field 结果只会返回第一个。

    在查找条件找不到任何结果的时候将返回 null

    giveAll - method

    fun giveAll(): MutableList<Field>
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    返回值类型由 HashSet 修改为 MutableList

    功能描述

    得到 Field 本身数组。

    返回全部查找条件匹配的多个 Field 实例。

    在查找条件找不到任何结果的时候将返回空的 MutableList

    wait - method

    fun wait(instance: Any?, initiate: Instance.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得 Field 实例处理类,配合 RemedyPlan 使用。

    若有多个 Field 结果只会返回第一个。

    特别注意

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    waitAll - method

    fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    initiate 类型由 ArrayList 修改为 MutableList

    功能描述

    获得 Field 实例处理类数组,配合 RemedyPlan 使用。

    返回全部查找条件匹配的多个 Field 实例结果。

    特别注意

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    remedys - method

    inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建 Field 重查找功能。

    功能示例

    当你遇到一种 Field 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchField 捕获异常二次查找 Field

    若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

    示例如下

    field {
    +    // Your code here.
    +}.remedys {
    +    field {
    +        // Your code here.
    +    }
    +    field {
    +        // Your code here.
    +    }
    +}
    +

    onNoSuchField - method

    fun onNoSuchField(result: (Throwable) -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    监听找不到 Field 时。

    ignored - method

    fun ignored(): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    忽略异常并停止打印任何错误日志。

    注意

    此时若要监听异常结果,你需要手动实现 onNoSuchField 方法。

    Instance - class

    inner class Instance internal constructor(private val instance: Any?, private val field: Field?)
    +

    变更记录

    v1.0.0 添加

    功能描述

    Field 实例变量处理类。

    current - method

    fun current(ignored: Boolean): CurrentClass?
    +
    inline fun current(ignored: Boolean, initiate: CurrentClass.() -> Unit): Any?
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得当前 Field 自身 self 实例的类操作对象 CurrentClass

    cast - method

    fun <T> cast(): T?
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field 实例。

    byte - method

    fun byte(): Byte?
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Byte 实例。

    int - method

    fun int(): Int
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Int 实例。

    long - method

    fun long(): Long
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Long 实例。

    short - method

    fun short(): Short
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Short 实例。

    double - method

    fun double(): Double
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Double 实例。

    float - method

    fun float(): Float
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Float 实例。

    string - method

    fun string(): String
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field String 实例。

    char - method

    fun char(): Char
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Char 实例。

    boolean - method

    fun boolean(): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Boolean 实例。

    any - method

    fun any(): Any?
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Any 实例。

    array - method

    inline fun <reified T> array(): Array<T>
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field Array 实例。

    list - method

    inline fun <reified T> list(): List<T>
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到当前 Field List 实例。

    set - method

    fun set(any: Any?)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置当前 Field 实例。

    setTrue - method

    fun setTrue()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置当前 Field 实例为 true

    特别注意

    请确保实例对象类型为 Boolean

    setFalse - method

    fun setFalse()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置当前 Field 实例为 false

    特别注意

    请确保实例对象类型为 Boolean

    setNull - method

    fun setNull()
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置当前 Field 实例为 null

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html b/zh-cn/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html new file mode 100644 index 0000000..d9bc758 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/finder/members/MethodFinder.html @@ -0,0 +1,114 @@ + + + + + + + + + MethodFinder - class | Yuki Reflection + + + + + +

    MethodFinder - class

    class MethodFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
    +

    变更记录

    v1.0.0 添加

    功能描述

    Method 查找类。

    可通过指定类型查找指定 Method 或一组 Method

    name - field

    var name: String
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 名称。

    特别注意

    若不填写名称则必须存在一个其它条件。

    paramCount - field

    var paramCount: Int
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此变量指定参数个数。

    若参数个数小于零则忽略并使用 param

    returnType - field

    var returnType: Any?
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 返回值,可不填写返回值。

    modifiers - method

    fun modifiers(conditions: ModifierConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 标识符筛选条件。

    可不设置筛选条件。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    emptyParam - method

    fun emptyParam(): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 空参数、无参数。

    param - method

    fun param(vararg paramType: Any): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数。

    如果同时使用了 paramCountparamType 的数量必须与 paramCount 完全匹配。

    如果 Method 中存在一些无意义又很长的类型,你可以使用 VagueType 来替代它。

    特别注意

    无参 Method 请使用 emptyParam 设置查找条件。

    有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    param - method

    fun param(conditions: ObjectsConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数条件。

    特别注意

    无参 Method 请使用 emptyParam 设置查找条件。

    有参 Method 必须使用此方法设定参数或使用 paramCount 指定个数。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    order - method

    fun order(): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    顺序筛选字节码的下标。

    name - method

    fun name(value: String): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 名称。

    特别注意

    若不填写名称则必须存在一个其它条件。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    name - method

    fun name(conditions: NameConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 名称条件。

    特别注意

    若不填写名称则必须存在一个其它条件。

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(num: Int): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数个数。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数。

    若参数个数小于零则忽略并使用 param

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(numRange: IntRange): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数个数范围。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数范围。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    paramCount - method

    fun paramCount(conditions: CountConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 参数个数条件。

    你可以不使用 param 指定参数类型而是仅使用此方法指定参数个数条件。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    returnType - method

    fun returnType(value: Any): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 返回值。

    可不填写返回值。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    returnType - method

    fun returnType(conditions: ObjectConditions): IndexTypeCondition
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置 Method 返回值条件。

    可不填写返回值。

    特别注意

    存在多个 IndexTypeCondition 时除了 order 只会生效最后一个。

    superClass - method

    fun superClass(isOnlySuperClass: Boolean)
    +

    变更记录

    v1.0.0 添加

    功能描述

    设置在 classSet 的所有父类中查找当前 Method

    注意

    若当前 classSet 的父类较多可能会耗时,API 会自动循环到父类继承是 Any 前的最后一个类。

    RemedyPlan - class

    inner class RemedyPlan internal constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    Method 重查找实现类,可累计失败次数直到查找成功。

    method - method

    inline fun method(initiate: MethodConditions): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建需要重新查找的 Method

    你可以添加多个备选 Method,直到成功为止,若最后依然失败,将停止查找并输出错误日志。

    Result - class

    inner class Result internal constructor()
    +

    变更记录

    v1.0.0 添加

    功能描述

    RemedyPlan 结果实现类。

    onFind - method

    fun onFind(initiate: MutableList<Method>.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    initiate 类型由 HashSet 修改为 MutableList

    功能描述

    当在 RemedyPlan 中找到结果时。

    功能示例

    你可以方便地对重查找的 Method 实现 onFind 方法。

    示例如下

    method {
    +    // Your code here.
    +}.onFind {
    +    // Your code here.
    +}
    +

    Result - class

    inner class Result internal constructor(internal val isNoSuch: Boolean, internal val throwable: Throwable?) : BaseResult
    +

    变更记录

    v1.0.0 添加

    功能描述

    Method 查找结果实现类。

    result - method

    inline fun result(initiate: Result.() -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建监听结果事件方法体。

    功能示例

    你可以使用 lambda 形式创建 Result 类。

    示例如下

    method {
    +    // Your code here.
    +}.result {
    +    get(instance).call()
    +    all(instance)
    +    remedys {}
    +    onNoSuchMethod {}
    +}
    +

    get - method

    fun get(instance: Any?): Instance
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得 Method 实例处理类。

    若有多个 Method 结果只会返回第一个。

    特别注意

    若你设置了 remedys 请使用 wait 回调结果方法。

    功能示例

    你可以通过获得方法所在实例来执行 Method

    示例如下

    method {
    +    // Your code here.
    +}.get(instance).call()
    +

    若当前为静态方法,你可以不设置实例。

    示例如下

    method {
    +    // Your code here.
    +}.get().call()
    +

    all - method

    fun all(instance: Any?): MutableList<Instance>
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    返回值类型由 ArrayList 修改为 MutableList

    功能描述

    获得 Method 实例处理类数组。

    返回全部查找条件匹配的多个 Method 实例结果。

    功能示例

    你可以通过此方法来获得当前条件结果中匹配的全部 Method,其方法所在实例用法与 get 相同。

    示例如下

    method {
    +    // Your code here.
    +}.all(instance).forEach { instance ->
    +    instance.call(...)
    +}
    +

    give - method

    fun give(): Method?
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到 Method 本身。

    若有多个 Method 结果只会返回第一个。

    在查找条件找不到任何结果的时候将返回 null

    giveAll - method

    fun giveAll(): MutableList<Method>
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    返回值类型由 HashSet 修改为 MutableList

    功能描述

    得到 Method 本身数组。

    返回全部查找条件匹配的多个 Method 实例。

    在查找条件找不到任何结果的时候将返回空的 MutableList

    wait - method

    fun wait(instance: Any?, initiate: Instance.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    功能描述

    获得 Method 实例处理类,配合 RemedyPlan 使用。

    若有多个 Method 结果只会返回第一个。

    特别注意

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    waitAll - method

    fun waitAll(instance: Any?, initiate: MutableList<Instance>.() -> Unit)
    +

    变更记录

    v1.0.0 添加

    v1.0.3 修改

    initiate 类型由 ArrayList 修改为 MutableList

    功能描述

    获得 Method 实例处理类数组,配合 RemedyPlan 使用。

    返回全部查找条件匹配的多个 Method 实例结果。

    特别注意

    若你设置了 remedys 必须使用此方法才能获得结果。

    若你没有设置 remedys 此方法将不会被回调。

    remedys - method

    inline fun remedys(initiate: RemedyPlan.() -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    创建 Method 重查找功能。

    功能示例

    当你遇到一种 Method 可能存在不同形式的存在时,可以使用 RemedyPlan 重新查找它,而没有必要使用 onNoSuchMethod 捕获异常二次查找 Method

    若第一次查找失败了,你还可以在这里继续添加此方法体直到成功为止。

    示例如下

    method {
    +    // Your code here.
    +}.remedys {
    +    method {
    +        // Your code here.
    +    }
    +    method {
    +        // Your code here.
    +    }
    +}
    +

    onNoSuchMethod - method

    inline fun onNoSuchMethod(result: (Throwable) -> Unit): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    监听找不到 Method 时。

    只会返回第一次的错误信息,不会返回 RemedyPlan 的错误信息。

    ignored - method

    fun ignored(): Result
    +

    变更记录

    v1.0.0 添加

    功能描述

    忽略异常并停止打印任何错误日志。

    注意

    此时若要监听异常结果,你需要手动实现 onNoSuchMethod 方法。

    Instance - class

    inner class Instance internal constructor(private val instance: Any?, private val method: Method?)
    +

    变更记录

    v1.0.0 添加

    功能描述

    Method 实例处理类。

    call - method

    fun call(vararg args: Any?): Any?
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,不指定返回值类型。

    invoke - method

    fun <T> invoke(vararg args: Any?): T?
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 T 返回值类型。

    byte - method

    fun byte(vararg args: Any?): Byte?
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 Byte 返回值类型。

    int - method

    fun int(vararg args: Any?): Int
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 Int 返回值类型。

    long - method

    fun long(vararg args: Any?): Long
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 Long 返回值类型。

    short - method

    fun short(vararg args: Any?): Short
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 Short 返回值类型。

    double - method

    fun double(vararg args: Any?): Double
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 Double 返回值类型。

    float - method

    fun float(vararg args: Any?): Float
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 Float 返回值类型。

    string - method

    fun string(vararg args: Any?): String
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 String 返回值类型。

    char - method

    fun char(vararg args: Any?): Char
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 Char 返回值类型。

    boolean - method

    fun boolean(vararg args: Any?): Boolean
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 Boolean 返回值类型。

    array - method

    inline fun <reified T> array(vararg args: Any?): Array<T>
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 Array 返回值类型。

    list - method

    inline fun <reified T> list(vararg args: Any?): List<T>
    +

    变更记录

    v1.0.0 添加

    功能描述

    执行 Method,指定 List 返回值类型。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/log/YLog.html b/zh-cn/api/public/com/highcapable/yukireflection/log/YLog.html new file mode 100644 index 0000000..8f1935c --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/log/YLog.html @@ -0,0 +1,38 @@ + + + + + + + + + YLog - object | Yuki Reflection + + + + + +

    YLog - object

    object YLog
    +

    变更记录

    v1.0.3 新增

    功能描述

    全局 Log 管理类。

    Configs - object

    object Configs
    +

    变更记录

    v1.0.3 新增

    功能描述

    配置 YLog

    tag - field

    var tag: String
    +

    变更记录

    v1.0.3 新增

    功能描述

    这是一个调试日志的全局标识。

    默认文案为 YukiReflection

    你可以修改为你自己的文案。

    isEnable - field

    var isEnable: Boolean
    +

    变更记录

    v1.0.3 新增

    功能描述

    是否启用调试日志的输出功能。

    关闭后将会停用 YukiReflection 对全部日志的输出。

    isEnable 关闭后 YukiReflection.Configs.isDebug 也将同时关闭。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html b/zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html new file mode 100644 index 0000000..0bc9bdc --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/type/android/ComponentTypeFactory.html @@ -0,0 +1,34 @@ + + + + + + + + + ComponentTypeFactory - kt | Yuki Reflection + + + + + +

    ComponentTypeFactory - kt

    变更记录

    v1.0.0 添加

    功能描述

    这是一个预置反射类型的常量类,主要为 Android 相关组件的 Class 内容,跟随版本更新会逐一进行增加。

    详情可 点击这里在新窗口中打开 进行查看。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html b/zh-cn/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html new file mode 100644 index 0000000..2b985fe --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.html @@ -0,0 +1,34 @@ + + + + + + + + + GraphicsTypeFactory - kt | Yuki Reflection + + + + + +

    GraphicsTypeFactory - kt

    变更记录

    v1.0.0 添加

    功能描述

    这是一个预置反射类型的常量类,主要为 Android 相关 GraphicsClass 内容,跟随版本更新会逐一进行增加。

    详情可 点击这里在新窗口中打开 进行查看。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html b/zh-cn/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html new file mode 100644 index 0000000..9a6d4ab --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/type/android/ViewTypeFactory.html @@ -0,0 +1,34 @@ + + + + + + + + + ViewTypeFactory - kt | Yuki Reflection + + + + + +

    ViewTypeFactory - kt

    变更记录

    v1.0.0 添加

    功能描述

    这是一个预置反射类型的常量类,主要为 Android 相关 WidgetClass 内容,跟随版本更新会逐一进行增加。

    详情可 点击这里在新窗口中打开 进行查看。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html b/zh-cn/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html new file mode 100644 index 0000000..0c830d6 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.html @@ -0,0 +1,35 @@ + + + + + + + + + DefinedTypeFactory - kt | Yuki Reflection + + + + + +

    DefinedTypeFactory - kt

    变更记录

    v1.0.0 添加

    功能描述

    这是一个内部类型的定义常量类,主要用于反射 API 相关用法的延伸。

    VagueType - field

    val VagueType: Class<*>
    +

    变更记录

    v1.0.0 添加

    功能描述

    得到模糊类型。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html b/zh-cn/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html new file mode 100644 index 0000000..bff1697 --- /dev/null +++ b/zh-cn/api/public/com/highcapable/yukireflection/type/java/VariableTypeFactory.html @@ -0,0 +1,34 @@ + + + + + + + + + VariableTypeFactory - kt | Yuki Reflection + + + + + +

    VariableTypeFactory - kt

    变更记录

    v1.0.0 添加

    功能描述

    这是一个预置反射类型的常量类,主要为 Java 相关基本变量类型的 Class 内容,跟随版本更新会逐一进行增加。

    详情可 点击这里在新窗口中打开 进行查看。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/config/api-example.html b/zh-cn/config/api-example.html new file mode 100644 index 0000000..923cabe --- /dev/null +++ b/zh-cn/config/api-example.html @@ -0,0 +1,67 @@ + + + + + + + + + API 基本配置 | Yuki Reflection + + + + + +

    API 基本配置

    这里介绍了 YukiReflection 的基本配置方法。

    YukiReflection 无需一些复杂的配置即可直接开始使用,且不会与 Java 原生的反射 API 冲突。

    你可以在使用之前对 YukiReflection 进行一些功能配置。

    获取 API 标签 & 版本

    你可以通过如下方式获取当前 YukiReflection 的标签和版本。

    示例如下

    // 获取标签
    +val tag = YukiReflection.TAG
    +// 获取版本
    +val version = YukiReflection.VERSION
    +

    你可以通过获取版本进行一些不同版本差异的判断或用于显示在关于信息中。

    小提示

    更多功能请参考 YukiReflection

    配置 API 相关功能

    你可以通过 YukiReflection.configs { ... } 方法或 YukiReflection.Configs 来配置相关功能。

    自定义调试日志标签

    你可以使用如下方式来自定义调试日志的标签。

    API 内部的日志将会使用此标签进行打印。

    示例如下

    // 通过 configs 方法
    +YukiReflection.configs {
    +    debugLog {
    +        tag = "YourCustomTag"
    +    }
    +}
    +// 直接设置
    +YLog.Configs.tag = "YourCustomTag"
    +

    启用或禁用 Debug 模式

    你可以使用如下方式来启用或禁用 Debug 模式。

    Debug 模式默认是关闭的,启用后将会打印详细日志 (例如反射查找功能的耗时) 到控制台。

    示例如下

    // 通过 configs 方法
    +YukiReflection.configs {
    +    isDebug = true
    +}
    +// 直接设置
    +YukiReflection.Configs.isDebug = true
    +

    启用或禁用调试日志的输出功能

    你可以使用如下方式来启用或禁用调试日志的输出功能。

    此功能默认启用,关闭后将会停用 YukiReflection 对全部日志的输出。

    示例如下

    // 通过 configs 方法
    +YukiReflection.configs {
    +    debugLog {
    +        isEnable = true
    +    }
    +}
    +// 直接设置
    +YLog.Configs.isEnable = true
    +

    使用 configs 方法配置

    为了一次性配置多个功能,你可以直接使用 YukiReflection.configs { ... } 方法进行配置。

    示例如下

    YukiReflection.configs {
    +    debugLog {
    +        tag = "YourCustomTag"
    +        isEnable = true
    +    }
    +    isDebug = true
    +}
    +

    小提示

    更多功能请参考 YukiReflection.configs 方法、YukiReflection.Configs

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/config/api-exception.html b/zh-cn/config/api-exception.html new file mode 100644 index 0000000..7fdc7f0 --- /dev/null +++ b/zh-cn/config/api-exception.html @@ -0,0 +1,116 @@ + + + + + + + + + API 异常处理 | Yuki Reflection + + + + + +

    API 异常处理

    异常是在开发过程经常遇到的主要问题,这里介绍了 YukiReflection 在使用过程中可能遇到的常见异常以及处理方式。

    这里的异常说明只会同步最新的 API 版本,较旧的 API 版本的异常将不会再进行说明,请始终保持 API 版本为最新。

    非阻断异常

    这些异常不会导致 APP 停止运行 (FC),但是会在控制台打印 E 级别的日志,也可能会停止继续执行相关功能。

    exception

    loggerE

    Method/Constructor/Field match type "TYPE" not allowed

    异常原因

    在查找方法、构造方法以及变量时设置了不允许的参数类型。

    示例如下

    // 查找一个方法
    +method {
    +    // 设置了无效的类型举例
    +    param(false, 1, 0)
    +    // 设置了无效的类型举例
    +    returnType = false
    +}
    +
    +// 查找一个变量
    +field {
    +    // 设置了无效的类型举例
    +    type = false
    +}
    +

    解决方案

    在查找中 paramreturnTypetype 中仅接受 ClassStringVariousClass 类型的传值,不可传入参数实例。

    示例如下

    // 查找一个方法
    +method {
    +    // ✅ 正确的使用方法举例
    +    param(BooleanType, IntType, IntType)
    +    // ✅ 正确的使用方法举例
    +    returnType = BooleanType
    +    // ✅ 以下方案也是正确的
    +    returnType = "java.lang.Boolean"
    +}
    +
    +// 查找一个变量
    +field {
    +    // ✅ 正确的使用方法举例
    +    type = BooleanType
    +}
    +
    exception

    loggerE

    NoSuchMethod/NoSuchConstructor/NoSuchField happend in [NAME]

    异常原因

    在查找方法、构造方法以及变量时并未找到目标方法、构造方法以及变量。

    解决方案

    请确认你的查找条件是否能正确匹配到目标 Class 中的指定方法、构造方法以及变量。

    exception

    loggerE

    Trying COUNT times and all failure by RemedyPlan

    异常原因

    使用 RemedyPlan 重新查找方法、构造方法、变量时依然没有找到方法、构造方法、变量。

    解决方案

    请确认你设置的 RemedyPlan 参数以及当前 APP 内存在的 Class,再试一次。

    exception

    loggerE

    Can't find this Class in [CLASSLOADER]: CONTENT Generated by YukiReflection#ReflectionTool

    异常原因

    通过 ClassLoader.searchClass 找不到需要查找的 Class 对象。

    示例如下

    customClassLoader?.searchClass {
    +    from(...)
    +    // ...
    +}.get()
    +

    解决方案

    这是一个安全异常,请检查你设置的条件,使用相关工具查看所在 Dex 中的 Class 以及字节码对象特征,并再试一次。

    exception

    loggerE

    Can't find this Method/Constructor/Field in [CLASS]: CONTENT Generated by YukiReflection#ReflectionTool

    异常原因

    通过指定条件找不到需要查找的方法、构造方法以及变量。

    示例如下

    TargetClass.method {
    +    name = "test"
    +    param(BooleanType)
    +}
    +

    解决方案

    这是一个安全异常,请检查你设置的条件,使用相关工具查看所在 Class 中的字节码对象特征,并再试一次。

    exception

    loggerE

    The number of VagueType must be at least less than the count of paramTypes

    异常原因

    MethodConstructor 查找条件中错误地使用了 VagueType

    示例如下

    TargetClass.method {
    +    name = "test"
    +    // <情景1>
    +    param(VagueType)
    +    // <情景2>
    +    param(VagueType, VagueType ...)
    +}
    +

    解决方案

    VagueType 不能在方法、构造方法参数中完全填充,若存在这样的需求请使用 paramCount

    exception

    loggerE

    Field match type class is not found

    异常原因

    在查找变量时所设置的查找条件中 typeClass 实例未被找到。

    示例如下

    field {
    +    name = "test"
    +    // 假设这里设置的 type 的 Class 并不存在
    +    type = "com.example.TestClass"
    +}
    +

    解决方案

    请检查查找条件中 typeClass 是否存在,然后再试一次。

    exception

    loggerE

    Method match returnType class is not found

    异常原因

    在查找方法时所设置的查找条件中 returnTypeClass 实例未被找到。

    示例如下

    method {
    +    name = "test"
    +    // 假设这里设置的 returnType 的 Class 并不存在
    +    returnType = "com.example.TestClass"
    +}
    +

    解决方案

    请检查查找条件中 returnTypeClass 是否存在,然后再试一次。

    exception

    loggerE

    Method/Constructor match paramType[INDEX] class is not found

    异常原因

    在查找方法、构造方法时所设置的查找条件中 paramindex 号下标的 Class 实例未被找到。

    method {
    +    name = "test"
    +    // 假设这里设置的 1 号下标的 Class 并不存在
    +    param(StringClass, "com.example.TestClass", BooleanType)
    +}
    +

    解决方案

    请检查查找条件中 paramindex 号下标的 Class 是否存在,然后再试一次。

    阻断异常

    这些异常会直接导致 APP 停止运行 (FC),同时会在控制台打印 E 级别的日志。

    exception

    NoClassDefFoundError

    Can't find this Class in [CLASSLOADER]: CONTENT Generated by YukiReflection#ReflectionTool

    异常原因

    通过 String.toClass(...)classOf<...>() 找不到需要查找的 Class 对象。

    示例如下

    "com.demo.Test".toClass()
    +

    解决方案

    请检查当前字符串或实体匹配到的 Class 是否存在于当前 ClassLoader,并再试一次。

    exception

    IllegalStateException

    ClassLoader [CLASSLOADER] is not a DexClassLoader

    异常原因

    使用 ClassLoader.searchClass 查找 Class 但是当前 ClassLoader 并不继承于 BaseDexClassLoader

    解决方案

    这种情况基本不存在,除非当前 APP 引用了非 ART 平台的可执行文件 (但是这种情况还是不会存在) 或当前 ClassLoader 为空。

    exception

    IllegalStateException

    VariousClass match failed of those CLASSES

    异常原因

    在使用 VariousClass 创建不确定的 Class 对象时全部的 Class 都没有被找到。

    解决方案

    检查当前 APP 内是否存在其中能够匹配的 Class 后,再试一次。

    exception

    IllegalStateException

    paramTypes is empty, please use emptyParam() instead

    异常原因

    在查找方法、构造方法时保留了空的 param 方法。

    示例如下

    method {
    +    name = "test"
    +    // 括号内没有填写任何参数
    +    param()
    +}
    +

    解决方案

    若要标识此方法、构造方法没有参数,你可以有如下设置方法。

    第一种,设置 emptyParam (推荐)

    示例如下

    method {
    +    name = "test"
    +    emptyParam()
    +}
    +

    第二种,设置 paramCount = 0

    示例如下

    method {
    +    name = "test"
    +    paramCount = 0
    +}
    +
    exception

    IllegalStateException

    Cannot create classes cache for "android", please remove "name" param

    异常原因

    在系统框架 (android) 中使用了 DexClassFinder 的缓存功能 searchClass(name = ...)

    示例如下

    searchClass(name = "test") {
    +    from(...)
    +    // ...
    +}.get()
    +

    解决方案

    由于缓存会将找到的 Class 名称存入 SharedPreferences,但是系统框架不存在 data 目录,所以请不要在系统框架中使用此功能。

    exception

    IllegalStateException

    Target Class type cannot cast to TYPE

    异常原因

    使用 Class.toClassClass.toClassOrNullGenericClass.argument 方法将字符串类名转换为目标 Class 时声明了错误的类型。

    以下使用 Class.toClass 方法来进行示例。

    示例如下

    // 假设目标类型是 Activity 但是被错误地转换为了 WrongClass 类型
    +val clazz = "android.app.Activity".toClass<WrongClass>()
    +

    解决方案

    示例如下

    // <解决方案 1> 填写正确的类型
    +val clazz1 = "android.app.Activity".toClass<Activity>()
    +// <解决方案 2> 不填写泛型声明
    +val clazz2 = "android.app.Activity".toClass()
    +

    请确保执行方法后声明的泛型是指定的目标 Class 类型,在不确定目标类型的情况下你可以不需要填写泛型声明。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/guide/home.html b/zh-cn/guide/home.html new file mode 100644 index 0000000..5d480a2 --- /dev/null +++ b/zh-cn/guide/home.html @@ -0,0 +1,43 @@ + + + + + + + + + 介绍 | Yuki Reflection + + + + + +

    介绍

    YukiReflection 是一个基于 Java 和 Android 平台的反射 API。

    背景

    这是一个使用 Kotlin 基于 Java 原生反射 API 重新打造的一套简洁、高效的反射 API。

    YukiReflection 同时也是 YukiHookAPI在新窗口中打开 正在使用的核心功能。

    名称取自 《ももくり》女主 栗原 雪(Yuki)在新窗口中打开

    用途

    YukiReflection 完全采用 Kotlin lambda 语法构建。

    它能取代 Java 原生的反射 API在新窗口中打开,使用更加人性化的语言实现一套更加完善的反射方案。

    语言要求

    请使用 Kotlin,API 部分代码构成同样兼容 Java 但基础反射场景的实现可能完全无法使用

    文档全部的 Demo 示例代码都将使用 Kotlin 进行描述,如果你完全不会使用 Kotlin 那你将有可能无法使用 YukiReflection

    灵感来源

    YukiReflection 最初是集成在 YukiHookAPI在新窗口中打开 项目中的核心功能,现在进行了解耦合,使得这套反射 API 可以在任何 Java 和 Android 平台的项目中使用。

    现在,我们只需要编写少量的代码,就能实现一个简单的反射调用。

    借助 Kotlin 优雅的 lambda 写法以及 YukiReflection,可以让你的反射逻辑更加美观清晰。

    示例如下

    "android.os.SystemProperties".toClass()
    +    .method {
    +        name = "get"
    +        param(StringClass, StringClass)
    +    }.get().call("ro.system.build.fingerprint", "none")
    +
    Class.forName("android.os.SystemProperties")
    +    .getDeclaredMethod("get", String::class.java, String::class.java)
    +    .apply { isAccessible = true }
    +    .invoke(null, "ro.system.build.fingerprint", "none")
    +
    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/guide/quick-start.html b/zh-cn/guide/quick-start.html new file mode 100644 index 0000000..cfd375b --- /dev/null +++ b/zh-cn/guide/quick-start.html @@ -0,0 +1,85 @@ + + + + + + + + + 快速开始 | Yuki Reflection + + + + + +

    快速开始

    集成 YukiReflection 到你的项目中。

    环境要求

    • Windows 7 及以上/macOS 10.14 及以上/Linux 发行版 (Arch/Debian)

    • Android Studio 2021.1 及以上

    • IntelliJ IDEA 2021.1 及以上

    • Kotlin 1.7.0 及以上

    • Android Gradle Plugin 7.0 及以上

    • Gradle 7.0 及以上

    • Java 11 及以上

    • Java 17 及以上 (Since API 1.0.3)

    项目要求

    项目需要使用 Android StudioIntelliJ IDEA 创建且类型为 Java 或 Android 项目并已集成 Kotlin 环境依赖。

    集成依赖

    我们推荐使用 Kotlin DSL 作为 Gradle 构建脚本语言并推荐使用 SweetDependency在新窗口中打开 来管理依赖。

    SweetDependency (推荐)

    在你的项目 SweetDependency 配置文件中添加存储库和依赖。

    示例如下

    repositories:
    +  # MavenCentral 有 2 小时缓存,若无法集成最新版本请添加
    +  sonatype-oss-releases:
    +
    +libraries:
    +  com.highcapable.yukireflection:
    +    api:
    +      version: +
    +  ...
    +

    添加完成后运行一次 Gradle Sync,所有依赖版本将自动装配。

    接下来,在你的项目 build.gradle.kts 中部署依赖。

    示例如下

    dependencies {
    +    implementation(com.highcapable.yukireflection.api)
    +    // ...
    +}
    +

    传统方式

    在你的项目 build.gradle.ktsbuild.gradle 中添加存储库。

    Kotlin DSL

    repositories {
    +    google()
    +    mavenCentral()
    +    // MavenCentral 有 2 小时缓存,若无法集成最新版本请添加此地址
    +    maven { url("https://s01.oss.sonatype.org/content/repositories/releases/") }
    +}
    +

    Groovy DSL

    repositories {
    +    google()
    +    mavenCentral()
    +    // MavenCentral 有 2 小时缓存,若无法集成最新版本请添加此地址
    +    maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
    +}
    +

    在你的项目 build.gradle.ktsbuild.gradle 中添加依赖。

    Kotlin DSL

    dependencies {
    +    implementation("com.highcapable.yukireflection:api:<yuki-version>")
    +    // ...
    +}
    +

    Groovy DSL

    dependencies {
    +    implementation 'com.highcapable.yukireflection:api:<yuki-version>'
    +    // ...
    +}
    +

    请将 <yuki-version> 修改为 这里 的最新版本。

    特别注意

    如果你的项目目前正在使用 YukiHookAPI在新窗口中打开 的 1.x.x 版本,请不要重复集成 YukiReflection,因为 YukiHookAPI 已经包含了其中的功能且存在针对相关功能的改动,重复集成会造成功能性冲突引发异常,此时你应该前往 YukiHookAPI文档在新窗口中打开 查看对应的使用教程。

    YukiHookAPI 将在 2.0.0 版本完全分离 YukiReflection,届时你可以同时与 YukiHookAPI 使用。

    配置 Java 版本

    在你的项目 build.gradle.ktsbuild.gradle 中修改 Kotlin 的 Java 版本为 17 及以上。

    Kotlin DSL

    android {
    +    compileOptions {
    +        sourceCompatibility = JavaVersion.VERSION_17
    +        targetCompatibility = JavaVersion.VERSION_17
    +    }
    +    kotlinOptions {
    +        jvmTarget = "17"
    +    }
    +}
    +

    Groovy DSL

    android {
    +    compileOptions {
    +        sourceCompatibility JavaVersion.VERSION_17
    +        targetCompatibility JavaVersion.VERSION_17
    +    }
    +    kotlinOptions {
    +        jvmTarget = '17'
    +    }
    +}
    +

    注意

    自 API 1.0.3 版本后 Kotlin 使用的 Java 版本默认为 17,不再支持 11 及以下版本。

    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + + diff --git a/zh-cn/index.html b/zh-cn/index.html new file mode 100644 index 0000000..2d6e344 --- /dev/null +++ b/zh-cn/index.html @@ -0,0 +1,46 @@ + + + + + + + + + 首页 | Yuki Reflection + + + + + +
    Yuki Reflection

    Yuki Reflection

    一个使用 Kotlin 构建的用于 Java 和 Android 平台高效反射 API

    快速上手 更新日志

    轻量优雅

    拥有一套强大、优雅、人性化、完全使用 Kotlin lambda 打造的 API,可以帮你快速实现字节码的查找以及反射功能。

    可跨平台

    不仅仅是 Android 平台,它与 Java API 高度兼容,可使用在任何 Kotlin on JVM 的项目上,有 Java 的地方就可以使用。

    快速上手

    简单易用,不需要繁琐的配置,不需要十足的开发经验,搭建环境集成依赖即可立即开始使用。

    来吧!让反射也变得诗情画意

    public class World {
    +
    +    private void sayHello(String content) {
    +        System.out.println("Hello " + content + "!");
    +    }
    +}
    +
    val newWorld = World()
    +classOf<World>().method {
    +    name = "sayHello"
    +    param(StringClass)
    +    type = UnitType
    +}.get(newWorld).call("YukiReflection")
    +
    YukiReflection is deprecated, Start trying KavaRef now!  YukiReflection 已被弃用,立即尝试 KavaRef 吧!
    + + +