Re: Re: Re: Re: Re: getting all the interfaces for a class

Maciej Lopacinski <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
On 10/15/2010 01:51 PM, Rajaraman Santhanam wrote:
> In plain java terms, I'm looking something similar to instanceof at the
> byte code level.
> 
From ASM guide:
> • A section describing the modifiers (such as public or private), the
> name, the super class, the interfaces and the annotations of the class.
and from VM spec:
http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html
> ClassFile {
>     	u4 magic;
>     	u2 minor_version;
>     	u2 major_version;
>     	u2 constant_pool_count;
>     	cp_info constant_pool[constant_pool_count-1];
>     	u2 access_flags;
>     	u2 this_class;
>     	u2 super_class;
>     	u2 interfaces_count;
>     	u2 interfaces[interfaces_count];
So I think this information is simply not there. For class C you need to

check super class up to java.lang.Object or until you will not find

interface which you are looking for.
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.