JavassistJava bytecode manipulation made simpleProject
Project Lead: Shigeru Chiba ContentsOverview
Javassist (Java programming assistant) is a load-time reflective system for Java. It is a class library for editing bytecodes in Java; it enables Java programs to define a new class at runtime and to modify a class file before the JVM loads it. Unlike other similar systems, Javassist provides source-level abstraction; programmers can modify a class file without detailed knowledge of the Java bytecode. They do not have to even write an inserted bytecode sequence; Javassist instead can compile a fragment of source text on line (for example, just a single statement). This ease of use is a unique feature of Javassit against other tools. Aspect Oriented Programming: Javassist can be a good tool for introducing new methods into a class and for inserting before/after/around advice at the both caller and callee sides. Reflection: One of applications of Javassist is runtime reflection; Javassist enables Java programs to use a metaobject that controls method calls on base-level objects. No specialized compiler or virtual machine are needed. Remote method invocation: Another application is remote method
invocation. Javassist enables applets to call a method on a remote object
running on the web server. Unlike the Java RMI, the programmer does not
need a stub compiler such as Articles...
Publications...
Related Work...We are developing other reflective systems for C++ and Java. OpenC++An extensible C++ preprocessor based on compile-time reflection.OpenJavaAn extensible Java preprocessor based on compile-time reflection.Acknowledgments...The development of Javassist is supported in part by Japan Science and Technology Corporation.[Last Updated: March 12, 2004] Shigeru Chiba chiba@acm.org Copyright (C) 1999-2004 by Shigeru Chiba. Java(TM) is a trademark of Sun Microsystems, Inc. |
|