File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting names of child classes

 
D Preethi
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

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


Thanks,
Preethi
 
Paul Clapham
Sheriff
Pie
Posts: 20176
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 808
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic