mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-06 02:35:40 +08:00
Modify optimize code style for @Deprecated annotation
This commit is contained in:
@@ -301,7 +301,7 @@ class YukiMemberHookCreator @PublishedApi internal constructor(
|
|||||||
* @param name 方法名称
|
* @param name 方法名称
|
||||||
* @return [ArrayList]<[MethodFinder.Result.Instance]>
|
* @return [ArrayList]<[MethodFinder.Result.Instance]>
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新方式来实现 Hook 所有方法", ReplaceWith(expression = "method { this.name = name }.all()"))
|
@Deprecated(message = "请使用新方式来实现 Hook 所有方法", ReplaceWith("method { this.name = name }.all()"))
|
||||||
fun allMethods(name: String) = method { this.name = name }.all()
|
fun allMethods(name: String) = method { this.name = name }.all()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -314,7 +314,7 @@ class YukiMemberHookCreator @PublishedApi internal constructor(
|
|||||||
*/
|
*/
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
message = "请使用新方式来实现 Hook 所有构造方法",
|
message = "请使用新方式来实现 Hook 所有构造方法",
|
||||||
ReplaceWith(expression = "allMembers(MembersType.CONSTRUCTOR)", "com.highcapable.yukihookapi.hook.factory.MembersType")
|
ReplaceWith("allMembers(MembersType.CONSTRUCTOR)", "com.highcapable.yukihookapi.hook.factory.MembersType")
|
||||||
)
|
)
|
||||||
fun allConstructors() = allMembers(MembersType.CONSTRUCTOR)
|
fun allConstructors() = allMembers(MembersType.CONSTRUCTOR)
|
||||||
|
|
||||||
|
@@ -572,7 +572,7 @@ class ConstructorFinder @PublishedApi internal constructor(
|
|||||||
* - ❗请现在转移到 [ignored]
|
* - ❗请现在转移到 [ignored]
|
||||||
* @return [Result] 可继续向下监听
|
* @return [Result] 可继续向下监听
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", ReplaceWith(expression = "ignored()"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("ignored()"))
|
||||||
fun ignoredError() = ignored()
|
fun ignoredError() = ignored()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -458,7 +458,7 @@ class FieldFinder @PublishedApi internal constructor(
|
|||||||
* - ❗请现在转移到 [ignored]
|
* - ❗请现在转移到 [ignored]
|
||||||
* @return [Result] 可继续向下监听
|
* @return [Result] 可继续向下监听
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", ReplaceWith(expression = "ignored()"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("ignored()"))
|
||||||
fun ignoredError() = ignored()
|
fun ignoredError() = ignored()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -668,7 +668,7 @@ class MethodFinder @PublishedApi internal constructor(
|
|||||||
* - ❗请现在转移到 [ignored]
|
* - ❗请现在转移到 [ignored]
|
||||||
* @return [Result] 可继续向下监听
|
* @return [Result] 可继续向下监听
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", ReplaceWith(expression = "ignored()"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("ignored()"))
|
||||||
fun ignoredError() = ignored()
|
fun ignoredError() = ignored()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -201,7 +201,7 @@ fun Class<*>.toJavaPrimitiveType() = when (this) {
|
|||||||
* @return [Class]
|
* @return [Class]
|
||||||
* @throws NoClassDefFoundError 如果找不到 [Class] 或设置了错误的 [ClassLoader]
|
* @throws NoClassDefFoundError 如果找不到 [Class] 或设置了错误的 [ClassLoader]
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", ReplaceWith(expression = "name.toClass(loader)"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("name.toClass(loader)"))
|
||||||
fun classOf(name: String, loader: ClassLoader? = null) = name.toClass(loader)
|
fun classOf(name: String, loader: ClassLoader? = null) = name.toClass(loader)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -369,7 +369,7 @@ inline fun <reified T : Any> T.current(ignored: Boolean = false, initiate: Curre
|
|||||||
* - ❗请现在转移到 [buildOf]
|
* - ❗请现在转移到 [buildOf]
|
||||||
* @return [Any] or null
|
* @return [Any] or null
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", replaceWith = ReplaceWith(expression = "buildOf(*param, initiate)"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("buildOf(*param, initiate)"))
|
||||||
fun Class<*>.buildOfAny(vararg param: Any?, initiate: ConstructorConditions = { emptyParam() }) = buildOf(*param, initiate)
|
fun Class<*>.buildOfAny(vararg param: Any?, initiate: ConstructorConditions = { emptyParam() }) = buildOf(*param, initiate)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -457,7 +457,7 @@ open class PackageParam internal constructor(@PublishedApi internal var wrapper:
|
|||||||
* @return [Class]
|
* @return [Class]
|
||||||
* @throws NoClassDefFoundError 如果找不到 [Class]
|
* @throws NoClassDefFoundError 如果找不到 [Class]
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", ReplaceWith(expression = "toClass()"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("toClass()"))
|
||||||
val String.clazz
|
val String.clazz
|
||||||
get() = toClass()
|
get() = toClass()
|
||||||
|
|
||||||
@@ -470,7 +470,7 @@ open class PackageParam internal constructor(@PublishedApi internal var wrapper:
|
|||||||
* @return [Class]
|
* @return [Class]
|
||||||
* @throws IllegalStateException 如果任何 [Class] 都没有匹配到
|
* @throws IllegalStateException 如果任何 [Class] 都没有匹配到
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", ReplaceWith(expression = "toClass()"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("toClass()"))
|
||||||
val VariousClass.clazz
|
val VariousClass.clazz
|
||||||
get() = toClass()
|
get() = toClass()
|
||||||
|
|
||||||
@@ -482,7 +482,7 @@ open class PackageParam internal constructor(@PublishedApi internal var wrapper:
|
|||||||
* - ❗请现在转移到 [hasClass]
|
* - ❗请现在转移到 [hasClass]
|
||||||
* @return [Boolean] 是否存在
|
* @return [Boolean] 是否存在
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", ReplaceWith(expression = "hasClass()"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("hasClass()"))
|
||||||
val String.hasClass
|
val String.hasClass
|
||||||
get() = hasClass()
|
get() = hasClass()
|
||||||
|
|
||||||
|
@@ -76,7 +76,7 @@ fun ArrayClass(type: Class<*>) = JavaArray.newInstance(type, 0).javaClass as Cla
|
|||||||
* - ❗请现在转移到 [AnyClass]
|
* - ❗请现在转移到 [AnyClass]
|
||||||
* @return [Class]<[Any]>
|
* @return [Class]<[Any]>
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", replaceWith = ReplaceWith(expression = "AnyClass"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("AnyClass"))
|
||||||
val AnyType get() = AnyClass
|
val AnyType get() = AnyClass
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -247,7 +247,7 @@ val UnitClass get() = classOf<Void>()
|
|||||||
* - ❗请现在转移到 [StringClass]
|
* - ❗请现在转移到 [StringClass]
|
||||||
* @return [Class]<[String]>
|
* @return [Class]<[String]>
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", replaceWith = ReplaceWith(expression = "StringClass"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("StringClass"))
|
||||||
val StringType get() = StringClass
|
val StringType get() = StringClass
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -258,7 +258,7 @@ val StringType get() = StringClass
|
|||||||
* - ❗请现在转移到 [CharSequenceClass]
|
* - ❗请现在转移到 [CharSequenceClass]
|
||||||
* @return [Class]<[CharSequence]>
|
* @return [Class]<[CharSequence]>
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新的命名方法", replaceWith = ReplaceWith(expression = "CharSequenceClass"))
|
@Deprecated(message = "请使用新的命名方法", ReplaceWith("CharSequenceClass"))
|
||||||
val CharSequenceType get() = CharSequenceClass
|
val CharSequenceType get() = CharSequenceClass
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -193,7 +193,7 @@ class YukiHookModulePrefs private constructor(private var context: Context? = nu
|
|||||||
* - ❗请现在转移到 [isPreferencesAvailable]
|
* - ❗请现在转移到 [isPreferencesAvailable]
|
||||||
* @return [Boolean]
|
* @return [Boolean]
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新方式来实现此功能", replaceWith = ReplaceWith(expression = "isPreferencesAvailable"))
|
@Deprecated(message = "请使用新方式来实现此功能", ReplaceWith("isPreferencesAvailable"))
|
||||||
val isXSharePrefsReadable get() = isPreferencesAvailable
|
val isXSharePrefsReadable get() = isPreferencesAvailable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -204,7 +204,7 @@ class YukiHookModulePrefs private constructor(private var context: Context? = nu
|
|||||||
* - ❗请现在转移到 [isPreferencesAvailable]
|
* - ❗请现在转移到 [isPreferencesAvailable]
|
||||||
* @return [Boolean]
|
* @return [Boolean]
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "请使用新方式来实现此功能", replaceWith = ReplaceWith(expression = "isPreferencesAvailable"))
|
@Deprecated(message = "请使用新方式来实现此功能", ReplaceWith("isPreferencesAvailable"))
|
||||||
val isRunInNewXShareMode get() = isPreferencesAvailable
|
val isRunInNewXShareMode get() = isPreferencesAvailable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -39,7 +39,7 @@ import com.highcapable.yukihookapi.hook.log.yLoggerW
|
|||||||
*
|
*
|
||||||
* - ❗请现在转移到 [IYukiHookXposedInit] 否则此接口的声明将在自动处理程序中被拦截
|
* - ❗请现在转移到 [IYukiHookXposedInit] 否则此接口的声明将在自动处理程序中被拦截
|
||||||
*/
|
*/
|
||||||
@Deprecated(message = "此接口的命名和功能已被弃用", ReplaceWith(expression = "IYukiHookXposedInit"), level = DeprecationLevel.ERROR)
|
@Deprecated(message = "此接口的命名和功能已被弃用", ReplaceWith("IYukiHookXposedInit"), level = DeprecationLevel.ERROR)
|
||||||
interface YukiHookXposedInitProxy {
|
interface YukiHookXposedInitProxy {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user