Method, device and system for weaving byte code

The invention discloses a method, a device and a system for weaving a byte code. The method comprises the following steps of: monitoring a program deployment event so as to acquire a byte code weaving command and a byte code file of an event source; weaving a subclass byte code file of the event sou...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: LIU MIN, JING XINHAI, LUO JIA
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention discloses a method, a device and a system for weaving a byte code. The method comprises the following steps of: monitoring a program deployment event so as to acquire a byte code weaving command and a byte code file of an event source; weaving a subclass byte code file of the event source according to the byte code weaving command; buffering the subclass byte code file and establishing the corresponding relation between the subclass byte code file and the byte code file of the event source; and when a program is started or activated, loading the woven subclass byte code file by using a customized class loader according to the corresponding relation so as to realize a program function needing to be woven. The embodiment of the invention provides the method, the device and the system for weaving the byte code. On the premise of not changing the line number of a source code, the subclass byte code file is woven into the byte code of a source file; when the program runs, a customized class loading c