Jexa: Java Examiner

prerelease version of 1999.10.11
Copyright (c) 1997, 1998, 1999 Massachusetts Institute of Technology.
This software is provided "as is" without express or implied warranty.

Jexa

Jexa, a Java examiner, provides expandable/collapsible outlines for browsing through object nets. Navigate indented outlines of objects by expanding the outline to see their properties.

Jexa extends Outliner with specific renderers for:

For example, when an AWT Frame object is rendered with ContainerRenderer, its outline children are its parent and components in the AWT component containment hierarchy. Frame renderered with ContainerRenderer
An object may have several alternate renderers. For example, an AWT Frame may be renderered by ContainerRenderer, BeanRenderer, and ObjectRenderer. The pop-up menu in the image shows the current renderer is ContainerRenderer; the renderer sub-menu shows that in addition to the three renderers just mentioned, a custom renderer called ContainerChildRenderer can render a Frame. Renderer Menu for the frame: ContChild, Container, Bean, Object
BeanRenderer displays the JavaBean properties of the object as returned by java.beans.Introspector. These are determined by the BeanInfo for the object, or by reflecting to find its public get---() is---(), and get---(int) methods. Frame renderered as JavaBean
ObjectRenderer uses reflection to display the fields of the object. This is often not as informative as BeanRenderer, especially when the object is a wrapper, e.g., a remote object stub or a synchronizing wrapper. When running under a security manager as in an applet, ReflectionPermission is rejected so non-public fields cannot be displayed. Frame renderer as Object
Try exploring this example on the Jexa applet page. Jexa is particularly useful when complemented by a Java source code evaluator such as JevaES, so you can explore by invoking methods as well as by following properties. Try JevaES and Jexa together in a JevaESGUI/Jexa applet.

See Jexa javadoc for more details and examples of custom extensions.

Download a jar from the Jars page.

Jexa Release Notes

+ 1999-10-11: reorganized ObjectRenderer and ClassRenderer to fix handling of public fields of non-public (possibly nested) classes (applies only when reflect permission is available, e.g., not in applet security sandbox).

1999-06-09: JFC/Swing: Jexa has been reimplemented around the new Outliner architecture, which builds on JFC/Swing JTree; see Outliner for details. One improvement is there may now be more than one renderer per class or interface in an OutlineMaker renderer table. Renderers: added a TreeNodeRenderer for debugging JTrees and Outlines. Improved BeanRenderer's handling of indexed properties, and properties of non-public classes. Popup menu: Added popup menu command to highlight multiple appearances of the moused object. Added debugging option to examine the current outline node itself (Jexa.dbgLev). Localization: Jexa may be localized; for international use, menu strings are properties that may be overridden according to language of default locale. (AWT Version: For users who have built outline generators based on the old architecture, the old AWT Jexa has been updated to use the monospaced font, and moved to edu.mit.ai.psg.jexa.awt. The AWT version will be phased out in the future.)

1999-02-28 version: Jexa renderers for new Collection, List, Map utilities; BeanRenderer restricted to true Java bean properties; ObjectRenderer can be used to show non-public fields.

Known problem: Under Sun's Java1.2 or Java1.2.1, re-rendering a Class with BeanRenderer encounters a fatal bug in the native libraries for Class, halting the Java virtual machine. It works correctly in Java1.2.2rc1 (release candidate 1 is an early access release available through Java Developer Connection). Workaround: If you can't use Java1.2.2rc1 or later, don't re-render classes with BeanRenderer. (ClassRenderer is the default renderer for classes, and it doesn't run into this problem.)

This page describes research done at the Artificial Intelligence Laboratory of the Massachusetts Institute of Technology. Support for this research was provided in part by the Advanced Research Projects Agency of the Department of Defense under contracts MDA972-95-1-0018 (North East Regional Consortium Grant) and N66001-95-C-8611 (Computer Aided Education and Training Initiative), and the MIT Department of Electrical Engineering and Computer Science. Support for this research has also been received from IBM, which has generously donated Thinkpad pen computers, and from Microsoft, which has generously donated software.