When a Java virtual machine encounters a request for a class which hasn't been loaded to its memory, it consults a class loader to locate and load the class. Typically, the classes are loaded from a filesystem or URL as a bytecode array and then converted into an instance of class
java.lang.Class within the virtual machine. Jiapi is a tool which can be used to alter this normal class loading behavior. Instead of letting the class to be loaded as it is, Jiapi is used to manipulate classes' bytecode. The manipulated class is then passed to a class loader which loads it into a Java virtual machine. In addition to just described
just-in-time bytecode weaving, Jiapi can be used to instrument a class
ahead-of-time. In this mode compiled classes are preprocessed by Jiapi instrumentors and modified classes are then serialized on a filesystem to be executed later.
其他Java Java机器码工具 开源项目资源: