[Bluej-discuss] Fwd: Handel of the object on the object bench

Ian Utting I.A.Utting at kent.ac.uk
Wed Oct 24 09:18:12 BST 2007


Henrique -

> Yes, I need to access the handle of the object. What is within the 
> object bench. I want to run lines of code by a extension.

Objects on the object bench are represented to extensions as instances 
of the bluej.extensions.BObject class. You can examine a BObject's 
fields, and invoke its constructors and other methods, using various 
operations on BObject and the other classes in the extensions API. The 
general idea is that the extensions API allows you to do, from Java 
code, pretty much anything that you can do through the BlueJ GUI.

You can find out what objects are on the bench for a particular package 
using the method bluej.extensions.Package.getCurrentObjects(), and 
create your own new classes (which will be visible in BlueJ's class 
diagram) using bluej.extensions.BPackage.newClass()

The extensions API documentation is at bluej.org/doc/extensionsAPI/

Ian.


More information about the bluej-discuss mailing list