Getting Super Classes


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Getting Super Classes

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Posts
    17

    Exclamation Getting Super Classes

    Is there any way to get the super classes of an interface?

    See this;

    Code:
    public interface Account extends AbstractAccount, BaseAccount
    {
    
    }
    I want to know get the AbstractAccount and BaseAccount. I have loaded class with ;

    Code:
    Class _account = Class.forName("Account");
    From
    Code:
    _account
    , I want to know the super classes of that.

    Regards;
    Stephen

  2. #2
    Join Date
    Oct 2005
    Posts
    22
    hai,

    why don't you see the reflection techniques. Is the concept in java by which the executing thread knows all the properties of its own. You can download the thinking in java by bruceeckel from http://www.planetpdf.com/developer/a...ContentID=6632.

    and go through the tenth(10) chapter for reflection concepts.

  3. #3
    Join Date
    Oct 2005
    Posts
    17
    I have tried this;

    Code:
    _class.getSuperClass();
    But, it didn't work. I think 'coz of interface. Thanks for the link.

    Regards;
    Stephen

  4. #4
    Join Date
    Oct 2005
    Posts
    17
    I got solution;

    Code:
    Class [] _interfaces =  _class.getInterfaces();
    from Java Reflection in Action from Manning.


    Regards;
    Stephen

  5. #5
    Join Date
    Oct 2005
    Posts
    22
    Was my reply anyway helpful for you?

    Let me know about it.
    Thanks

Similar Threads

  1. Loading classes at runtime
    By Shayne in forum Java
    Replies: 3
    Last Post: 05-12-2007, 09:15 AM
  2. java classes in windows and linux
    By DaveMere in forum Java
    Replies: 2
    Last Post: 08-09-2005, 02:11 PM
  3. Hide Public Classes in UserControl
    By RobDog888 in forum .NET
    Replies: 1
    Last Post: 04-15-2005, 06:43 PM
  4. COM+ SOAP 2.0 and Abstract Classes
    By Constant in forum VB Classic
    Replies: 0
    Last Post: 07-05-2002, 04:37 PM
  5. Re: Usercontrols and at least PNC classes
    By Willy Van den Driessche in forum VB Classic
    Replies: 0
    Last Post: 09-12-2001, 11:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center