diff --git a/docs/api/document.md b/docs/api/document.md index 372e2523..d1b35df9 100644 --- a/docs/api/document.md +++ b/docs/api/document.md @@ -64,7 +64,7 @@ [filename](public/FieldFinder.md ':include') -[filename](public/BaseFinder-IndexTypeCondition.md ':include') +[filename](public/MemberBaseFinder-IndexTypeCondition.md ':include') [filename](public/ModifierRules.md ':include') diff --git a/docs/api/public/BaseFinder-IndexTypeCondition.md b/docs/api/public/MemberBaseFinder-IndexTypeCondition.md similarity index 90% rename from docs/api/public/BaseFinder-IndexTypeCondition.md rename to docs/api/public/MemberBaseFinder-IndexTypeCondition.md index f6fa07ff..3eae05de 100644 --- a/docs/api/public/BaseFinder-IndexTypeCondition.md +++ b/docs/api/public/MemberBaseFinder-IndexTypeCondition.md @@ -1,4 +1,4 @@ -## BaseFinder.IndexTypeCondition *- class* +## MemberBaseFinder.IndexTypeCondition *- class* ```kotlin inner class IndexTypeCondition internal constructor(private val type: IndexConfigType) @@ -8,6 +8,10 @@ inner class IndexTypeCondition internal constructor(private val type: IndexConfi `v1.0.70` `新增` +`v1.0.93` `修改` + +重命名 `BaseFinder` 到 `MemberBaseFinder` + **功能描述** > 字节码下标筛选实现类。 diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/YukiHookAPI.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/YukiHookAPI.kt index a82e008e..f615f302 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/YukiHookAPI.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/YukiHookAPI.kt @@ -36,9 +36,9 @@ import android.content.res.Resources import com.highcapable.yukihookapi.YukiHookAPI.configs import com.highcapable.yukihookapi.YukiHookAPI.encase import com.highcapable.yukihookapi.annotation.xposed.InjectYukiHookWithXposed -import com.highcapable.yukihookapi.hook.core.finder.ConstructorFinder -import com.highcapable.yukihookapi.hook.core.finder.FieldFinder -import com.highcapable.yukihookapi.hook.core.finder.MethodFinder +import com.highcapable.yukihookapi.hook.core.finder.members.ConstructorFinder +import com.highcapable.yukihookapi.hook.core.finder.members.FieldFinder +import com.highcapable.yukihookapi.hook.core.finder.members.MethodFinder import com.highcapable.yukihookapi.hook.entity.YukiBaseHooker import com.highcapable.yukihookapi.hook.factory.isTaiChiModuleActive import com.highcapable.yukihookapi.hook.factory.processName diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/bean/CurrentClass.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/bean/CurrentClass.kt index b0747b08..83822705 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/bean/CurrentClass.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/bean/CurrentClass.kt @@ -29,8 +29,8 @@ package com.highcapable.yukihookapi.hook.bean -import com.highcapable.yukihookapi.hook.core.finder.FieldFinder -import com.highcapable.yukihookapi.hook.core.finder.MethodFinder +import com.highcapable.yukihookapi.hook.core.finder.members.FieldFinder +import com.highcapable.yukihookapi.hook.core.finder.members.MethodFinder import com.highcapable.yukihookapi.hook.factory.FieldCondition import com.highcapable.yukihookapi.hook.factory.MethodCondition import com.highcapable.yukihookapi.hook.factory.field diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator.kt index 05bf5454..53f13a8c 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator.kt @@ -32,10 +32,10 @@ package com.highcapable.yukihookapi.hook.core import com.highcapable.yukihookapi.YukiHookAPI import com.highcapable.yukihookapi.annotation.CauseProblemsApi import com.highcapable.yukihookapi.hook.bean.HookClass -import com.highcapable.yukihookapi.hook.core.finder.ConstructorFinder -import com.highcapable.yukihookapi.hook.core.finder.FieldFinder -import com.highcapable.yukihookapi.hook.core.finder.MethodFinder -import com.highcapable.yukihookapi.hook.core.finder.base.BaseFinder +import com.highcapable.yukihookapi.hook.core.finder.members.ConstructorFinder +import com.highcapable.yukihookapi.hook.core.finder.members.FieldFinder +import com.highcapable.yukihookapi.hook.core.finder.members.MethodFinder +import com.highcapable.yukihookapi.hook.core.finder.base.MemberBaseFinder import com.highcapable.yukihookapi.hook.factory.* import com.highcapable.yukihookapi.hook.log.yLoggerE import com.highcapable.yukihookapi.hook.log.yLoggerI @@ -248,7 +248,7 @@ class YukiMemberHookCreator(@PublishedApi internal val packageParam: PackagePara /** 当前的查找实例 */ @PublishedApi - internal var finder: BaseFinder? = null + internal var finder: MemberBaseFinder? = null /** 当前被 Hook 的 [Method]、[Constructor] 实例数组 */ private val memberUnhooks = HashSet() diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/base/BaseFinder.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/base/MemberBaseFinder.kt similarity index 98% rename from yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/base/BaseFinder.kt rename to yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/base/MemberBaseFinder.kt index 531a8b25..06fbc6db 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/base/BaseFinder.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/base/MemberBaseFinder.kt @@ -45,12 +45,12 @@ import java.lang.reflect.Method import kotlin.math.abs /** - * 这是查找类功能的基本类实现 + * 这是 [Member] 查找类功能的基本类实现 * @param tag 当前查找类的标识 * @param hookInstance 当前 Hook 实例 * @param classSet 当前需要查找的 [Class] 实例 */ -abstract class BaseFinder internal constructor( +abstract class MemberBaseFinder internal constructor( private val tag: String, open val hookInstance: YukiMemberHookCreator.MemberHookCreator? = null, open val classSet: Class<*>? = null diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/ConstructorFinder.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/members/ConstructorFinder.kt similarity index 95% rename from yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/ConstructorFinder.kt rename to yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/members/ConstructorFinder.kt index 194b5205..d057788e 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/ConstructorFinder.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/members/ConstructorFinder.kt @@ -27,12 +27,12 @@ */ @file:Suppress("unused", "MemberVisibilityCanBePrivate", "UNCHECKED_CAST", "KotlinConstantConditions") -package com.highcapable.yukihookapi.hook.core.finder +package com.highcapable.yukihookapi.hook.core.finder.members import com.highcapable.yukihookapi.annotation.YukiPrivateApi import com.highcapable.yukihookapi.hook.bean.VariousClass import com.highcapable.yukihookapi.hook.core.YukiMemberHookCreator -import com.highcapable.yukihookapi.hook.core.finder.base.BaseFinder +import com.highcapable.yukihookapi.hook.core.finder.base.MemberBaseFinder import com.highcapable.yukihookapi.hook.core.finder.type.ModifierRules import com.highcapable.yukihookapi.hook.core.reflex.tools.ReflectionTool import com.highcapable.yukihookapi.hook.factory.ConstructorCondition @@ -57,7 +57,7 @@ class ConstructorFinder @PublishedApi internal constructor( override val hookInstance: YukiMemberHookCreator.MemberHookCreator? = null, @property:YukiPrivateApi override val classSet: Class<*>? = null -) : BaseFinder(tag = "Constructor", hookInstance, classSet) { +) : MemberBaseFinder(tag = "Constructor", hookInstance, classSet) { /** 当前使用的 [classSet] */ private var usedClassSet = classSet @@ -90,9 +90,9 @@ class ConstructorFinder @PublishedApi internal constructor( /** * 设置 [Constructor] 标识符筛选条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param initiate 方法体 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ inline fun modifiers(initiate: ModifierRules.() -> Unit): IndexTypeCondition { modifiers = ModifierRules().apply(initiate) @@ -102,7 +102,7 @@ class ConstructorFinder @PublishedApi internal constructor( /** * 设置 [Constructor] 空参数、无参数 * - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun emptyParam() = paramCount(num = 0) @@ -115,9 +115,9 @@ class ConstructorFinder @PublishedApi internal constructor( * * - ❗有参 [Constructor] 必须使用此方法设定参数或使用 [paramCount] 指定个数 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param paramType 参数类型数组 - ❗只能是 [Class]、[String]、[VariousClass] - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun param(vararg paramType: Any): IndexTypeCondition { if (paramType.isEmpty()) error("paramTypes is empty, please use emptyParam() instead") @@ -127,7 +127,7 @@ class ConstructorFinder @PublishedApi internal constructor( /** * 顺序筛选字节码的下标 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun order() = IndexTypeCondition(IndexConfigType.ORDER) @@ -138,9 +138,9 @@ class ConstructorFinder @PublishedApi internal constructor( * * 若参数个数小于零则忽略并使用 [param] * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param num 个数 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun paramCount(num: Int): IndexTypeCondition { paramCount = num @@ -152,9 +152,9 @@ class ConstructorFinder @PublishedApi internal constructor( * * 你可以不使用 [param] 指定参数类型而是仅使用此方法指定参数个数范围 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param numRange 个数范围 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun paramCount(numRange: IntRange): IndexTypeCondition { paramCountRange = numRange diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/FieldFinder.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/members/FieldFinder.kt similarity index 96% rename from yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/FieldFinder.kt rename to yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/members/FieldFinder.kt index 2b4fd63a..d8a52e99 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/FieldFinder.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/members/FieldFinder.kt @@ -27,13 +27,13 @@ */ @file:Suppress("unused", "UNCHECKED_CAST", "MemberVisibilityCanBePrivate") -package com.highcapable.yukihookapi.hook.core.finder +package com.highcapable.yukihookapi.hook.core.finder.members import com.highcapable.yukihookapi.annotation.YukiPrivateApi import com.highcapable.yukihookapi.hook.bean.CurrentClass import com.highcapable.yukihookapi.hook.bean.VariousClass import com.highcapable.yukihookapi.hook.core.YukiMemberHookCreator -import com.highcapable.yukihookapi.hook.core.finder.base.BaseFinder +import com.highcapable.yukihookapi.hook.core.finder.base.MemberBaseFinder import com.highcapable.yukihookapi.hook.core.finder.type.ModifierRules import com.highcapable.yukihookapi.hook.core.finder.type.NameConditions import com.highcapable.yukihookapi.hook.core.reflex.tools.ReflectionTool @@ -58,7 +58,7 @@ class FieldFinder @PublishedApi internal constructor( override val hookInstance: YukiMemberHookCreator.MemberHookCreator? = null, @property:YukiPrivateApi override val classSet: Class<*>? = null -) : BaseFinder(tag = "Field", hookInstance, classSet) { +) : MemberBaseFinder(tag = "Field", hookInstance, classSet) { /** 当前使用的 [classSet] */ private var usedClassSet = classSet @@ -98,9 +98,9 @@ class FieldFinder @PublishedApi internal constructor( * * - 可不设置筛选条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param initiate 方法体 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ inline fun modifiers(initiate: ModifierRules.() -> Unit): IndexTypeCondition { modifiers = ModifierRules().apply(initiate) @@ -109,7 +109,7 @@ class FieldFinder @PublishedApi internal constructor( /** * 顺序筛选字节码的下标 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun order() = IndexTypeCondition(IndexConfigType.ORDER) @@ -118,9 +118,9 @@ class FieldFinder @PublishedApi internal constructor( * * - ❗若不填写名称则必须存在一个其它条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param value 名称 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun name(value: String): IndexTypeCondition { name = value @@ -132,9 +132,9 @@ class FieldFinder @PublishedApi internal constructor( * * - ❗若不填写名称则必须存在一个其它条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param initiate 方法体 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ inline fun name(initiate: NameConditions.() -> Unit): IndexTypeCondition { nameConditions = NameConditions().apply(initiate) @@ -146,9 +146,9 @@ class FieldFinder @PublishedApi internal constructor( * * - 可不填写类型 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param value 类型 - ❗只能是 [Class]、[String]、[VariousClass] - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun type(value: Any): IndexTypeCondition { type = value diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/MethodFinder.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/members/MethodFinder.kt similarity index 94% rename from yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/MethodFinder.kt rename to yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/members/MethodFinder.kt index 5faee7f4..a0e55cd0 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/MethodFinder.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/core/finder/members/MethodFinder.kt @@ -27,12 +27,12 @@ */ @file:Suppress("unused", "MemberVisibilityCanBePrivate", "UNCHECKED_CAST", "KotlinConstantConditions") -package com.highcapable.yukihookapi.hook.core.finder +package com.highcapable.yukihookapi.hook.core.finder.members import com.highcapable.yukihookapi.annotation.YukiPrivateApi import com.highcapable.yukihookapi.hook.bean.VariousClass import com.highcapable.yukihookapi.hook.core.YukiMemberHookCreator -import com.highcapable.yukihookapi.hook.core.finder.base.BaseFinder +import com.highcapable.yukihookapi.hook.core.finder.base.MemberBaseFinder import com.highcapable.yukihookapi.hook.core.finder.type.ModifierRules import com.highcapable.yukihookapi.hook.core.finder.type.NameConditions import com.highcapable.yukihookapi.hook.core.reflex.tools.ReflectionTool @@ -59,7 +59,7 @@ class MethodFinder @PublishedApi internal constructor( override val hookInstance: YukiMemberHookCreator.MemberHookCreator? = null, @property:YukiPrivateApi override val classSet: Class<*>? = null -) : BaseFinder(tag = "Method", hookInstance, classSet) { +) : MemberBaseFinder(tag = "Method", hookInstance, classSet) { /** 当前使用的 [classSet] */ private var usedClassSet = classSet @@ -114,9 +114,9 @@ class MethodFinder @PublishedApi internal constructor( * * - 可不设置筛选条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param initiate 方法体 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ inline fun modifiers(initiate: ModifierRules.() -> Unit): IndexTypeCondition { modifiers = ModifierRules().apply(initiate) @@ -126,7 +126,7 @@ class MethodFinder @PublishedApi internal constructor( /** * 设置 [Method] 空参数、无参数 * - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun emptyParam() = paramCount(num = 0) @@ -139,9 +139,9 @@ class MethodFinder @PublishedApi internal constructor( * * - ❗有参 [Method] 必须使用此方法设定参数或使用 [paramCount] 指定个数 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param paramType 参数类型数组 - ❗只能是 [Class]、[String]、[VariousClass] - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun param(vararg paramType: Any): IndexTypeCondition { if (paramType.isEmpty()) error("paramTypes is empty, please use emptyParam() instead") @@ -151,7 +151,7 @@ class MethodFinder @PublishedApi internal constructor( /** * 顺序筛选字节码的下标 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun order() = IndexTypeCondition(IndexConfigType.ORDER) @@ -160,9 +160,9 @@ class MethodFinder @PublishedApi internal constructor( * * - ❗若不填写名称则必须存在一个其它条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param value 名称 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun name(value: String): IndexTypeCondition { name = value @@ -174,9 +174,9 @@ class MethodFinder @PublishedApi internal constructor( * * - ❗若不填写名称则必须存在一个其它条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param initiate 方法体 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ inline fun name(initiate: NameConditions.() -> Unit): IndexTypeCondition { nameConditions = NameConditions().apply(initiate) @@ -190,9 +190,9 @@ class MethodFinder @PublishedApi internal constructor( * * 若参数个数小于零则忽略并使用 [param] * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param num 个数 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun paramCount(num: Int): IndexTypeCondition { paramCount = num @@ -204,9 +204,9 @@ class MethodFinder @PublishedApi internal constructor( * * 你可以不使用 [param] 指定参数类型而是仅使用此方法指定参数个数范围 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param numRange 个数范围 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun paramCount(numRange: IntRange): IndexTypeCondition { paramCountRange = numRange @@ -218,9 +218,9 @@ class MethodFinder @PublishedApi internal constructor( * * - 可不填写返回值 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - ❗存在多个 [MemberBaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param value 个数 - * @return [BaseFinder.IndexTypeCondition] + * @return [MemberBaseFinder.IndexTypeCondition] */ fun returnType(value: Any): IndexTypeCondition { returnType = value diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.kt index 383aa977..24f3c818 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.kt @@ -31,9 +31,9 @@ package com.highcapable.yukihookapi.hook.factory import com.highcapable.yukihookapi.YukiHookAPI import com.highcapable.yukihookapi.hook.bean.CurrentClass -import com.highcapable.yukihookapi.hook.core.finder.ConstructorFinder -import com.highcapable.yukihookapi.hook.core.finder.FieldFinder -import com.highcapable.yukihookapi.hook.core.finder.MethodFinder +import com.highcapable.yukihookapi.hook.core.finder.members.ConstructorFinder +import com.highcapable.yukihookapi.hook.core.finder.members.FieldFinder +import com.highcapable.yukihookapi.hook.core.finder.members.MethodFinder import com.highcapable.yukihookapi.hook.core.finder.type.ModifierRules import com.highcapable.yukihookapi.hook.store.MemberCacheStore import com.highcapable.yukihookapi.hook.xposed.bridge.YukiHookBridge diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/xposed/bridge/factory/YukiBridgeFactory.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/xposed/bridge/factory/YukiBridgeFactory.kt index dc32a568..431acfe6 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/xposed/bridge/factory/YukiBridgeFactory.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/xposed/bridge/factory/YukiBridgeFactory.kt @@ -29,9 +29,9 @@ package com.highcapable.yukihookapi.hook.xposed.bridge.factory -import com.highcapable.yukihookapi.hook.core.finder.ConstructorFinder -import com.highcapable.yukihookapi.hook.core.finder.MethodFinder -import com.highcapable.yukihookapi.hook.core.finder.base.BaseFinder +import com.highcapable.yukihookapi.hook.core.finder.members.ConstructorFinder +import com.highcapable.yukihookapi.hook.core.finder.members.MethodFinder +import com.highcapable.yukihookapi.hook.core.finder.base.MemberBaseFinder import com.highcapable.yukihookapi.hook.log.yLoggerE import com.highcapable.yukihookapi.hook.xposed.bridge.YukiHookBridge import de.robv.android.xposed.XC_MethodHook @@ -81,12 +81,12 @@ internal object YukiHookHelper { if (YukiHookBridge.hasXposedBridge) XposedHelpers.findClass(name, loader) else null /** - * Hook [BaseFinder.BaseResult] - * @param traction 直接调用 [BaseFinder.BaseResult] + * Hook [MemberBaseFinder.BaseResult] + * @param traction 直接调用 [MemberBaseFinder.BaseResult] * @param callback 回调 * @return [Pair] - ([YukiMemberHook.Unhook] or null,[Boolean] 是否已经 Hook) */ - internal fun hook(traction: BaseFinder.BaseResult, callback: YukiHookCallback) = runCatching { + internal fun hook(traction: MemberBaseFinder.BaseResult, callback: YukiHookCallback) = runCatching { hookMember( when (traction) { is MethodFinder.Result -> traction.ignored().give()