Home > Archive > Java Help > May 2004 > How to determine inheritance hierarchy of a class???
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to determine inheritance hierarchy of a class???
|
|
| D. Beckham 2004-05-23, 6:35 am |
| I am trying to write a method that take a Class object as param and then
determines all the classes in the Class object's inheritance hierarchy. Can
somebody give me a pointer to get started? Thanks
| |
|
|
| Roedy Green 2004-05-23, 12:32 pm |
| On Sun, 23 May 2004 09:35:50 GMT, "D. Beckham"
<lekhanh88@earthlink.net> wrote or quoted :
>I am trying to write a method that take a Class object as param and then
>determines all the classes in the Class object's inheritance hierarchy. Can
>somebody give me a pointer to get started? Thanks
see http://mindprod.com/jgloss/classforname.html
There are tools to get he parent of a class. You chase it on up till
you get to object.
Look at the methods of the Class object. This does not require
reflection.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
|
|
|
|
|