JikesBT : Java Glossary

go to home page J words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
index page for letter ⇒ punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
JikesBT
Jikes Bytecode Toolkit is a 100% Java class library which enables Java programs to create, read, and write binary Java class files, and to query and update a single high-level representation of the collection of them, including relationships among them. This allows developing tools which report on what APIs the classes use, reorder and change instructions, merge or extend classes, add customized instrumentation (similar to profilers), analyze control and data flow, etc. JikesBT’s main distinction is ease of use due to the removal of the details of the class file format from users concern. For example, each class file has a constant pool, and any reference to another class, a method, a field, or a constant value has to go through this constantpool. Such detail is hidden in JikesBT. Whenever a reference is made to another class, field, or method, an object is created to represent it, and a direct reference to it is provided.

For instance, classes contain methods, methods contain code, and code contains bytecode instructions. One such instruction is the new instruction which creates an object. In the standard class file representation the bytecode is followed by two other bytes, which together form an index into the constantpool, where a string can be found with the name of the class. To attach a certain property to this target class (like a creation site), one first needs to find the class through some kind of repository. This process is complicated, repetitive, and error-prone.

In JikesBT, classes still have methods, methods still have code, and code still has instructions. But these instructions are represented by objects, and the object representing the new instruction does not have a number to index into the constantpool anymore. Instead, a direct Java reference to the target class is provided. Adding properties to the class is a simple matter of following the link. As a matter of fact, a class’s constantpool is optionally removed after the class is loaded, and the constant pool is transparently regenerated when the class is saved. Users will never even see the constantpool unless they want to.

Summarizing, JikesBT provides a logical representation of the class file, whereas most bytecode representation packages give a more direct, more detailed, and more low-level, physical representation.

JikesBT’s model is quite rich, and provides a number of relationships, such as an easy way to find each instruction where a given class is allocated, where a given method is invoked, and where a given field is accessed. It records which methods override which others, which will be inherited from other classes, and even which method implements a method declared in a given interface even if via inheritance. There’s an "extraInformation" reference field in the major objects which is available for use by the user, and even a way to subclass some of JikesBT’s classes with user-written classes to provide additional or altered functionality.

When a class is being written, JikesBT chooses the proper opcode depending on the size of an in-line constant or the placement of a item in the constant pool. JikesBT can even do peep-hole optimization.

Also included with JikesBT are examples such as javaSpy which is an easily extended tool which adds instrumentation to an application which allows the application’s execution to be observed.


CMP homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.61] Take the DavidSuzuki.org nature challenge
You are visitor number 6,084.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/jikesbt.html J:\mindprod\jgloss\jikesbt.html