aspose file tools*
The moose likes Beginning Java and the fly likes Visualizing container hierarchy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Visualizing container hierarchy" Watch "Visualizing container hierarchy" New topic
Author

Visualizing container hierarchy

John Eagle
Greenhorn

Joined: Apr 27, 2010
Posts: 1
Hi,

I am looking for a way to visualize (or at least store in some vector of sorts) the container hierarchy of a java app I have created. Ideally I would like the result to include all levels of containment, i.e. the entire tree of such relationships.

The problem is that the classes I am referring to are self-made and to not extend any standard Java classes. The problem is that my classes are entirely self-made and do not extend any standard Java classes. Such tools as Vector and Container classes (which are part of AWT) are not available to my own classes.

Is there a (semi-) automatic way to generate this hierarchy? One example may be found at http://www.devx.com/tips/Tip/13099 but it assumes that classes are based on AWT.

Many thanks!
Jonas Isberg
Ranch Hand

Joined: Mar 18, 2003
Posts: 118
If I had your trouble I would consider using reflection. There is a tutorial that could get you started.
Janeice DelVecchio
Saloon Keeper

Joined: Sep 14, 2009
Posts: 1660
    
  11

And welcome to JavaRanch!!


When you do things right, people won't be sure you've done anything at all.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Visualizing container hierarchy