Code instrumentation is the act of modifying the code of an existing application by inserting new code statements and modifying or deleting existing ones.
代码插装是一种通过修改或删除现有指令并插入新的指令来改变程序执行行为的技术。
参考来源 - Windows系统的动态代码插装技术研究及应用·2,447,543篇论文数据,部分数据来源于NoteExpress
源代码插装:最基本的技巧是在源代码阶段添加插装,这样编译和部署后的类就已经在运行时包含了插装。
Source code instrumentation: the most basic technique is to add instrumentation at the source code phase so that the compiled and deployed classes already contain the instrumentation at run time.
相反,插装应用程序代码本身会直接修改和影响核心代码的执行。
In contrast, instrumenting the application code itself directly modifies and affects the core code's execution.
类包装背后的理念是:目标类可以包装在一层插装代码中,后者具有与被包装的类相同的外部行为。
The idea behind class wrapping is that a target class can be wrapped in a layer of instrumenting code that retains the same external behavior as the class that's wrapped.
应用推荐