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