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.
This whole process can be arranged so that it is transparent to a class being manipulated. This transparency can be utilized by several types of applications:
The focus of a project is to provide:
Jiapi realization can be viewed as a layered architecture where each layer is implemented on top the lower layer.
+--------------------------------+ | Applications | | | +--------------+ | | Jiapi events | | alt.jiapi.event +--------------+-------+ | | Jiapi framework | | alt.jiapi, alt.jiapi.instrumentor | | | +----------------------+---------+ | Jiapi reflection | alt.jiapi.reflect | | +--------------------------------+ | Jiapi file | alt.jiapi.file +--------------------------------+These layers are described in a user guide starting from bottom up.