aspose file tools*
The moose likes Java in General and the fly likes getting names of child classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "getting names of child classes" Watch "getting names of child classes" New topic
Author

getting names of child classes

D Preethi
Ranch Hand

Joined: May 24, 2008
Posts: 68
Hi All,

Given just the parent class name, is there a way to get the list of child classes?


Thanks,
Preethi
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18986
    
    8

No.
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Not in the general case, no. In some limited contexts you could, but unless you're writing an IDE or profiler or something, it's not likely you actually need to do so.

If you can explain what you're trying to accomplish, why you want the child classes, somebody may be able to suggest a better approach to solving your problem.
dennis deems
Ranch Hand

Joined: Mar 12, 2011
Posts: 808
In Eclipse Package Explorer, select the Java file and press F4 or right-click and select Open Type Hierarchy.

If you have the source open in the editor you can also highlight the class name and press F4.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting names of child classes