Java catalog

Java Catalog is a plug-out directly written in C++.

Java catalog is a very practical tool allowing you to import classes into BOUML. An imported class comes in BOUML without the body of its operations and without its private members : the goal is to import Java library classes in the model, not to generate them. Java catalog may also be used to browser through the Java packages, search information about a given class etc ... without sending them to BOUML.

To work, Java catalog need Java sources, this must not be a problem, these ones are generally available even for your preferred JDK version.

The Java catalog plug-out may be applied only on a package, it is used through a window :

The upper part is a browser like in BOUML except that only the package and classes are showed. The lower part (reduced when Java catalog starts) shows the description of the selected class interpreting the html forms. The top level package in the browser part (here p) is the name of the package in BOUML in which Java catalog is applied.

To make a catalog, use the scan entry of the file menu or the button representing a microscope, Java catalog will ask for a directory and scan all the Java files in this one and its sub-directories. For instance if src contains all the Java sources :

Obviously it is possible to do several scan phase in different directories to complete the catalog. At this level nothing is done on the BOUML side.

The reverse/roundtrip setting dialog of the modeler allows to specify through regular expression the files and / or directories whose must not be taken into account during a reverse and roundtrip, for instance to bypass test programs.

To save your catalog use the save entry of the file menu or the associated button.

Open allows to get an already made catalog, may be to complete it.

The main goal of Java catalog is to send a class or all the classes under a package and its sub-packages to BOUML, using the menu appearing with a right mouse button click on a class or a package into the Java catalog browser :

In case the sent class(es) reference other classes (for instance to inherits them), these classes are also sent with the classes they reference etc ...

For instance, in case the BOUML project p is empty and the class sunw.io.Serializable is sent, the result will be :

As you can see, contrarily to the result of a standard Java reverse, the two classes do not have associated artifact, because the goal is just to allow to have a class generalizing Serializable, or having an attribute of this type etc ...

Thanks to Java catalog, you do not have to define the JDK and other classes by hand in BOUML to use them !

Note : the saving of a catalog is just a list of classes and the pathname of the file defining them, not the classes definitions. When you send a class to BOUML, Java catalog reverse the associated file to get the class definition, this implies that you must not delete or move the Java source files defining the classes of the catalog.

Previous : Java roundtrip

Next : Php generator