Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

hi guys

Thread view: 
ravi - 08 Feb 2006 06:09 GMT
can any one tell me ,how to find out the interfaces that a class
implements?
dont say reflection i know that.
but with out reflection?
Thomas Hawtin - 08 Feb 2006 06:21 GMT
> can any one tell me ,how to find out the interfaces that a class
> implements?
> dont say reflection i know that.
> but with out reflection?

Reflection.

Getting the implemented interfaces from a Class is a reflection activity.

Class.getInterfaces(!) and Class.getGenericInterfaces are the methods
you don't want.

Without reflection. Well, I suppose you could use a debugging interface,
 looks at class files or indirectly use reflection (serialisation,
beans, etc).

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

Roedy Green - 08 Feb 2006 07:40 GMT
>can any one tell me ,how to find out the interfaces that a class
>implements?
>dont say reflection i know that.
>but with out reflection?

Are you asking someone who write you a little command line utility
that does the dirty deed for you so you won't feel so guilty?
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Ingo R. Homann - 08 Feb 2006 08:53 GMT
Hi ravi,

> can any one tell me ,how to find out the interfaces that a class
> implements?
> dont say reflection i know that.
> but with out reflection?

How do you read a book without opening it?

There may be solutions (perhaps x-ray, computertomography, ... which
Thomas, Roedy and paul mentioned) but (IMHO) the one and only practical
solution is just to open the book the way it is supposed to.

That means, concerning your problem: IMHO, there is no (practical)
possibility to solve your problem.

Why do you want to use no reflection? You seem to have a good reason
(which I do not understand).

Ciao,
Ingo
Oliver Wong - 08 Feb 2006 14:19 GMT
> can any one tell me ,how to find out the interfaces that a class
> implements?
> dont say reflection i know that.
> but with out reflection?

   Do you have to find out at runtime, or could you find out earlier? E.g.
could you perhaps read the JavaDocs to find out what interfaces the class
implements?

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.