information decompiled by the IDE from a .class file

F

fabrulous

Hi all,

I've got a question regarding what information a .class file contains
and how the IDE (IntelliJ IDEA in my case) can extract information from
a .class file.

When I (try) to go to the declaration of a class (eg in Intellij by
doing Go to -> Declaration), I obtain the following:

// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available

package zzz;

public abstract class ZzSample extends javax.microedition.lcdui.Canvas
implements java.lang.Runnable {
..
..
..

Is it possible that this ZzSample implements other interfaces (ie
besides Runnable) that do not appear here?

Or does the specs for .class file format make it mandatory that it's at
least possible to see which interfaces are implemented? (or in the
case of obfuscation to see at least how many interfaces have been
implemented?)

Thanks in advance for any infos on this, I'm scratching my head with
some proprietary API where it seems that the javadocs don't match the
code we have,

fab
 
C

Chris Smith

When I (try) to go to the declaration of a class (eg in Intellij by
doing Go to -> Declaration), I obtain the following:

// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available

package zzz;

public abstract class ZzSample extends javax.microedition.lcdui.Canvas
implements java.lang.Runnable {
.
.
.

Is it possible that this ZzSample implements other interfaces (ie
besides Runnable) that do not appear here?

No. If the class implemented additional interfaces, they would appear
on the list there.
Or does the specs for .class file format make it mandatory that it's at
least possible to see which interfaces are implemented? (or in the
case of obfuscation to see at least how many interfaces have been
implemented?)

Even obfuscation doesn't prevent you from seeing what interfaces have
been implemented. That information is always there. Obfuscated code is
not different from any other code, really, except that the variables and
such have been named oddly and the control flow structures are tweaked
to be less clear. Otherwise, it's regular old code. Of course, if the
code is obfuscated, then interfaces might be called something like A,
AA, and Aa... but the names will still be visible.
Thanks in advance for any infos on this, I'm scratching my head with
some proprietary API where it seems that the javadocs don't match the
code we have,

That's not your answer. Sorry. Perhaps a version discrepancy?
 
F

fabrulous

Hi Chris,

thanks for your answer.


Chris Smith wrote:
....
Of course, if the
code is obfuscated, then interfaces might be called something like A,
AA, and Aa... but the names will still be visible.

OK, this is more or less what I expected. And at least you get to see
if interfaces have been implemented or not.

That's not your answer. Sorry. Perhaps a version discrepancy?

It's tricky. Actually the API references interfaces that have been
somehow "included" in a single class in the final API we're using (this
is J2ME stuff where every single bit can count). So I had a class file
(basically a huge class) and (not really)javadocs corresponding to
something else (to the source code before getting transformed in that
single huge class by some special tool).

I've contacted the person responsible for this and he'll fix the
problem.

Thanks again,

fab


P.S: this J2ME (sorry, "JME") land is wild ;)
 

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
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top