Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting names of child classes

 
D Preethi
Ranch Hand
Posts: 68
  • 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
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic