diff --git a/docs-source/src/en/api/features.md b/docs-source/src/en/api/features.md index da248ea..7672f31 100644 --- a/docs-source/src/en/api/features.md +++ b/docs-source/src/en/api/features.md @@ -1158,7 +1158,7 @@ instance.current { name = "stop" emptyParam() }.call() -// ❗ Note that because current() returns the CurrentClass object itself +// Note that because current() returns the CurrentClass object itself // It CANNOT BE CALLED like the following instance.current().current() ``` @@ -1549,7 +1549,7 @@ In find conditions you can only use **index** function once except **order**. method { name = "test" param(BooleanType).index(num = 2) - // ❗ Wrong usage, please keep only one index method + // Wrong usage, please keep only one index method returnType(StringClass).index(num = 1) } ``` @@ -1676,7 +1676,7 @@ The following is the wrong way to use it. field { name = "test" type = BooleanType -}.get().string() // ❗ Wrong usage, must be cast to the bytecode target type +}.get().string() // Wrong usage, must be cast to the bytecode target type ``` The following is the correct way to use it. diff --git a/docs-source/src/en/config/api-exception.md b/docs-source/src/en/config/api-exception.md index 0cdb608..33284f8 100644 --- a/docs-source/src/en/config/api-exception.md +++ b/docs-source/src/en/config/api-exception.md @@ -29,15 +29,15 @@ A disallowed parameter type was set when looking up methods, constructors, and v ```kotlin // Find a method method { - // ❗ Invalid type example is set + // Invalid type example is set param(false, 1, 0) - // ❗ Invalid type example is set + // Invalid type example is set returnType = false } // Find a variable field { - // ❗ Invalid type example is set + // Invalid type example is set type = false } ``` diff --git a/docs-source/src/zh-cn/api/features.md b/docs-source/src/zh-cn/api/features.md index f61ec26..65cb963 100644 --- a/docs-source/src/zh-cn/api/features.md +++ b/docs-source/src/zh-cn/api/features.md @@ -1110,7 +1110,7 @@ instance.current { name = "stop" emptyParam() }.call() -// ❗注意,因为 current() 返回的是 CurrentClass 自身对象,所以不能像下面这样调用 +// 注意,因为 current() 返回的是 CurrentClass 自身对象,所以不能像下面这样调用 instance.current().current() ``` @@ -1492,7 +1492,7 @@ TestGeneric::class.java.generic()?.argument()?.method { method { name = "test" param(BooleanType).index(num = 2) - // ❗错误的使用方法,请仅保留一个 index 方法 + // 错误的使用方法,请仅保留一个 index 方法 returnType(StringClass).index(num = 1) } ``` @@ -1619,7 +1619,7 @@ TestFoo::class.java.constructor() field { name = "test" type = BooleanType -}.get().string() // ❗错误的使用方法,必须 cast 为字节码目标类型 +}.get().string() // 错误的使用方法,必须 cast 为字节码目标类型 ``` 以下是正确的使用方法。 diff --git a/docs-source/src/zh-cn/config/api-exception.md b/docs-source/src/zh-cn/config/api-exception.md index 7fbd522..16cc464 100644 --- a/docs-source/src/zh-cn/config/api-exception.md +++ b/docs-source/src/zh-cn/config/api-exception.md @@ -29,15 +29,15 @@ Method/Constructor/Field match type "**TYPE**" not allowed ```kotlin // 查找一个方法 method { - // ❗设置了无效的类型举例 + // 设置了无效的类型举例 param(false, 1, 0) - // ❗设置了无效的类型举例 + // 设置了无效的类型举例 returnType = false } // 查找一个变量 field { - // ❗设置了无效的类型举例 + // 设置了无效的类型举例 type = false } ``` diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/YukiReflection.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/YukiReflection.kt index bac686f..d81dd64 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/YukiReflection.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/YukiReflection.kt @@ -49,9 +49,9 @@ object YukiReflection { /** * 版本名称 * - * - ❗此方法已弃用 - 在之后的版本中将直接被删除 + * - 此方法已弃用 - 在之后的版本中将直接被删除 * - * - ❗请现在迁移到 [VERSION] + * - 请现在迁移到 [VERSION] */ @Deprecated(message = "不再区分版本名称和版本号", ReplaceWith("VERSION")) const val API_VERSION_NAME = VERSION @@ -59,9 +59,9 @@ object YukiReflection { /** * 版本号 * - * - ❗此方法已弃用 - 在之后的版本中将直接被删除 + * - 此方法已弃用 - 在之后的版本中将直接被删除 * - * - ❗请现在迁移到 [VERSION] + * - 请现在迁移到 [VERSION] */ @Deprecated(message = "不再区分版本名称和版本号", ReplaceWith("VERSION")) const val API_VERSION_CODE = -1 @@ -92,16 +92,16 @@ object YukiReflection { /** * 是否启用调试日志的输出功能 * - * - ❗关闭后将会停用 [YukiReflection] 对全部日志的输出 - 同时 [isDebug] 将不再有效 + * - 关闭后将会停用 [YukiReflection] 对全部日志的输出 - 同时 [isDebug] 将不再有效 */ var isEnableLogs = true /** * 是否启用调试日志的输出功能 * - * - ❗此方法已弃用 - 在之后的版本中将直接被删除 + * - 此方法已弃用 - 在之后的版本中将直接被删除 * - * - ❗请现在迁移到 [isEnableLogs] + * - 请现在迁移到 [isEnableLogs] */ @Deprecated(message = "请使用新方式来实现此功能", ReplaceWith("isEnableLogs")) var isAllowPrintingLogs get() = isEnableLogs @@ -112,9 +112,9 @@ object YukiReflection { /** * 是否启用 [Member] 缓存功能 * - * - ❗此方法及功能已被移除 - 在之后的版本中将直接被删除 + * - 此方法及功能已被移除 - 在之后的版本中将直接被删除 * - * - ❗[Member] 的直接缓存功能已被移除 - 因为其存在内存溢出 (OOM) 问题 + * - [Member] 的直接缓存功能已被移除 - 因为其存在内存溢出 (OOM) 问题 */ @Deprecated(message = "此方法及功能已被移除,请删除此方法") var isEnableMemberCache = false diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt index 9119139..6e43fdd 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt @@ -100,7 +100,7 @@ class CurrentClass internal constructor(private val classSet: Class<*>, internal /** * 当前类的父类实例的类操作对象 * - * - ❗请使用 [superClass] 方法来获取 [SuperClass] + * - 请使用 [superClass] 方法来获取 [SuperClass] * @param superClassSet 父类 [Class] 对象 */ inner class SuperClass internal constructor(private val superClassSet: Class<*>) { diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt index 6f8615e..8433724 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt @@ -73,9 +73,9 @@ import java.lang.reflect.ParameterizedType /** * 写出当前 [ClassLoader] 下所有 [Class] 名称数组 * - * - ❗此方法在 [Class] 数量过多时会非常耗时 + * - 此方法在 [Class] 数量过多时会非常耗时 * - * - ❗若要按指定规则查找一个 [Class] - 请使用 [searchClass] 方法 + * - 若要按指定规则查找一个 [Class] - 请使用 [searchClass] 方法 * @return [List]<[String]> * @throws IllegalStateException 如果当前 [ClassLoader] 不是 [BaseDexClassLoader] */ @@ -84,13 +84,13 @@ fun ClassLoader.listOfClasses() = ReflectionTool.findDexClassList(loader = this) /** * 通过当前 [ClassLoader] 按指定条件查找并得到 Dex 中的 [Class] * - * - ❗此方法在 [Class] 数量过多及查找条件复杂时会非常耗时 + * - 此方法在 [Class] 数量过多及查找条件复杂时会非常耗时 * - * - ❗建议启用 [async] 或设置 [name] 参数 - [name] 参数将在当前 APP 不同版本中自动进行本地缓存以提升效率 + * - 建议启用 [async] 或设置 [name] 参数 - [name] 参数将在当前 APP 不同版本中自动进行本地缓存以提升效率 * - * - ❗如果使用了 [async] 或 [name] 参数 - 则必须填写 [context] 参数 + * - 如果使用了 [async] 或 [name] 参数 - 则必须填写 [context] 参数 * - * - ❗此功能尚在试验阶段 - 性能与稳定性可能仍然存在问题 - 使用过程遇到问题请向我们报告并帮助我们改进 + * - 此功能尚在试验阶段 - 性能与稳定性可能仍然存在问题 - 使用过程遇到问题请向我们报告并帮助我们改进 * @param context 当前 [Context] - 默认空 * @param name 标识当前 [Class] 缓存的名称 - 不设置将不启用缓存 - 启用缓存自动启用 [async] * @param async 是否启用异步 - 默认否 diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt index ad12ce1..445abdc 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt @@ -76,7 +76,7 @@ abstract class BaseFinder { /** * 字节码、数组下标排序实现类 * - * - ❗请使用 [index] 方法来获取 [IndexTypeConditionSort] + * - 请使用 [index] 方法来获取 [IndexTypeConditionSort] */ inner class IndexTypeConditionSort internal constructor() { @@ -118,7 +118,7 @@ abstract class BaseFinder { /** * 返回结果实现类 * - * - ❗此功能交由方法体自动完成 - 你不应该手动调用此方法 + * - 此功能交由方法体自动完成 - 你不应该手动调用此方法 * @return [BaseResult] */ internal abstract fun build(): BaseResult @@ -126,7 +126,7 @@ abstract class BaseFinder { /** * 返回只有异常的结果实现类 * - * - ❗此功能交由方法体自动完成 - 你不应该手动调用此方法 + * - 此功能交由方法体自动完成 - 你不应该手动调用此方法 * @param throwable 异常 * @return [BaseResult] */ @@ -135,7 +135,7 @@ abstract class BaseFinder { /** * 查找结果实现、处理类接口 * - * - ❗此功能交由方法体自动完成 - 你不应该手动继承此接口 + * - 此功能交由方法体自动完成 - 你不应该手动继承此接口 */ internal interface BaseResult } \ No newline at end of file diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt index 0463645..ec47a84 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt @@ -115,7 +115,7 @@ class ModifierRules private constructor(private val instance: Any) { * * ^^^ * - * - ❗注意 Kotlin → Jvm 后的 object 类中的方法并不是静态的 + * - 注意 Kotlin → Jvm 后的 object 类中的方法并不是静态的 * @return [Boolean] */ val isStatic get() = Modifier.isStatic(modifiers).also { templates.add(" ($it)") } @@ -129,7 +129,7 @@ class ModifierRules private constructor(private val instance: Any) { * * ^^^ * - * - ❗注意 Kotlin → Jvm 后没有 open 标识的 [Class]、[Member] 和没有任何关联的 [Class]、[Member] 都将为 final + * - 注意 Kotlin → Jvm 后没有 open 标识的 [Class]、[Member] 和没有任何关联的 [Class]、[Member] 都将为 final * @return [Boolean] */ val isFinal get() = Modifier.isFinal(modifiers).also { templates.add(" ($it)") } diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt index 9be9e82..6718717 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt @@ -61,7 +61,7 @@ import java.lang.reflect.Method * * 可使用 [BaseDexClassLoader] 通过指定条件查找指定 [Class] 或一组 [Class] * - * - ❗此功能尚在试验阶段 - 性能与稳定性可能仍然存在问题 - 使用过程遇到问题请向我们报告并帮助我们改进 + * - 此功能尚在试验阶段 - 性能与稳定性可能仍然存在问题 - 使用过程遇到问题请向我们报告并帮助我们改进 * @param context 当前 [Context] * @param name 标识当前 [Class] 缓存的名称 - 不设置将不启用缓存 - 启用缓存必须启用 [async] * @param async 是否启用异步 @@ -164,7 +164,7 @@ class DexClassFinder internal constructor( * * com.demo.test.demo * - * - ❗建议设置此参数指定查找范围 - 否则 [Class] 过多时将会非常慢 + * - 建议设置此参数指定查找范围 - 否则 [Class] 过多时将会非常慢 * @param name 指定包名 * @return [FromPackageRules] 可设置 [FromPackageRules.absolute] 标识包名绝对匹配 */ @@ -305,7 +305,7 @@ class DexClassFinder internal constructor( * * 此时 [Class] 只应该继承于 [Any] * - * - ❗设置此条件后 [extends] 将失效 + * - 设置此条件后 [extends] 将失效 */ fun noExtends() { rulesData.isNoExtendsClass = true @@ -314,7 +314,7 @@ class DexClassFinder internal constructor( /** * 设置 [Class] 没有任何接口 * - * - ❗设置此条件后 [implements] 将失效 + * - 设置此条件后 [implements] 将失效 */ fun noImplements() { rulesData.isNoImplementsClass = true @@ -325,7 +325,7 @@ class DexClassFinder internal constructor( * * 此时 [Class] 只应该继承于 [Any] * - * - ❗设置此条件后 [extends] 与 [implements] 将失效 + * - 设置此条件后 [extends] 与 [implements] 将失效 */ fun noSuper() { noExtends() @@ -524,7 +524,7 @@ class DexClassFinder internal constructor( * * - 在查找条件找不到任何结果的时候将返回 null * - * - ❗若你设置了 [async] 请使用 [wait] 方法 + * - 若你设置了 [async] 请使用 [wait] 方法 * @return [Class] or null */ fun get() = all().takeIf { it.isNotEmpty() }?.first() @@ -536,7 +536,7 @@ class DexClassFinder internal constructor( * * - 在查找条件找不到任何结果的时候将返回空的 [HashSet] * - * - ❗若你设置了 [async] 请使用 [waitAll] 方法 + * - 若你设置了 [async] 请使用 [waitAll] 方法 * @return [HashSet]<[Class]> */ fun all() = classInstances @@ -548,7 +548,7 @@ class DexClassFinder internal constructor( * * - 在查找条件找不到任何结果的时候将不会执行 * - * - ❗若你设置了 [async] 请使用 [waitAll] 方法 + * - 若你设置了 [async] 请使用 [waitAll] 方法 * @param result 回调每个结果 * @return [Result] 可继续向下监听 */ @@ -564,7 +564,7 @@ class DexClassFinder internal constructor( * * - 在查找条件找不到任何结果的时候将回调 null * - * - ❗你需要设置 [async] 后此方法才会被回调 - 否则请使用 [get] 方法 + * - 你需要设置 [async] 后此方法才会被回调 - 否则请使用 [get] 方法 * @param result 回调 - ([Class] or null) * @return [Result] 可继续向下监听 */ @@ -580,7 +580,7 @@ class DexClassFinder internal constructor( * * - 在查找条件找不到任何结果的时候将回调空的 [HashSet] * - * - ❗你需要设置 [async] 后此方法才会被回调 - 否则请使用 [all] 方法 + * - 你需要设置 [async] 后此方法才会被回调 - 否则请使用 [all] 方法 * @param result 回调 - ([HashSet]<[Class]>) * @return [Result] 可继续向下监听 */ @@ -603,7 +603,7 @@ class DexClassFinder internal constructor( /** * 忽略异常并停止打印任何错误日志 * - * - ❗此时若要监听异常结果 - 你需要手动实现 [onNoClassDefFoundError] 方法 + * - 此时若要监听异常结果 - 你需要手动实现 [onNoClassDefFoundError] 方法 * @return [Result] 可继续向下监听 */ fun ignored(): Result { diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt index fe53d47..f5e085e 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt @@ -95,10 +95,10 @@ class ConstructorRules internal constructor(private val rulesData: ConstructorRu * param(StringType, BooleanType, VagueType, IntType) * ``` * - * - ❗无参 [Constructor] 请使用 [emptyParam] 设置查找条件 + * - 无参 [Constructor] 请使用 [emptyParam] 设置查找条件 * - * - ❗有参 [Constructor] 必须使用此方法设定参数或使用 [paramCount] 指定个数 - * @param paramType 参数类型数组 - ❗只能是 [Class]、[String]、[VariousClass] + * - 有参 [Constructor] 必须使用此方法设定参数或使用 [paramCount] 指定个数 + * @param paramType 参数类型数组 - 只能是 [Class]、[String]、[VariousClass] */ fun param(vararg paramType: Any) { if (paramType.isEmpty()) error("paramTypes is empty, please use emptyParam() instead") @@ -115,9 +115,9 @@ class ConstructorRules internal constructor(private val rulesData: ConstructorRu * param { it[1] == StringClass || it[2].name == "java.lang.String" } * ``` * - * - ❗无参 [Constructor] 请使用 [emptyParam] 设置查找条件 + * - 无参 [Constructor] 请使用 [emptyParam] 设置查找条件 * - * - ❗有参 [Constructor] 必须使用此方法设定参数或使用 [paramCount] 指定个数 + * - 有参 [Constructor] 必须使用此方法设定参数或使用 [paramCount] 指定个数 * @param conditions 条件方法体 */ fun param(conditions: ObjectsConditions) { diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt index dad2e4c..129d081 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt @@ -56,7 +56,7 @@ class FieldRules internal constructor(private val rulesData: FieldRulesData) : B /** * 设置 [Field] 类型 * - * - ❗只能是 [Class]、[String]、[VariousClass] + * - 只能是 [Class]、[String]、[VariousClass] * * - 可不填写类型 * @return [Any] or null diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt index be43ddf..d72c8f2 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt @@ -76,7 +76,7 @@ class MethodRules internal constructor(private val rulesData: MethodRulesData) : /** * 设置 [Method] 返回值 * - * - ❗只能是 [Class]、[String]、[VariousClass] + * - 只能是 [Class]、[String]、[VariousClass] * * - 可不填写返回值 * @return [Any] or null @@ -121,10 +121,10 @@ class MethodRules internal constructor(private val rulesData: MethodRulesData) : * param(StringType, BooleanType, VagueType, IntType) * ``` * - * - ❗无参 [Method] 请使用 [emptyParam] 设置查找条件 + * - 无参 [Method] 请使用 [emptyParam] 设置查找条件 * - * - ❗有参 [Method] 必须使用此方法设定参数或使用 [paramCount] 指定个数 - * @param paramType 参数类型数组 - ❗只能是 [Class]、[String]、[VariousClass] + * - 有参 [Method] 必须使用此方法设定参数或使用 [paramCount] 指定个数 + * @param paramType 参数类型数组 - 只能是 [Class]、[String]、[VariousClass] */ fun param(vararg paramType: Any) { if (paramType.isEmpty()) error("paramTypes is empty, please use emptyParam() instead") @@ -141,9 +141,9 @@ class MethodRules internal constructor(private val rulesData: MethodRulesData) : * param { it[1] == StringClass || it[2].name == "java.lang.String" } * ``` * - * - ❗无参 [Method] 请使用 [emptyParam] 设置查找条件 + * - 无参 [Method] 请使用 [emptyParam] 设置查找条件 * - * - ❗有参 [Method] 必须使用此方法设定参数或使用 [paramCount] 指定个数 + * - 有参 [Method] 必须使用此方法设定参数或使用 [paramCount] 指定个数 * @param conditions 条件方法体 */ fun param(conditions: ObjectsConditions) { diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt index 982cd75..7f9773a 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt @@ -79,7 +79,7 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = /** * 设置 [Constructor] 标识符筛选条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -114,12 +114,12 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * param(StringType, BooleanType, VagueType, IntType) * ``` * - * - ❗无参 [Constructor] 请使用 [emptyParam] 设置查找条件 + * - 无参 [Constructor] 请使用 [emptyParam] 设置查找条件 * - * - ❗有参 [Constructor] 必须使用此方法设定参数或使用 [paramCount] 指定个数 + * - 有参 [Constructor] 必须使用此方法设定参数或使用 [paramCount] 指定个数 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 - * @param paramType 参数类型数组 - ❗只能是 [Class]、[String]、[VariousClass] + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * @param paramType 参数类型数组 - 只能是 [Class]、[String]、[VariousClass] * @return [BaseFinder.IndexTypeCondition] */ fun param(vararg paramType: Any): IndexTypeCondition { @@ -137,11 +137,11 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * param { it[1] == StringClass || it[2].name == "java.lang.String" } * ``` * - * - ❗无参 [Constructor] 请使用 [emptyParam] 设置查找条件 + * - 无参 [Constructor] 请使用 [emptyParam] 设置查找条件 * - * - ❗有参 [Constructor] 必须使用此方法设定参数或使用 [paramCount] 指定个数 + * - 有参 [Constructor] 必须使用此方法设定参数或使用 [paramCount] 指定个数 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -163,7 +163,7 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * * 若参数个数小于零则忽略并使用 [param] * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param num 个数 * @return [BaseFinder.IndexTypeCondition] */ @@ -183,7 +183,7 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * paramCount(1..5) * ``` * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param numRange 个数范围 * @return [BaseFinder.IndexTypeCondition] */ @@ -203,7 +203,7 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * paramCount { it >= 5 || it.isZero() } * ``` * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -215,7 +215,7 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = /** * 设置在 [classSet] 的所有父类中查找当前 [Constructor] * - * - ❗若当前 [classSet] 的父类较多可能会耗时 - API 会自动循环到父类继承是 [Any] 前的最后一个类 + * - 若当前 [classSet] 的父类较多可能会耗时 - API 会自动循环到父类继承是 [Any] 前的最后一个类 * @param isOnlySuperClass 是否仅在当前 [classSet] 的父类中查找 - 若父类是 [Any] 则不会生效 */ fun superClass(isOnlySuperClass: Boolean = false) { @@ -349,9 +349,9 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * * - 若有多个 [Constructor] 结果只会返回第一个 * - * - ❗在 [memberInstances] 结果为空时使用此方法将无法获得对象 + * - 在 [memberInstances] 结果为空时使用此方法将无法获得对象 * - * - ❗若你设置了 [remedys] 请使用 [wait] 回调结果方法 + * - 若你设置了 [remedys] 请使用 [wait] 回调结果方法 * @return [Instance] */ fun get() = Instance(give()) @@ -361,9 +361,9 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * * - 返回全部查找条件匹配的多个 [Constructor] 实例结果 * - * - ❗在 [memberInstances] 结果为空时使用此方法将无法获得对象 + * - 在 [memberInstances] 结果为空时使用此方法将无法获得对象 * - * - ❗若你设置了 [remedys] 请使用 [waitAll] 回调结果方法 + * - 若你设置了 [remedys] 请使用 [waitAll] 回调结果方法 * @return [ArrayList]<[Instance]> */ fun all() = arrayListOf().apply { giveAll().takeIf { it.isNotEmpty() }?.forEach { add(Instance(it)) } } @@ -393,9 +393,9 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * * - 若有多个 [Constructor] 结果只会返回第一个 * - * - ❗若你设置了 [remedys] 必须使用此方法才能获得结果 + * - 若你设置了 [remedys] 必须使用此方法才能获得结果 * - * - ❗若你没有设置 [remedys] 此方法将不会被回调 + * - 若你没有设置 [remedys] 此方法将不会被回调 * @param initiate 回调 [Instance] */ fun wait(initiate: Instance.() -> Unit) { @@ -408,9 +408,9 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * * - 返回全部查找条件匹配的多个 [Constructor] 实例结果 * - * - ❗若你设置了 [remedys] 必须使用此方法才能获得结果 + * - 若你设置了 [remedys] 必须使用此方法才能获得结果 * - * - ❗若你没有设置 [remedys] 此方法将不会被回调 + * - 若你没有设置 [remedys] 此方法将不会被回调 * @param initiate 回调 [ArrayList]<[Instance]> */ fun waitAll(initiate: ArrayList.() -> Unit) { @@ -448,7 +448,7 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = /** * 忽略异常并停止打印任何错误日志 * - * - ❗此时若要监听异常结果 - 你需要手动实现 [onNoSuchConstructor] 方法 + * - 此时若要监听异常结果 - 你需要手动实现 [onNoSuchConstructor] 方法 * @return [Result] 可继续向下监听 */ fun ignored(): Result { @@ -461,7 +461,7 @@ class ConstructorFinder internal constructor(override val classSet: Class<*>? = * * 调用与创建目标实例类对象 * - * - ❗请使用 [get]、[wait]、[all]、[waitAll] 方法来获取 [Instance] + * - 请使用 [get]、[wait]、[all]、[waitAll] 方法来获取 [Instance] * @param constructor 当前 [Constructor] 实例对象 */ inner class Instance internal constructor(private val constructor: Constructor<*>?) { diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt index 689ce9a..4f3c6f3 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt @@ -65,7 +65,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置 [Field] 名称 * - * - ❗若不填写名称则必须存在一个其它条件 + * - 若不填写名称则必须存在一个其它条件 * @return [String] */ var name @@ -77,7 +77,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置 [Field] 类型 * - * - ❗只能是 [Class]、[String]、[VariousClass] + * - 只能是 [Class]、[String]、[VariousClass] * * - 可不填写类型 * @return [Any] or null @@ -93,7 +93,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) * * - 可不设置筛选条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -111,9 +111,9 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置 [Field] 名称 * - * - ❗若不填写名称则必须存在一个其它条件 + * - 若不填写名称则必须存在一个其它条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param value 名称 * @return [BaseFinder.IndexTypeCondition] */ @@ -125,9 +125,9 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置 [Field] 名称条件 * - * - ❗若不填写名称则必须存在一个其它条件 + * - 若不填写名称则必须存在一个其它条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -141,8 +141,8 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) * * - 可不填写类型 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 - * @param value 类型 - ❗只能是 [Class]、[String]、[VariousClass] + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * @param value 类型 - 只能是 [Class]、[String]、[VariousClass] * @return [BaseFinder.IndexTypeCondition] */ fun type(value: Any): IndexTypeCondition { @@ -161,7 +161,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) * type { it == StringClass || it.name == "java.lang.String" } * ``` * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -173,7 +173,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置在 [classSet] 的所有父类中查找当前 [Field] * - * - ❗若当前 [classSet] 的父类较多可能会耗时 - API 会自动循环到父类继承是 [Any] 前的最后一个类 + * - 若当前 [classSet] 的父类较多可能会耗时 - API 会自动循环到父类继承是 [Any] 前的最后一个类 * @param isOnlySuperClass 是否仅在当前 [classSet] 的父类中查找 - 若父类是 [Any] 则不会生效 */ fun superClass(isOnlySuperClass: Boolean = false) { @@ -308,11 +308,11 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) * * - 若有多个 [Field] 结果只会返回第一个 * - * - ❗在 [memberInstances] 结果为空时使用此方法将无法获得对象 + * - 在 [memberInstances] 结果为空时使用此方法将无法获得对象 * - * - ❗如果目标对象不是静态 - 你必须设置 [instance] + * - 如果目标对象不是静态 - 你必须设置 [instance] * - * - ❗若你设置了 [remedys] 请使用 [wait] 回调结果方法 + * - 若你设置了 [remedys] 请使用 [wait] 回调结果方法 * @param instance [Field] 所在的实例对象 - 如果是静态可不填 - 默认 null * @return [Instance] */ @@ -323,11 +323,11 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) * * - 返回全部查找条件匹配的多个 [Field] 实例结果 * - * - ❗在 [memberInstances] 结果为空时使用此方法将无法获得对象 + * - 在 [memberInstances] 结果为空时使用此方法将无法获得对象 * - * - ❗如果目标对象不是静态 - 你必须设置 [instance] + * - 如果目标对象不是静态 - 你必须设置 [instance] * - * - ❗若你设置了 [remedys] 请使用 [waitAll] 回调结果方法 + * - 若你设置了 [remedys] 请使用 [waitAll] 回调结果方法 * @param instance [Field] 所在的实例对象 - 如果是静态可不填 - 默认 null * @return [ArrayList]<[Instance]> */ @@ -359,9 +359,9 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) * * - 若有多个 [Field] 结果只会返回第一个 * - * - ❗若你设置了 [remedys] 必须使用此方法才能获得结果 + * - 若你设置了 [remedys] 必须使用此方法才能获得结果 * - * - ❗若你没有设置 [remedys] 此方法将不会被回调 + * - 若你没有设置 [remedys] 此方法将不会被回调 * @param instance 所在实例 * @param initiate 回调 [Instance] */ @@ -375,9 +375,9 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) * * - 返回全部查找条件匹配的多个 [Field] 实例结果 * - * - ❗若你设置了 [remedys] 必须使用此方法才能获得结果 + * - 若你设置了 [remedys] 必须使用此方法才能获得结果 * - * - ❗若你没有设置 [remedys] 此方法将不会被回调 + * - 若你没有设置 [remedys] 此方法将不会被回调 * @param instance 所在实例 * @param initiate 回调 [ArrayList]<[Instance]> */ @@ -418,7 +418,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 忽略异常并停止打印任何错误日志 * - * - ❗此时若要监听异常结果 - 你需要手动实现 [onNoSuchField] 方法 + * - 此时若要监听异常结果 - 你需要手动实现 [onNoSuchField] 方法 * @return [Result] 可继续向下监听 */ fun ignored(): Result { @@ -429,7 +429,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * [Field] 实例处理类 * - * - ❗请使用 [get]、[all] 方法来获取 [Instance] + * - 请使用 [get]、[all] 方法来获取 [Instance] * @param instance 当前 [Field] 所在类的实例对象 * @param field 当前 [Field] 实例对象 */ @@ -467,7 +467,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [Byte] 实例 * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回 null + * - 请确认目标 [Field] 的类型 - 发生错误会返回 null * @return [Byte] or null */ fun byte() = cast() @@ -475,7 +475,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [Int] 实例 * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回默认值 + * - 请确认目标 [Field] 的类型 - 发生错误会返回默认值 * @return [Int] 取不到返回 0 */ fun int() = cast() ?: 0 @@ -483,7 +483,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [Long] 实例 * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回默认值 + * - 请确认目标 [Field] 的类型 - 发生错误会返回默认值 * @return [Long] 取不到返回 0L */ fun long() = cast() ?: 0L @@ -491,7 +491,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [Short] 实例 * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回默认值 + * - 请确认目标 [Field] 的类型 - 发生错误会返回默认值 * @return [Short] 取不到返回 0 */ fun short() = cast() ?: 0 @@ -499,7 +499,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [Double] 实例 * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回默认值 + * - 请确认目标 [Field] 的类型 - 发生错误会返回默认值 * @return [Double] 取不到返回 0.0 */ fun double() = cast() ?: 0.0 @@ -507,7 +507,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [Float] 实例 * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回默认值 + * - 请确认目标 [Field] 的类型 - 发生错误会返回默认值 * @return [Float] 取不到返回 0f */ fun float() = cast() ?: 0f @@ -515,7 +515,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [String] 实例 * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回默认值 + * - 请确认目标 [Field] 的类型 - 发生错误会返回默认值 * @return [String] 取不到返回 "" */ fun string() = cast() ?: "" @@ -523,7 +523,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [Char] 实例 * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回默认值 + * - 请确认目标 [Field] 的类型 - 发生错误会返回默认值 * @return [Char] 取不到返回 ' ' */ fun char() = cast() ?: ' ' @@ -531,7 +531,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [Boolean] 实例 * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回默认值 + * - 请确认目标 [Field] 的类型 - 发生错误会返回默认值 * @return [Boolean] 取不到返回 false */ fun boolean() = cast() ?: false @@ -545,7 +545,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [Array] 实例 - 每项类型 [T] * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回空数组 + * - 请确认目标 [Field] 的类型 - 发生错误会返回空数组 * @return [Array] 取不到返回空数组 */ inline fun array() = cast() ?: arrayOf() @@ -553,7 +553,7 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 得到当前 [Field] 的 [List] 实例 - 每项类型 [T] * - * - ❗请确认目标 [Field] 的类型 - 发生错误会返回空数组 + * - 请确认目标 [Field] 的类型 - 发生错误会返回空数组 * @return [List] 取不到返回空数组 */ inline fun list() = cast() ?: listOf() @@ -567,14 +567,14 @@ class FieldFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置当前 [Field] 实例为 true * - * - ❗请确保示例对象类型为 [Boolean] + * - 请确保示例对象类型为 [Boolean] */ fun setTrue() = set(true) /** * 设置当前 [Field] 实例为 true * - * - ❗请确保示例对象类型为 [Boolean] + * - 请确保示例对象类型为 [Boolean] */ fun setFalse() = set(false) diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt index 872de0f..8e20cd5 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt @@ -67,7 +67,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置 [Method] 名称 * - * - ❗若不填写名称则必须存在一个其它条件 + * - 若不填写名称则必须存在一个其它条件 * @return [String] */ var name @@ -93,7 +93,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置 [Method] 返回值 * - * - ❗只能是 [Class]、[String]、[VariousClass] + * - 只能是 [Class]、[String]、[VariousClass] * * - 可不填写返回值 * @return [Any] or null @@ -109,7 +109,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * * - 可不设置筛选条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -144,12 +144,12 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * param(StringType, BooleanType, VagueType, IntType) * ``` * - * - ❗无参 [Method] 请使用 [emptyParam] 设置查找条件 + * - 无参 [Method] 请使用 [emptyParam] 设置查找条件 * - * - ❗有参 [Method] 必须使用此方法设定参数或使用 [paramCount] 指定个数 + * - 有参 [Method] 必须使用此方法设定参数或使用 [paramCount] 指定个数 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 - * @param paramType 参数类型数组 - ❗只能是 [Class]、[String]、[VariousClass] + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * @param paramType 参数类型数组 - 只能是 [Class]、[String]、[VariousClass] * @return [BaseFinder.IndexTypeCondition] */ fun param(vararg paramType: Any): IndexTypeCondition { @@ -167,11 +167,11 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * param { it[1] == StringClass || it[2].name == "java.lang.String" } * ``` * - * - ❗无参 [Method] 请使用 [emptyParam] 设置查找条件 + * - 无参 [Method] 请使用 [emptyParam] 设置查找条件 * - * - ❗有参 [Method] 必须使用此方法设定参数或使用 [paramCount] 指定个数 + * - 有参 [Method] 必须使用此方法设定参数或使用 [paramCount] 指定个数 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -189,9 +189,9 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置 [Method] 名称 * - * - ❗若不填写名称则必须存在一个其它条件 + * - 若不填写名称则必须存在一个其它条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param value 名称 * @return [BaseFinder.IndexTypeCondition] */ @@ -203,9 +203,9 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置 [Method] 名称条件 * - * - ❗若不填写名称则必须存在一个其它条件 + * - 若不填写名称则必须存在一个其它条件 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -221,7 +221,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * * 若参数个数小于零则忽略并使用 [param] * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param num 个数 * @return [BaseFinder.IndexTypeCondition] */ @@ -241,7 +241,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * paramCount(1..5) * ``` * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param numRange 个数范围 * @return [BaseFinder.IndexTypeCondition] */ @@ -261,7 +261,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * paramCount { it >= 5 || it.isZero() } * ``` * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -275,7 +275,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * * - 可不填写返回值 * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param value 个数 * @return [BaseFinder.IndexTypeCondition] */ @@ -295,7 +295,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * returnType { it == StringClass || it.name == "java.lang.String" } * ``` * - * - ❗存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 + * - 存在多个 [BaseFinder.IndexTypeCondition] 时除了 [order] 只会生效最后一个 * @param conditions 条件方法体 * @return [BaseFinder.IndexTypeCondition] */ @@ -307,7 +307,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 设置在 [classSet] 的所有父类中查找当前 [Method] * - * - ❗若当前 [classSet] 的父类较多可能会耗时 - API 会自动循环到父类继承是 [Any] 前的最后一个类 + * - 若当前 [classSet] 的父类较多可能会耗时 - API 会自动循环到父类继承是 [Any] 前的最后一个类 * @param isOnlySuperClass 是否仅在当前 [classSet] 的父类中查找 - 若父类是 [Any] 则不会生效 */ fun superClass(isOnlySuperClass: Boolean = false) { @@ -441,9 +441,9 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * * - 若有多个 [Method] 结果只会返回第一个 * - * - ❗在 [memberInstances] 结果为空时使用此方法将无法获得对象 + * - 在 [memberInstances] 结果为空时使用此方法将无法获得对象 * - * - ❗若你设置了 [remedys] 请使用 [wait] 回调结果方法 + * - 若你设置了 [remedys] 请使用 [wait] 回调结果方法 * @param instance 所在实例 * @return [Instance] */ @@ -454,9 +454,9 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * * - 返回全部查找条件匹配的多个 [Method] 实例结果 * - * - ❗在 [memberInstances] 结果为空时使用此方法将无法获得对象 + * - 在 [memberInstances] 结果为空时使用此方法将无法获得对象 * - * - ❗若你设置了 [remedys] 请使用 [waitAll] 回调结果方法 + * - 若你设置了 [remedys] 请使用 [waitAll] 回调结果方法 * @param instance 所在实例 * @return [ArrayList]<[Instance]> */ @@ -488,9 +488,9 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * * - 若有多个 [Method] 结果只会返回第一个 * - * - ❗若你设置了 [remedys] 必须使用此方法才能获得结果 + * - 若你设置了 [remedys] 必须使用此方法才能获得结果 * - * - ❗若你没有设置 [remedys] 此方法将不会被回调 + * - 若你没有设置 [remedys] 此方法将不会被回调 * @param instance 所在实例 * @param initiate 回调 [Instance] */ @@ -504,9 +504,9 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) * * - 返回全部查找条件匹配的多个 [Method] 实例结果 * - * - ❗若你设置了 [remedys] 必须使用此方法才能获得结果 + * - 若你设置了 [remedys] 必须使用此方法才能获得结果 * - * - ❗若你没有设置 [remedys] 此方法将不会被回调 + * - 若你没有设置 [remedys] 此方法将不会被回调 * @param instance 所在实例 * @param initiate 回调 [ArrayList]<[Instance]> */ @@ -547,7 +547,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 忽略异常并停止打印任何错误日志 * - * - ❗此时若要监听异常结果 - 你需要手动实现 [onNoSuchMethod] 方法 + * - 此时若要监听异常结果 - 你需要手动实现 [onNoSuchMethod] 方法 * @return [Result] 可继续向下监听 */ fun ignored(): Result { @@ -558,7 +558,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * [Method] 实例处理类 * - * - ❗请使用 [get]、[wait]、[all]、[waitAll] 方法来获取 [Instance] + * - 请使用 [get]、[wait]、[all]、[waitAll] 方法来获取 [Instance] * @param instance 当前 [Method] 所在类的实例对象 * @param method 当前 [Method] 实例对象 */ @@ -588,7 +588,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 执行 [Method] - 指定 [Byte] 返回值类型 * - * - ❗请确认目标变量的类型 - 发生错误会返回 null + * - 请确认目标变量的类型 - 发生错误会返回 null * @param args 方法参数 * @return [Byte] or null */ @@ -597,7 +597,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 执行 [Method] - 指定 [Int] 返回值类型 * - * - ❗请确认目标 [Method] 的返回值 - 发生错误会返回默认值 + * - 请确认目标 [Method] 的返回值 - 发生错误会返回默认值 * @param args 方法参数 * @return [Int] 取不到返回 0 */ @@ -606,7 +606,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 执行 [Method] - 指定 [Long] 返回值类型 * - * - ❗请确认目标 [Method] 的返回值 - 发生错误会返回默认值 + * - 请确认目标 [Method] 的返回值 - 发生错误会返回默认值 * @param args 方法参数 * @return [Long] 取不到返回 0L */ @@ -615,7 +615,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 执行 [Method] - 指定 [Short] 返回值类型 * - * - ❗请确认目标 [Method] 的返回值 - 发生错误会返回默认值 + * - 请确认目标 [Method] 的返回值 - 发生错误会返回默认值 * @param args 方法参数 * @return [Short] 取不到返回 0 */ @@ -624,7 +624,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 执行 [Method] - 指定 [Double] 返回值类型 * - * - ❗请确认目标 [Method] 的返回值 - 发生错误会返回默认值 + * - 请确认目标 [Method] 的返回值 - 发生错误会返回默认值 * @param args 方法参数 * @return [Double] 取不到返回 0.0 */ @@ -633,7 +633,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 执行 [Method] - 指定 [Float] 返回值类型 * - * - ❗请确认目标 [Method] 的返回值 - 发生错误会返回默认值 + * - 请确认目标 [Method] 的返回值 - 发生错误会返回默认值 * @param args 方法参数 * @return [Float] 取不到返回 0f */ @@ -656,7 +656,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 执行 [Method] - 指定 [Boolean] 返回值类型 * - * - ❗请确认目标 [Method] 的返回值 - 发生错误会返回默认值 + * - 请确认目标 [Method] 的返回值 - 发生错误会返回默认值 * @param args 方法参数 * @return [Boolean] 取不到返回 false */ @@ -665,7 +665,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 执行 [Method] - 指定 [Array] 返回值类型 - 每项类型 [T] * - * - ❗请确认目标 [Method] 的返回值 - 发生错误会返回空数组 + * - 请确认目标 [Method] 的返回值 - 发生错误会返回空数组 * @return [Array] 取不到返回空数组 */ inline fun array(vararg args: Any?) = invoke(*args) ?: arrayOf() @@ -673,7 +673,7 @@ class MethodFinder internal constructor(override val classSet: Class<*>? = null) /** * 执行 [Method] - 指定 [List] 返回值类型 - 每项类型 [T] * - * - ❗请确认目标 [Method] 的返回值 - 发生错误会返回空数组 + * - 请确认目标 [Method] 的返回值 - 发生错误会返回空数组 * @return [List] 取不到返回空数组 */ inline fun list(vararg args: Any?) = invoke(*args) ?: listOf() diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt index 0a28265..9b50d09 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt @@ -138,7 +138,7 @@ val ActivityManagerNativeClass get() = "android.app.ActivityManagerNative".toCla /** * 获得 [IActivityTaskManager] 类型 * - * - ❗在 Android O (26) 及以上系统加入 + * - 在 Android O (26) 及以上系统加入 * @return [Class] or null */ val IActivityTaskManagerClass get() = "android.app.IActivityTaskManager".toClassOrNull() @@ -146,7 +146,7 @@ val IActivityTaskManagerClass get() = "android.app.IActivityTaskManager".toClass /** * 获得 [ActivityTaskManager] 类型 * - * - ❗在 Android O (26) 及以上系统加入 + * - 在 Android O (26) 及以上系统加入 * @return [Class] or null */ val ActivityTaskManagerClass get() = "android.app.ActivityTaskManager".toClassOrNull() @@ -352,7 +352,7 @@ val ArrayMapClass get() = classOf>() /** * 获得 [ArraySet] 类型 * - * - ❗在 Android M (23) 及以上系统加入 + * - 在 Android M (23) 及以上系统加入 * @return [Class]<[ArraySet]> or null */ val ArraySetClass get() = if (Build.VERSION.SDK_INT >= 23) classOf>() else null @@ -396,7 +396,7 @@ val AsyncTaskClass get() = classOf>() /** * 获得 [SimpleDateFormat] 类型 * - * - ❗在 Android N (24) 及以上系统加入 + * - 在 Android N (24) 及以上系统加入 * @return [Class]<[SimpleDateFormat]> or null */ val SimpleDateFormatClass_Android get() = if (Build.VERSION.SDK_INT >= 24) classOf() else null @@ -416,7 +416,7 @@ val WindowClass get() = classOf() /** * 获得 [WindowMetrics] 类型 * - * - ❗在 Android R (30) 及以上系统加入 + * - 在 Android R (30) 及以上系统加入 * @return [Class]<[WindowMetrics]> or null */ val WindowMetricsClass get() = if (Build.VERSION.SDK_INT >= 30) classOf() else null @@ -430,7 +430,7 @@ val WindowInsetsClass get() = classOf() /** * 获得 [WindowInsets.Type] 类型 * - * - ❗在 Android R (30) 及以上系统加入 + * - 在 Android R (30) 及以上系统加入 * @return [Class]<[WindowInsets.Type]> or null */ val WindowInsets_TypeClass get() = if (Build.VERSION.SDK_INT >= 30) classOf() else null @@ -648,7 +648,7 @@ val VibratorClass get() = classOf() /** * 获得 [VibrationEffect] 类型 * - * - ❗在 Android O (26) 及以上系统加入 + * - 在 Android O (26) 及以上系统加入 * @return [Class]<[VibrationEffect]> or null */ val VibrationEffectClass get() = if (Build.VERSION.SDK_INT >= 26) classOf() else null @@ -656,7 +656,7 @@ val VibrationEffectClass get() = if (Build.VERSION.SDK_INT >= 26) classOf or null */ val VibrationAttributesClass get() = if (Build.VERSION.SDK_INT >= 30) classOf() else null @@ -688,7 +688,7 @@ val UserHandleClass get() = classOf() /** * 获得 [ShortcutInfo] 类型 * - * - ❗在 Android N_MR1 (25) 及以上系统加入 + * - 在 Android N_MR1 (25) 及以上系统加入 * @return [Class]<[ShortcutInfo]> or null */ val ShortcutInfoClass get() = if (Build.VERSION.SDK_INT >= 25) classOf() else null @@ -696,7 +696,7 @@ val ShortcutInfoClass get() = if (Build.VERSION.SDK_INT >= 25) classOf or null */ val ShortcutManagerClass get() = if (Build.VERSION.SDK_INT >= 30) classOf() else null @@ -704,7 +704,7 @@ val ShortcutManagerClass get() = if (Build.VERSION.SDK_INT >= 30) classOf or null */ val ShortcutQueryClass get() = if (Build.VERSION.SDK_INT >= 25) classOf() else null diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt index 9909695..7003502 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt @@ -76,7 +76,7 @@ val BitmapClass get() = classOf() /** * 获得 [Icon] 类型 * - * - ❗在 Android M (23) 及以上系统加入 + * - 在 Android M (23) 及以上系统加入 * @return [Class]<[Icon]> or null */ val IconClass get() = if (Build.VERSION.SDK_INT >= 23) classOf() else null diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt index 1778572..1648fc8 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt @@ -294,9 +294,9 @@ val ShortArrayType get() = ArrayClass(ShortType) /** * 获得 [Short] - [Array] 类型 * - * - ❗此方法已弃用 - 在之后的版本中将直接被删除 + * - 此方法已弃用 - 在之后的版本中将直接被删除 * - * - ❗请现在迁移到 [ShortArrayType] + * - 请现在迁移到 [ShortArrayType] * @return [Class]<[JavaArray]> */ @Deprecated(message = "请使用修复后的命名方法", ReplaceWith("ShortArrayType")) @@ -565,7 +565,7 @@ val ThreadClass get() = classOf() /** * 获得 [Base64] 类型 * - * - ❗在 Android O (26) 及以上系统加入 + * - 在 Android O (26) 及以上系统加入 * @return [Class]<[Base64]> or null */ val Base64Class_Java get() = if (Build.VERSION.SDK_INT >= 26) classOf() else null