Java Class Explorer

HEIGHT=480 WIDTH=550 ALIGN=BOTTOM>

Source code: JavaExplorer.java MyCanvas.java Folder.java ImageScroller.java

To reset the applet, open the 'Object' folder by double clicking on it, then press the 'change class' button

How to use Java Explorer:

Open a 'class folder' by double clicking on it to reveal all the classes that extend it. The  right window gives a brief description of the class plus shows its variables, constructors, and methods. For more information on the class, hit the 'more info' button to link to Sun's JavaSoft web site. To explore an individual class or interface, type its name in the text field and hit the 'change class' button. 

Here's how I created the index file for the left window and the description file for the right window:

Step1. I downloaded and installed the JDK 1.1 on my computer. You'll find it here:  http://www.javasoft.com/products/jdk/1.1/index.html

Step2. Once installed on my system, I copied all the source files under the jdk1.1/src/java sub-directories into one single directory. Now all the Java source code for the java package is in a directory called javaClass.

Step3. I created a Java program that would read in each source code file in the javaClass directory and create the index for the left window. Here's the source code: javaIndex.java . The program will first create a vector, each vector element holds the string name of a Java source program. Then the program scans each program, one by one, looking for the keyword 'extends' or 'implements'. If the keyword is found, the program is a child class of another, so the parent class is located in the vector and the name of the child class is concatenated to it. Here's an example of an abbreviated index file: javaIndex2.txt .

Step4. I created Java program that would read through all the Java source code and strip out the class description: javaDesc.java The program scans each program for the string /**. This string indicates the start of the description, which is then stripped out and concatenated to the string name of the program, and written out to a file called javaDesc2.txt .

Step5. I then wanted to include the public methods and variables with the description. Instead of scanning through the source, I downloaded the JDK API documentation from here:  http://www.javasoft.com/products/jdk/1.1/docs/ . I then wrote a program that would scan through the HTML files that made up the documentation and pull out the constructors, methods, and variable names for each class: javaHtml.java . Here's an example of what that file looks like:  javaHtml2.txt .

Step6. The next step was to concatentate or merge together the two files javaDesc2 with javaHtml2.txt, so I wrote another programjavaMerge.java . The output of this program is what appears on the right side of Java Explorer: newJavaDesc2.txt
 

 

Java Explorer is featured at the following sites:
   Java Applets UK

Number of hits:  


Email me at: l_schiano@
hotmail.com

 

1