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 / July 2006

Tip: Looking for answers? Try searching our database.

information decompiled by the IDE from a .class file

Thread view: 
fabrulous@yahoo.fr - 03 Jul 2006 23:21 GMT
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
Chris Smith - 04 Jul 2006 02:02 GMT
> When I (try) to go to the declaration of a class (eg in Intellij by
> doing Go to -> Declaration), I obtain the following:
[quoted text clipped - 12 lines]
> 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?

Signature

Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation

fabrulous@yahoo.fr - 04 Jul 2006 02:31 GMT
Hi Chris,

thanks for your answer.

...
> 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.

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

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 ;)


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



©2009 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.