Javassist

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Javassist
Developer(s) Shigeru Chiba
Stable release 3.15.0.GA / July 8, 2011; 7 months ago (2011-07-08)
Written in Java
Operating system Cross-platform
Type bytecode Engineering Library
License dual license of the MPL and LGPL.
Website http://www.csg.is.titech.ac.jp/~chiba/javassist/

Javassist (Java programming assistant) is a Java library providing a means to manipulate the Java bytecode of an application.[1] In this sense Javassist provides the support for structural reflection, i.e. the ability to change the implementation of a class at run time.

Bytecode manipulation is performed at load-time through a provided class loader.

Contents

[edit] Uses

Javassist can be used for the following:

  • For specifying the bytecode using source code – can compile a fragment of source text online (e.g., just a single statement)
  • For Aspect Oriented Programming (AOP) – can introduce new methods into a class and insert before/after/around advice at both the caller and callee sides
  • For reflection at runtime – can use a metaobject that controls method calls on base-level objects
  • For remote method invocation – can call a method on a remote object running on a web server, an alternative to Java RMI that does not need a stub compiler such as rmic

[edit] References

[edit] See also

[edit] External links


Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox
Print/export