File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes get inherited or parent class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "get inherited or parent class " Watch "get inherited or parent class " New topic
Author

get inherited or parent class

Kowshik Nandagudi
Ranch Hand

Joined: Dec 09, 2010
Posts: 57
Can I get the names of inherited Class, and Interfaces using java reflection ??

For example :

class ArrayList inherits AbstractList implements List<E>, RandomAccess, Cloneable, Serializable
I want the names of
AbstractList

RandomAccess,Cloneablem Serializable
Thanks in Advance
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20048
    
  30

Check out java.lang.Class and its methods.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: get inherited or parent class
 
It's not a secret anymore!