发明名称 DYNAMIC BYTECODE MODIFICATION OF CLASSES AND CLASS HIERARCHIES
摘要 Various systems and methods for dynamic bytecode modification of classes and class hierarchies are described herein. In various embodiments, a Java® agent is received at a launch of a Java® Virtual Machine (JVM®), the agent implementing a premain method, the premain method accepting a reference to an instrumentation instance. The instrumentation reference is then stored, a deployment container is initialized, and, within the deployment container, an instance of an application is created. The instrumentation reference is then provided to the application instance. A class transformer is then retrieved from a persistence provider, and the class transformer is wrapped by an O.R. Persistence Container Class Transformer, which is then registered with the instrumentation instance. A class to be transformed is passed to the class transformer, which dynamically modifies the bytecode of the class before the class is loaded by the JVM®.
申请公布号 US2014344792(A1) 申请公布日期 2014.11.20
申请号 US201314137858 申请日期 2013.12.20
申请人 Matov Peter K.;Ivanova Alexandrina 发明人 Matov Peter K.;Ivanova Alexandrina
分类号 G06F9/455 主分类号 G06F9/455
代理机构 代理人
主权项 1. A method comprising: receiving an agent at a launch of a Java® Virtual Machine (JVM®), the agent implementing a premain method, the premain method accepting a reference to an instrumentation instance; storing the instrumentation reference; initializing a deployment container; creating an instance of an application within the deployment container; providing the instrumentation reference to the application instance; retrieving a class transformer from a persistence provider; registering the class transformer with the instrumentation instance; passing bytecode of a class to be transformed to the class transformer; dynamically modifying, using the class transformer, the bytecode of the class before the class is loaded by the JVM®, wherein the modified class, after being loaded by the JVM®, is arranged to execute according to its modified bytecode.
地址 Sofia BG