Refactor: rebuild libagent with simplified lifecycle

- Replace eventbus/services with Agent preload/init lifecycle
- Move JNI header to shared includes; add jni_common.hpp umbrella header
- Reduce ClassFileLoadHook to a stub for later implementation
- Add eventpp dependency
- Document custom API JAR workflow (WIP)
This commit is contained in:
xiaozhou233 committed 2026-08-16 21:14:44 +08:00
1 parent 3b180e7199
commit 51bcfbd549
47 files changed
+5583 -1462

No files matched your search

+5 -5
View File
@@ -1,5 +1,4 @@
#include <jni_impl.hpp>
#include <JuiceAgent.hpp>
#include <jni_common.hpp>
// This function is called by Java to initialize the agent.
JNIEXPORT jboolean JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_init
@@ -37,8 +36,9 @@ JNIEXPORT jboolean JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_init
}
// Invoke EntryPoint
JuiceAgent::Agent& agent = JuiceAgent::Agent::instance();
agent.init(jvm, env, jvmti, runtime_dir);
JuiceAgent::Agent& agent = JuiceAgent::Agent::getInstance();
agent.preload(jvm, env, jvmti, runtime_dir);
agent.init();
return JNI_TRUE;
return JNI_TRUE;
}