mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Modify change naming of "HookEntryClass" to "hook entry class" in InjectYukiHookWithXposed, YukiHookXposedProcessor, CodeSourceFileFactory
This commit is contained in:
@@ -155,13 +155,13 @@ class YukiHookXposedProcessor : SymbolProcessorProvider {
|
||||
data.isEntryClassKindOfObject = when (it.classKind) {
|
||||
ClassKind.CLASS -> false
|
||||
ClassKind.OBJECT -> true
|
||||
else -> problem(msg = "Invalid HookEntryClass \"${it.simpleName.asString()}\" kind \"${it.classKind}\"")
|
||||
else -> problem(msg = "Invalid hook entry class \"${it.simpleName.asString()}\" kind \"${it.classKind}\"")
|
||||
}
|
||||
generateAssetsFile(codePath = (it.location as? FileLocation?)?.filePath ?: "", sourcePath = sourcePath, data)
|
||||
}
|
||||
it.superTypes.any { type -> type.element.toString() == "YukiHookXposedInitProxy" } ->
|
||||
problem(msg = "\"YukiHookXposedInitProxy\" was deprecated, please replace to \"IYukiHookXposedInit\"")
|
||||
else -> problem(msg = "HookEntryClass \"${it.simpleName.asString()}\" must be implements \"IYukiHookXposedInit\"")
|
||||
else -> problem(msg = "The hook entry class \"${it.simpleName.asString()}\" must be implements \"IYukiHookXposedInit\"")
|
||||
} else problem(msg = "\"@InjectYukiHookWithXposed\" only can be use in once times")
|
||||
/** 仅处理第一个标记的类 - 再次处理将拦截并报错 */
|
||||
isInjectOnce = false
|
||||
|
@@ -78,7 +78,7 @@ private fun createCommentContent(entryClassName: String = "", currrentClassTag:
|
||||
" *\n" +
|
||||
" * Compiled from YukiHookXposedProcessor\n" +
|
||||
" *\n" +
|
||||
(if (entryClassName.isNotBlank()) " * HookEntryClass: [$entryClassName]\n *\n" else "") +
|
||||
(if (entryClassName.isNotBlank()) " * Hook entry class: [$entryClassName]\n *\n" else "") +
|
||||
" * Generate Date: ${SimpleDateFormat.getDateTimeInstance().format(Date())}\n" +
|
||||
" *\n" +
|
||||
" * Powered by YukiHookAPI (C) HighCapable 2019-2023\n" +
|
||||
@@ -237,7 +237,7 @@ fun GenerateData.sources() = mapOf(
|
||||
" }\n" +
|
||||
" hookEntry.onHook()\n" +
|
||||
" YukiXposedModuleCaller.callOnFinishLoadModule()\n" +
|
||||
" }.onFailure { YukiXposedModuleCaller.internalLoggerE(\"YukiHookAPI try to load HookEntryClass failed\", it) }\n" +
|
||||
" }.onFailure { YukiXposedModuleCaller.internalLoggerE(\"YukiHookAPI try to load hook entry class failed\", it) }\n" +
|
||||
" YukiXposedModuleCaller.callOnPackageLoaded(\n" +
|
||||
" type = when {\n" +
|
||||
" isZygoteLoaded -> HookEntryType.ZYGOTE\n" +
|
||||
|
Reference in New Issue
Block a user