【文件属性】:
文件名称:DynamicNativeAgent:在没有工具或自定义类加载器的情况下重新定义Java类
文件大小:36KB
文件格式:ZIP
更新时间:2021-04-01 16:18:54
C
DynamicNativeAgent
DynamicNativeAgent可以使用本机库重新定义Java类(无需类加载器或Instrumentation)
用法
AgentFactory . loadNative(); // Load the native in the JVM
NativeAgent agent = AgentFactory . createNativeAgent(); // Create new dynamic agent
// Redefine some classes
agent . redefineClasses(
new ClassDef ( TestClass . class, bytesOfClass),
new ClassDef ( RandomClass . class, bytesOfClass)
);
去做
重新定义后清理旧类
【文件预览】:
DynamicNativeAgent-master
----README.MD(484B)
----natives()
--------agentlib()
----resources()
--------libAgent.so(17KB)
----LICENSE(1KB)
----src()
--------me()
----.gitignore(96B)