mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
Feat: add include/exclude filters for JuiceRemapper
- add thread-safe include/exclude sets to Remapper; shouldRemap matches
exact name, package prefix (trailing '/'), or nested class ('\$' after
the prefix), with exclude taking priority
- remapping stays OFF by default: an empty include set remaps nothing;
it is only enabled once addInclude is called (no config include)
- implement addInclude/addExclude/removeInclude/removeExclude/
clearIncludes/clearExcludes JNI bindings
- apply shouldRemap filter in JuiceRemapperService::onClassFileLoadHook
This commit is contained in:
1 parent
4bed99f417
commit
6fe467bccf
3 files changed
+113
-18
No files matched your search
@@ -48,7 +48,7 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
spdlog::debug("[JuiceRemapperService] Enabled");
|
||||
spdlog::debug("[JuiceRemapperService] Enabled. Waiting for addInclude to start remapping");
|
||||
}
|
||||
|
||||
void onClassFileLoadHook(const EventClassFileLoadHook& e) {
|
||||
@@ -64,7 +64,11 @@ private:
|
||||
if (std::string_view(e.name).starts_with("cn/xiaozhou233/juiceremapper/"))
|
||||
return;
|
||||
|
||||
// TODO: Include/Exclude check
|
||||
// Include/Exclude filter check
|
||||
if (!remapper.shouldRemap(e.name)) {
|
||||
spdlog::trace("[JuiceRemapperService] Skipped by filter: {}", e.name);
|
||||
return;
|
||||
}
|
||||
|
||||
jclass remapClass = remapper.getRemapClass();
|
||||
jmethodID remapMethod = remapper.getRemapMethodId();
|
||||
|
||||
Reference in new issue
Block a user