hi guys

R

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?
 
T

Thomas Hawtin

ravi said:
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
 
R

Roedy Green

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?
 
I

Ingo R. Homann

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
 
O

Oliver Wong

ravi said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top