lots of changes, see ChangeLog

Set version to jode-1.1.


git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1315 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 24 years ago
parent 23adc4ce78
commit 0246d1e5c3
  1. 122
      jode/ChangeLog
  2. 17
      jode/INSTALL
  3. 4
      jode/Makefile.am
  4. 5
      jode/NEWS
  5. 97
      jode/README
  6. 4
      jode/TODO
  7. 26
      jode/configure.in
  8. 1
      jode/doc/.cvsignore
  9. 45
      jode/doc/Makefile.am
  10. 106
      jode/doc/applet.html
  11. 6
      jode/doc/applet.php
  12. 96
      jode/doc/bluesky.html
  13. 131
      jode/doc/download.html
  14. 34
      jode/doc/download.php
  15. 11
      jode/doc/footer.inc
  16. 55
      jode/doc/header.inc
  17. 98
      jode/doc/history.html
  18. 2
      jode/doc/history.php
  19. 139
      jode/doc/index.html
  20. 44
      jode/doc/index.php
  21. 105
      jode/doc/license.html
  22. 9
      jode/doc/license.php
  23. 106
      jode/doc/links.html
  24. 10
      jode/doc/links.php
  25. 132
      jode/doc/menu.inc
  26. 158
      jode/doc/usage.html
  27. 56
      jode/doc/usage.php
  28. 3
      jode/jode/bytecode/ClassInfo.java.in
  29. 3
      jode/jode/bytecode/MethodInfo.java
  30. 162
      jode/jode/decompiler/ClassAnalyzer.java.in
  31. 4
      jode/jode/decompiler/FieldAnalyzer.java.in
  32. 3
      jode/jode/decompiler/LocalInfo.java
  33. 29
      jode/jode/decompiler/Main.java
  34. 41
      jode/jode/decompiler/MethodAnalyzer.java.in
  35. 20
      jode/jode/decompiler/OuterValues.java
  36. 13
      jode/jode/decompiler/TabbedPrintWriter.java
  37. 25
      jode/jode/expr/ArrayStoreOperator.java
  38. 2
      jode/jode/expr/ConstOperator.java
  39. 9
      jode/jode/expr/ConstantArrayOperator.java
  40. 2
      jode/jode/expr/Expression.java.in
  41. 76
      jode/jode/expr/FieldOperator.java.in
  42. 148
      jode/jode/expr/InvokeOperator.java.in
  43. 6
      jode/jode/flow/CaseBlock.java
  44. 2
      jode/jode/flow/InstructionBlock.java.in
  45. 8
      jode/jode/flow/JsrBlock.java
  46. 3
      jode/jode/flow/LoopBlock.java.in
  47. 1
      jode/jode/flow/Makefile.am
  48. 6
      jode/jode/flow/SpecialBlock.java
  49. 30
      jode/jode/flow/TransformConstructors.java
  50. 53
      jode/jode/flow/TransformExceptionHandlers.java.in
  51. 118
      jode/jode/jvm/SyntheticAnalyzer.java.in
  52. 32
      jode/jode/swingui/Main.java.in
  53. 40
      jode/jode/type/ArrayType.java
  54. 65
      jode/jode/type/ClassInterfacesType.java
  55. 13
      jode/jode/type/RangeType.java

@ -1,3 +1,104 @@
2001-05-27 Jochen Hoenicke <jochen@gnu.org>
* configure.in: Set version to 1.1.
* jode/decompiler/Main.java (main): Also use bootclasspath if no
classpath given.
* jode/swingui/Main.java (main): Likewise.
* jode/decompiler/MethodAnalyzer.java.in (skipWriting): Don't skip
empty constructor that have a throws clause.
* configure.in: Determine whether jdk1.1 resp. jdk1.2. Call jcpp
in config.status.
* jode/expr/Expression.java.in (makeInitializer): Now takes the
type of the initialization. Changed all callers.
* jode/expr/ConstantArrayOperator.java (makeInitializer): Check
that type is our array type, otherwise we can't omit new Array[].
* jode/decompiler/LocalInfo.java (markFinal): Don't check that
only one write is present. If two writes are in an then and an
else branch of an if, the local can still be final.
* jode/type/ArrayType.java (getSubType): Handle array of integer
types correctly: byte[] is something completely different than
int[].
(getSuperType): Likewise.
* jode/expr/FieldOperator.java.in (getFieldInfo): New function.
(needsCast): A cast is also needed if the field is private or
package scope and the current type can't access the field.
* jode/expr/InvokeOperator.java.in (getMethodInfo): New function.
(needsCast): A cast is also needed if the method is private or
package scope and the current type can't access the method.
* jode/expr/ArrayStoreOperator.java (dumpExpression): Check if a
cast of the array expression is needed.
* jode/expr/TransformConstructors.java
(transformFieldInitializers): Don't allow moving method invocations
that throw a checked exception.
* jode/bytecode/MethodInfo.java (readAttribute): Read Exceptions
attribute even when not all attributes should be read. They are
needed by TransformConstructors, see above.
2001-05-26 Jochen Hoenicke <jochen@gnu.org>
* jode/decompiler/TabbedPrintWriter.java (saveOps): Don't allow
line breaks in not completed expressions since implicit parentheses
would destroy the syntax. No need to put line break option on stack.
(restoreOps): Adapted Stack format.
* jode/decompiler/ClassAnalyzer.java.in (dumpDeclaration): Moved
Code from dumpSource here. Don't put a line break after closing
brace.
(dumpSource): call dumpDeclaration and add a line break.
(dumpBlock): Moved dropInfo(ATTRIBS) here.
* jode/decompiler/ClassAnalyzer.java.in (STRICTFP): New Constant.
(isStrictFP): New function.
(initialize): Set strictfp modifier if a constructor has it set.
(dumpSource): Handle strictfp modifier.
* jode/decompiler/MethodAnalyzer.java.in (STRICTFP): New Constant.
(isStrictFP): New function.
(dumpSource): Handle strictfp modifier.
* jode/jvm/SyntheticAnalyzer.java.in (checkAccess): Check for a
special putfield access, where the set value is returned. Allow
the modifier of field/method to be protected and the class to be
a superclass.
(checkStaticAccess): Likewise.
(ACCESSDUPPUTFIELD): New Constant.
(ACCESSDUPPUTSTATIC): New Constant.
* jode/expr/InvokeOperator.java.in (simplifyAccess): Handle new
synthetics.
* jode/flow/SpecialBlock.java (removePop): Remove pop also for
non void store instructions.
* jode/decompiler/MethodAnalyzer.java.in (skipWriting): Also skip
the new synthetics.
* jode/decompiler/Main.java (main): Call System.exit() after
everything was compiled.
* jode/flow/TransformExceptionHandlers.java.in (removeJSR):
Renamed back from removeBadJSR (see patch from 2001-02-04). The
checkAndRemove* functions mustn't change the successors while they
iterate over them. Instead of removing good jsr they mark them as
good and removeJSR will finally remove them.
(checkAndRemoveJSR): See above.
(checkAndRemoveMonitorExit): See above.
* jode/flow/JsrBlock.java (good): New variable, see above.
(setGood): New method.
(isGood): New method.
2001-05-08 Jochen Hoenicke <jochen@gnu.org>
* jode/jvm/CodeVerifier.java.in (doVerify): Don't check for
@ -10,6 +111,27 @@
* jode/obfuscator/modules/ConstantAnalyzer.java.in (handleOpcode):
Added divide by zero checks for opc_irem and opc_lrem.
2001-04-11 Jochen Hoenicke <jochen@gnu.org>
* jode/type/ClassInterfacesType.java (keywords): Reworked keyword
list.
* jode/decompiler/OuterValues.java (implicitOuterClass): New field.
(isImplicitOuterClass): new Method.
(setImplicitOuterClass): new Method.
* jode/flow/TransformConstructors.java (checkAnonymousConstructor):
Check for implicitOuterClass, a new javac 1.3 construct.
* jode/expr/FieldOperator.java.in (dumpSource): Removed this
simplification nonesense. Now Outer.this is never printed as
this.
* jode/expr/InvokeOperator.java.in (dumpSource): Removed this
simplification nonesense. Now Outer.this is never printed as
this.
Handle implicitOuterClass.
2001-04-10 Jochen Hoenicke <jochen@gnu.org>
* jode/decompiler/Main.java (usage): Reworked usage message.

@ -1,12 +1,15 @@
Before installing, make sure you have a java compiler (e.g javac or
jikes) and the java 1.1 runtime class library installed. If you want
to run this program you need at least a 1.1 compatible java virtual
machine. There are some bugs in javac included in the SUN JDK 1.1, it
won't work.
Before installing, make sure you have at least version 1.1 of the java
developement kit installed. If you want to run this program you only
need the java runtime environment. Version 1.1 is quite old, I
recommend using Java 2 (jdk1.2 or above).
This package was designed to use the GNU standard for configuration
and makefiles. To build and install do the following:
0). If you have downloaded the code from the CVS repository create
configure and Makefile.in with autoconf-2.13 and automake-1.4. Type
"aclocal; automake -a; autoconf".
1). You need a java development kit (at least version 1.1), some unix
tools and some java packages. Make sure that you have all java
packages that are needed in your classpath. This are gnu.getopt, and
@ -40,7 +43,3 @@ give a path to the directory where it resides, otherwise it is
searched in the path.
3). Type "make" to build the package.
4). Type "make install" to install the package. This doesn't work yet.
Jochen

@ -1,5 +1,5 @@
## Input file for automake to generate the Makefile.in used by configure
SUBDIRS = jode bin doc test
SUBDIRS = bin doc jode test
EXTRA_DIST = TODO
EXTRA_DIST = jcpp

@ -1,6 +1,7 @@
New in 1.0.94
New in 1.1
* break long lines
* small bug fixes
* handle most of javac v8 constructs (jdk 1.3)
* bug fixes
New in 1.0.93
* anonymous and inner class decompilation reworked.

@ -1,12 +1,17 @@
JODE (Java Optimize and Decompile Environment)
This is a decompiler and optimizer for java I have written in my spare
time. The decompiler takes class files as input and produces
something similar to the original java file. Of course this can't be
perfect: There is no way to produce the comments or the names of local
variables (except when the java files were compiled with `-g') and
there are often more ways to write the same thing. But jode does its
job quite well.
JODE is a java package containing a decompiler and an optimizer for
java. This package is freely available under the GNU General Public
License.
The decompiler reads in class files and produces something similar to
the original java file. Of course this can't be perfect: There is no
way to produce the comments or the names of local variables (except
when the java files were compiled with `-g') and there are often more
ways to write the same thing. However, jode does its job quite well.
The optimizer transforms class files in various ways with
can be controlled by a script file.
Please note that most software licenses forbid to decompile class
files. Use this decompiler only, if you have legal rights to
@ -25,6 +30,15 @@ The features of the decompilers are:
Known bugs of the decompiler:
- Some jdk1.3 synthetic access functions aren't understood. The
produced source contains access$xxx functions, but it still compiles.
- There may be other bugs, that cause Exceptions or invalid code.
If you have such a problems don't hesitate to issue a bug report.
Please include the <code>class</code> file if possible.
Limitations:
- If not all dependent classes can be found, the verifier (which is
run before decompilation starts) may exit with a type error. You
can decompile it with --verify=off, but take the warning serious,
@ -40,18 +54,6 @@ Known bugs of the decompiler:
happen when you compile with `-O' flag and javac has inlined some
methods.
- Sometimes this program may exit with an Exception or produce
incorrect code. If it produced incorrect code the code probably
can't be compiled, so that the error can be easily spotted. If you
have one of these problems (they are very rare now), I would be
very interested in a bug report (including the .class file, if
possible).
- Sometimes it generates some GOTO expression and labels. This
shouldn't happen any more with code produced by javac or jikes.
But some flow obfuscator likes Zelix Klassmaster may provoke this.
In that case you can run the Obfuscator first (to optimize away the
flow obfuscation ;-).
The features of the obfuscator are:
* Modular design, you can plug the obfuscation transformation you need
@ -66,62 +68,23 @@ The features of the obfuscator are:
PRELIMINARIES:
You need java jdk1.2 or above, and the gnu getopt package.
You should also have the jode-x.x.xx.jar file. Read INSTALL how to
compile it yourself.
Jode also works with jdk1.1, but you need the sun collection classes
and swing in that case.
Here are some URLs for the tools and packages you may need:
CYGWIN (unix tools for win95/NT):
http://sourceware.cygnus.com/cygwin/
JDK 1.1:
http://java.sun.com/products/jdk/1.1/index.htm
Collection classes and Swing for JDK 1.1:
http://java.sun.com/beans/infobus/#DOWNLOAD_COLLECTIONS
http://java.sun.com/products/jfc/index.html#download-swing
JDK 1.2:
http://java.sun.com/products/jdk/1.2/index.html
Getopt:
http://www.urbanophile.com/arenn/hacking/download.html#getopt
See INSTALL for installation instructions.
USAGE:
First set the classpath. It should contain the jar file
jode-x.x.xx.jar, the gnu getopt package and the sun collection package
for 1.1. For the swingui program you also need swing in you classpath.
First set the classpath. It should contain the jar file jode-1.1.jar,
the gnu getopt package and the sun collection package for 1.1. For
the swingui program you also need swing in you classpath.
You can then decompile a class file with:
java jode.decompiler.Main --classpath jarfile1.jar,jarfile2.jar org.package.Class
java jode.decompiler.Main --classpath program.jar,libfoo.jar org.package.Class
or a complete package with
java jode.decompiler.Main --classpath libfoo.jar program.jar
For a graphical user interface based on swing try:
java jode.swingui.Main --classpath jarfile1.jar
The obfuscator/deobfuscator can be run with:
The obfuscator/deobfuscator can be run with a script:
java jode.obfuscator.Main obfuscation.jos
See XXXX for more information about the script syntax.
HISTORY:
Someday I found guavad, a disassembler for java byte code (it does
similar things like `javap -c'). I used it on a class file, and found
that it was possible to reconstruct the original java code. First I
did it by hand on some small routines, but I soon realized that it was
a rather stupid task, and that I could write a perl script, that does
the same. At the end of the next day I had the first working
decompiler.
Now while it was working, it was not easy to use. You had to
decompile the code first with a disassembler, cut the method, you
wanted to decompile and then run the perl script on it. So I decided
to get some information of the class files and do this all
automatically. I decided to write it in java now, because it suited
best.
See the web documents for more information about the script syntax.

@ -8,6 +8,9 @@ Decompiler:
Obfuscator:
- flow obfuscation/optimization.
- warn about Class.forName and list occurences.
- detect Class.forName on constant strings and handle appropriately.
- work around Class.forName, by creating a new version using a hash
table that maps md5 sums of old names to obfuscated names.
DeObfuscator:
- generate nice names:
@ -27,5 +30,6 @@ User Interface:
Internal:
- clean up package hierarchy, esp. expr, flow and decompiler.
- move to net.sf.jode package.
- make the class names more precise, e.g. StructuredBlock is Statement,
FlowBlock is BasicBlock.

@ -1,18 +1,10 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT()
AM_INIT_AUTOMAKE(jode, 1.0.94)
AM_INIT_AUTOMAKE(jode, 1.1)
dnl Checks for programs.
dnl AC_PROG_CXX
dnl AC_PROG_AWK
dnl AC_PROG_CC
dnl AC_PROG_CPP
dnl AC_PROG_INSTALL
dnl AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl AC_PROG_RANLIB
dnl AC_PATH_PROG(ZIP, zip)
AC_PATH_PROG(PERL, perl)
AC_PATH_PROG(CYGPATH, cygpath)
@ -114,6 +106,13 @@ JODE_CHECK_CLASS(java.lang.Object, $CLASSLIB,
[ AC_MSG_RESULT(no)
AC_MSG_ERROR(Please specify location of core java class library) ])
AC_MSG_CHECKING(for java.lang.ref.WeakReference)
JODE_CHECK_CLASS(java.lang.ref.WeakReference, $CLASSLIB,
[ AC_MSG_RESULT(yes)
JCPPFLAGS="-DJDK12" ],
[ AC_MSG_RESULT(no)
JCPPFLAGS="-DJDK11" ])
AC_MSG_CHECKING(for collection classes)
JODE_CHECK_CLASS(java.util.Set, $CLASSPATH:$CLASSLIB,
[ COLLECTIONS="java.util"
@ -241,4 +240,11 @@ bin/jode
bin/jode.bat
doc/Makefile
test/Makefile,
[chmod 755 javaDependencies.pl bin/jode])
[chmod 755 javaDependencies.pl bin/jode],
[for i in \$CONFIG_FILES; do
changequote(, )dnl
if [ \$i != \${i%.java} ]; then
changequote([, ])dnl
$PERL $srcdir/jcpp $JCPPFLAGS \$i
fi
done])

@ -1,2 +1,3 @@
Makefile
Makefile.in
*.html

@ -1,14 +1,43 @@
## Input file for automake to generate the Makefile.in used by configure
EXTRA_DIST = \
applet.html \
download.html.in \
history.html \
jode.html \
license.html \
links.html \
usage.html \
PHP_FILES = \
applet.php \
bluesky.php \
download.php \
faq.php \
feedback.php \
history.php \
index.php \
license.php \
links.php \
usage.php
HTML_FILES = $(PHP_FILES:%.php=$(srcdir)/%.html)
noinst_DATA = $(HTML_FILES)
EXTRA_DIST = $(PHP_FILES) $(notdir $(HTML_FILES)) \
a-logo.gif \
myproject.jos \
dasm_to_java.perl \
gimp/jode-logo.xcf \
jode-logo.gif
.PHONY: public_html_symlink
# The following rules require that you have an apache with php on
# localhost with standard user public_html directories and
# FollowSymLink enabled.
PUBLIC_HTML=$(HOME)/public_html
JODE_PHP_DIR=jode_php
public_html_symlink:
rm -f $(PUBLIC_HTML)/$(JODE_PHP_DIR)
@RELDIR=`pwd | sed s!^$(HOME)!..!`; \
ln -sf $$RELDIR/$(srcdir) $(PUBLIC_HTML)/$(JODE_PHP_DIR); \
echo Created symlink to $$RELDIR/$(srcdir).
footer.inc: public_html_symlink
$(srcdir)/%.html: %.php footer.inc header.inc menu.inc
lynx -source http://localhost/~$(LOGNAME)/$(JODE_PHP_DIR)/$(notdir $<)?extension=.html > $@

@ -2,69 +2,74 @@
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="date" content="2000-06-30">
<meta name="date" content="2001-05-27">
<meta name="description" content="JODE - Java Optimize and Decompile Environment.">
<meta name="author" content="Jochen Hoenicke">
<meta name="keywords" content="jode, java, decompiler, obfuscator, deobfuscator, reverse engineering, free, GPL">
<style type="text/css">
<!--
body { color:#000000; background-color: #FFFFFF; }
.nav { font-family: Helvetica, Arial, sans-serif; font-weight: bold;
color:#000000; background-color: #EEEEF8; }
.footer { color:#FFFFFF; background-color: #737B9C; }
.boldlink { font-weight:bold; text-decoration: none; color:#FFFFFF; }
//-->
</style>
</head>
<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=4 cellspacing=1 width=100%>
<tr><td>
</td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<table cellspacing=0 cellpadding=3 width=100% border=0 bgcolor=eeeef8>
<tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Jode</b></font></td></tr>
<tr><td align="right">
<a href="./"><B>Home</B></a><br>
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a><br>
<br>
<a href="./applet.html">Applet</a><br>
<a href="./download.html">Download</a><br>
<a href="./usage.html">Documentation</a><br>
<a href="./license.html">License</a><br>
<a href="./history.html">History</a><br>
<a href="./links.html">Links</a><br>
<a href="./bluesky.html">Blue&nbsp;Sky</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Feedback</b></font></td></tr>
<tr><td align="right">
<a href="http://sourceforge.net/bugs/?group_id=3790">Bug&nbsp;Tracking</a><br>
<a href="http://sourceforge.net/forum/?group_id=3790">Public&nbsp;Forums</a><br>
<a href="http://lists.sourceforge.net/mailman/listinfo/jode-users">Mailing&nbsp;List</a><br>
<a href="http://sourceforge.net/sendmessage.html?touser=18252">Private&nbsp;Mail</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Download</b></font></td></tr>
<tr><td align="right">
<a href="ftp://jode.sourceforge.net/pub/jode/">FTP&nbsp;server</a><br>
<a href="http://sourceforge.net/project/filelist.html?group_id=3790">Source&nbsp;releases</a></td></tr>
<tr bgcolor="ffffff"><td align="center"><br>Powered by <br>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.html?group_id=3790&type=1" border=0 width=88 height=31 alt="SourceForge"></a><br>
<br>Best viewed with <br>
<a href="http://www.anybrowser.org/campaign/"><img src="a-logo.gif" border=0 width=88 height=31 alt="Any Browser"></a><br>
</td></tr></table>
</td>
<td valign="top">
<body text=#000000 bgcolor=#FFFFFF>
<table cellpadding=4 cellspacing=1 width=100%
><tr
><td align="left"
><img src="jode-logo.gif" alt="JODE" width=286 height=110
></td
><td align="right"
>Powered by <a href="http://sourceforge.net"><img
src="http://sourceforge.net/sflogo.html?group_id=3790&type=1"
border=0 width=88 height=31 alt="SourceForge"></a><br
>Best viewed with <a
href="http://www.anybrowser.org/campaign/"><img
src="a-logo.gif" border=0 width=88 height=31 alt="Any
Browser"></a><br
></td
></tr
></table>
<table cellspacing=0 cellpadding=3 border=0 bgcolor=#EEEEF8 class="nav">
<tr><td class="nav">
<a href="./"><B>Home</B></a> |
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a> |
<a href="./applet..html">Applet</a> |
<a href="./download..html">Download</a> |
<a href="./faq..html">FAQ</a> |
<a href="./feedback..html">Feedback</a> |
<a href="./usage..html">Documentation</a> |
<a href="./license..html">License</a> |
<a href="./history..html">History</a> |
<a href="./links..html">Links</a> |
<a href="./bluesky..html">Blue&nbsp;Sky</a></td></tr>
</table><br>
<h1>The <i>JODE</i> Applet</h1>
Please be patience, loading the applet may take some time.<br><br>
<p>Please be patience, loading the applet may take some time.</p>
<center>
<applet code="jode/Applet.class" archive="jode-applet.jar" width=540 height=400>
<param name=pagecolor value="ffffff">
<param name=classpath value="http://jode.sourceforge.net/load.html/http%3a//www.informatik.uni-oldenburg.de/~mw/plasma.jar">
<param name=classpath value="http://jode.sourceforge.net/load.php/http%3a//www.informatik.uni-oldenburg.de/~mw/plasma.jar">
<param name=class value="PlasmaApplet">
<p>Sorry you need a java enabled browser to test a java applet ;-)</p>
<p>Don't read the rest, it only contains information about the applet.</p>
</applet>
</center><br>
Press the start button to decompile <a
<p> Press the start button to decompile <a
href="http://www.informatik.uni-oldenburg.de/~mw/plasma.html">Michael's
Plasma applet</a> (and give the decompiler some time to download the
jar file). <br><br>
jar file). </p>
You may change the classpath to point to a zip or jar file of your
choice, using a similar syntax. Use <code>%3a</code> instead of a
@ -75,20 +80,19 @@ multiple entries in the class path field separated by a comma.<br><br>
You can't use this applet for local files; the class files must be on
a server that is accessible from sourceforge. You can try to give
local filenames directly without the load.html wrapper, but that is
local filenames directly without the load.php wrapper, but that is
probably forbidden by your browser. Most browser only allow loading
files from the same server as the applet, and this is the reason why
you have to use such a cryptic URL.<br><br>
Save probably doesn't work, because it is forbidden by your browser.<br><br>
</td></tr>
</table>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
<TABLE class=footer width="100%" border="0" cellspacing="0" cellpadding="2">
<TR>
<TD align="center"><FONT color="#ffffff"><SPAN class="titlebar">
<TD align="center"><SPAN class=footer>
All trademarks and copyrights on this page are properties of their respective owners. <br>
Last updated on 8-May-2000,
Copyright &copy; 1998-2000 by Jochen Hoenicke.</SPAN></FONT>
Last updated on 27-May-2001,
Copyright &copy; 1998-2001 by Jochen Hoenicke.
Canonic URL is <a class=boldlink href="http://jode.sourceforge.net/">http://jode.sourceforge.net/</a></SPAN>
</TD>
</TR>
</TABLE>

@ -1,7 +1,7 @@
<?php require("header.inc"); ?>
<h1>The <i>JODE</i> Applet</h1>
Please be patience, loading the applet may take some time.<br><br>
<p>Please be patience, loading the applet may take some time.</p>
<center>
<applet code="jode/Applet.class" archive="jode-applet.jar" width=540 height=400>
@ -13,10 +13,10 @@ Please be patience, loading the applet may take some time.<br><br>
</applet>
</center><br>
Press the start button to decompile <a
<p> Press the start button to decompile <a
href="http://www.informatik.uni-oldenburg.de/~mw/plasma.html">Michael's
Plasma applet</a> (and give the decompiler some time to download the
jar file). <br><br>
jar file). </p>
You may change the classpath to point to a zip or jar file of your
choice, using a similar syntax. Use <code>%3a</code> instead of a

@ -2,51 +2,56 @@
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="date" content="2000-06-30">
<meta name="date" content="2001-05-27">
<meta name="description" content="JODE - Java Optimize and Decompile Environment.">
<meta name="author" content="Jochen Hoenicke">
<meta name="keywords" content="jode, java, decompiler, obfuscator, deobfuscator, reverse engineering, free, GPL">
<style type="text/css">
<!--
body { color:#000000; background-color: #FFFFFF; }
.nav { font-family: Helvetica, Arial, sans-serif; font-weight: bold;
color:#000000; background-color: #EEEEF8; }
.footer { color:#FFFFFF; background-color: #737B9C; }
.boldlink { font-weight:bold; text-decoration: none; color:#FFFFFF; }
//-->
</style>
</head>
<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=4 cellspacing=1 width=100%>
<tr><td>
</td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<table cellspacing=0 cellpadding=3 width=100% border=0 bgcolor=eeeef8>
<tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Jode</b></font></td></tr>
<tr><td align="right">
<a href="./"><B>Home</B></a><br>
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a><br>
<br>
<a href="./applet.html">Applet</a><br>
<a href="./download.html">Download</a><br>
<a href="./usage.html">Documentation</a><br>
<a href="./license.html">License</a><br>
<a href="./history.html">History</a><br>
<a href="./links.html">Links</a><br>
<a href="./bluesky.html">Blue&nbsp;Sky</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Feedback</b></font></td></tr>
<tr><td align="right">
<a href="http://sourceforge.net/bugs/?group_id=3790">Bug&nbsp;Tracking</a><br>
<a href="http://sourceforge.net/forum/?group_id=3790">Public&nbsp;Forums</a><br>
<a href="http://lists.sourceforge.net/mailman/listinfo/jode-users">Mailing&nbsp;List</a><br>
<a href="http://sourceforge.net/sendmessage.html?touser=18252">Private&nbsp;Mail</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Download</b></font></td></tr>
<tr><td align="right">
<a href="ftp://jode.sourceforge.net/pub/jode/">FTP&nbsp;server</a><br>
<a href="http://sourceforge.net/project/filelist.html?group_id=3790">Source&nbsp;releases</a></td></tr>
<tr bgcolor="ffffff"><td align="center"><br>Powered by <br>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.html?group_id=3790&type=1" border=0 width=88 height=31 alt="SourceForge"></a><br>
<br>Best viewed with <br>
<a href="http://www.anybrowser.org/campaign/"><img src="a-logo.gif" border=0 width=88 height=31 alt="Any Browser"></a><br>
</td></tr></table>
</td>
<td valign="top">
<body text=#000000 bgcolor=#FFFFFF>
<table cellpadding=4 cellspacing=1 width=100%
><tr
><td align="left"
><img src="jode-logo.gif" alt="JODE" width=286 height=110
></td
><td align="right"
>Powered by <a href="http://sourceforge.net"><img
src="http://sourceforge.net/sflogo.html?group_id=3790&type=1"
border=0 width=88 height=31 alt="SourceForge"></a><br
>Best viewed with <a
href="http://www.anybrowser.org/campaign/"><img
src="a-logo.gif" border=0 width=88 height=31 alt="Any
Browser"></a><br
></td
></tr
></table>
<table cellspacing=0 cellpadding=3 border=0 bgcolor=#EEEEF8 class="nav">
<tr><td class="nav">
<a href="./"><B>Home</B></a> |
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a> |
<a href="./applet..html">Applet</a> |
<a href="./download..html">Download</a> |
<a href="./faq..html">FAQ</a> |
<a href="./feedback..html">Feedback</a> |
<a href="./usage..html">Documentation</a> |
<a href="./license..html">License</a> |
<a href="./history..html">History</a> |
<a href="./links..html">Links</a> |
<a href="./bluesky..html">Blue&nbsp;Sky</a></td></tr>
</table><br>
<h1>Blue Sky</h1>
<p>This section contains features that I think would be great to have,
@ -117,14 +122,13 @@ copy them back into the java code. </p>
<p>This doesn't need to be built into the decompiler. A script that takes
the javadoc pages and the decompiled code can easily merge them.</p>
</td></tr>
</table>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
<TABLE class=footer width="100%" border="0" cellspacing="0" cellpadding="2">
<TR>
<TD align="center"><FONT color="#ffffff"><SPAN class="titlebar">
<TD align="center"><SPAN class=footer>
All trademarks and copyrights on this page are properties of their respective owners. <br>
Last updated on 8-May-2000,
Copyright &copy; 1998-2000 by Jochen Hoenicke.</SPAN></FONT>
Last updated on 27-May-2001,
Copyright &copy; 1998-2001 by Jochen Hoenicke.
Canonic URL is <a class=boldlink href="http://jode.sourceforge.net/">http://jode.sourceforge.net/</a></SPAN>
</TD>
</TR>
</TABLE>

@ -2,88 +2,95 @@
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="date" content="2000-06-30">
<meta name="date" content="2001-05-27">
<meta name="description" content="JODE - Java Optimize and Decompile Environment.">
<meta name="author" content="Jochen Hoenicke">
<meta name="keywords" content="jode, java, decompiler, obfuscator, deobfuscator, reverse engineering, free, GPL">
<style type="text/css">
<!--
body { color:#000000; background-color: #FFFFFF; }
.nav { font-family: Helvetica, Arial, sans-serif; font-weight: bold;
color:#000000; background-color: #EEEEF8; }
.footer { color:#FFFFFF; background-color: #737B9C; }
.boldlink { font-weight:bold; text-decoration: none; color:#FFFFFF; }
//-->
</style>
</head>
<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=4 cellspacing=1 width=100%>
<tr><td>
</td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<table cellspacing=0 cellpadding=3 width=100% border=0 bgcolor=eeeef8>
<tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Jode</b></font></td></tr>
<tr><td align="right">
<a href="./"><B>Home</B></a><br>
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a><br>
<br>
<a href="./applet.html">Applet</a><br>
<a href="./download.html">Download</a><br>
<a href="./usage.html">Documentation</a><br>
<a href="./license.html">License</a><br>
<a href="./history.html">History</a><br>
<a href="./links.html">Links</a><br>
<a href="./bluesky.html">Blue&nbsp;Sky</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Feedback</b></font></td></tr>
<tr><td align="right">
<a href="http://sourceforge.net/bugs/?group_id=3790">Bug&nbsp;Tracking</a><br>
<a href="http://sourceforge.net/forum/?group_id=3790">Public&nbsp;Forums</a><br>
<a href="http://lists.sourceforge.net/mailman/listinfo/jode-users">Mailing&nbsp;List</a><br>
<a href="http://sourceforge.net/sendmessage.html?touser=18252">Private&nbsp;Mail</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Download</b></font></td></tr>
<tr><td align="right">
<a href="ftp://jode.sourceforge.net/pub/jode/">FTP&nbsp;server</a><br>
<a href="http://sourceforge.net/project/filelist.html?group_id=3790">Source&nbsp;releases</a></td></tr>
<tr bgcolor="ffffff"><td align="center"><br>Powered by <br>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.html?group_id=3790&type=1" border=0 width=88 height=31 alt="SourceForge"></a><br>
<br>Best viewed with <br>
<a href="http://www.anybrowser.org/campaign/"><img src="a-logo.gif" border=0 width=88 height=31 alt="Any Browser"></a><br>
</td></tr></table>
</td>
<td valign="top">
<h2>Download</h2>
The latest source code of <i>JODE</i> is available at the <a href="http://sourceforge.net/project/?group_id=3790">project page</a>.
You need several other packages to build <i>JODE</i>, check the <a href="./links.html">links page</a>. <br><br>
The simplest way to get it, especially for non unix users, is in
<body text=#000000 bgcolor=#FFFFFF>
<table cellpadding=4 cellspacing=1 width=100%
><tr
><td align="left"
><img src="jode-logo.gif" alt="JODE" width=286 height=110
></td
><td align="right"
>Powered by <a href="http://sourceforge.net"><img
src="http://sourceforge.net/sflogo.html?group_id=3790&type=1"
border=0 width=88 height=31 alt="SourceForge"></a><br
>Best viewed with <a
href="http://www.anybrowser.org/campaign/"><img
src="a-logo.gif" border=0 width=88 height=31 alt="Any
Browser"></a><br
></td
></tr
></table>
<table cellspacing=0 cellpadding=3 border=0 bgcolor=#EEEEF8 class="nav">
<tr><td class="nav">
<a href="./"><B>Home</B></a> |
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a> |
<a href="./applet..html">Applet</a> |
<a href="./download..html">Download</a> |
<a href="./faq..html">FAQ</a> |
<a href="./feedback..html">Feedback</a> |
<a href="./usage..html">Documentation</a> |
<a href="./license..html">License</a> |
<a href="./history..html">History</a> |
<a href="./links..html">Links</a> |
<a href="./bluesky..html">Blue&nbsp;Sky</a></td></tr>
</table><br>
<h1>Download</h1>
<p>Jode is available in the download section. Click <a href="http://sourceforge.net/project/filelist.php?group_id=3790">here</a> to download the latest
released source code of <i>JODE</i>
<p>If you download the source code, you need several other packages to
build <i>JODE</i>, check the <a href="./links..html">links
page</a>. </p>
<p>The simplest way to get it, especially for non unix users, is in
precompiled form, though. I have two jar archives at the <a
href="ftp://jode.sourceforge.net/pub/jode">ftp server</a>. You may
href="ftp://jode.sourceforge.net/pub/jode">xftp server</a>. You may
need to press shift while clicking on the link, depending on your
browser.
<ul> <li><a href="ftp://jode.sourceforge.net/pub/jode/jode-1.0.93-1.1.jar">jode-1.0.93-1.1.jar</a> is for JDK&nbsp;1.1. It already
contains Getopt and the collection classes from the GNU Classpath
project. If you want to use the swing interface, you have to download
swing separately. </li>
<ul> <li><a href="ftp://jode.sourceforge.net/pub/jode/jode-1.1-1.1.jar">jode-1.1-1.1.jar</a> is for JDK&nbsp;1.1. It contains
the collection classes from the GNU Classpath project. If you want to
use the swing interface, you have to download swing separately. </li>
<li> <a href="ftp://jode.sourceforge.net/pub/jode/jode-1.0.93-1.2.jar">jode-1.0.93-1.2.jar</a> is for JDK&nbsp;1.2. It already
contains Getopt, so you don't need any other package.</li> </ul>
<li> <a href="ftp://jode.sourceforge.net/pub/jode/jode-1.1-1.2.jar">jode-1.1-1.2.jar</a> is for JDK&nbsp;1.2 or better. </li> </ul>
</p>
<h2>CVS Repository</h2>
<h1>CVS Repository</h1>
You can get the latest sources from the <a href="http://sourceforge.net/cvs/?group_id=3790">CVS repository</a>.
<p>You can get the latest sources from the <a href="http://sourceforge.net/cvs/?group_id=3790">CVS repository</a>.
Follow the instruction on that page; use <code>jode</code> as
<i>modulename</i>. Then change to the directory jode and run
<pre>aclocal && automake -a && autoconf</pre>
Afterwards follow the instruction in the INSTALL file.
</td></tr>
</table>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
Afterwards follow the instruction in the INSTALL file. </p>
<TABLE class=footer width="100%" border="0" cellspacing="0" cellpadding="2">
<TR>
<TD align="center"><FONT color="#ffffff"><SPAN class="titlebar">
<TD align="center"><SPAN class=footer>
All trademarks and copyrights on this page are properties of their respective owners. <br>
Last updated on 8-May-2000,
Copyright &copy; 1998-2000 by Jochen Hoenicke.</SPAN></FONT>
Last updated on 27-May-2001,
Copyright &copy; 1998-2001 by Jochen Hoenicke.
Canonic URL is <a class=boldlink href="http://jode.sourceforge.net/">http://jode.sourceforge.net/</a></SPAN>
</TD>
</TR>
</TABLE>

@ -1,14 +1,17 @@
<?php require("header.inc"); ?>
<h2>Download</h2>
<h1>Download</h1>
The latest source code of <i>JODE</i> is available at the <?php
sflink("project/") ?>project page</a>.
You need several other packages to build <i>JODE</i>, check the <?php
selflink("links") ?>links page</a>. <br><br>
<p>Jode is available in the download section. Click <?php
sflink("project/filelist.php")?>here</a> to download the latest
released source code of <i>JODE</i>
The simplest way to get it, especially for non unix users, is in
<p>If you download the source code, you need several other packages to
build <i>JODE</i>, check the <?php selflink("links") ?>links
page</a>. </p>
<p>The simplest way to get it, especially for non unix users, is in
precompiled form, though. I have two jar archives at the <a
href="ftp://jode.sourceforge.net/pub/jode">ftp server</a>. You may
href="ftp://jode.sourceforge.net/pub/jode">xftp server</a>. You may
need to press shift while clicking on the link, depending on your
browser.
@ -19,22 +22,21 @@ function jarlink($what) {
echo ".jar\">jode-".$version.$what.".jar</a>";
} ?>
<ul> <li><?php jarlink("-1.1") ?> is for JDK&nbsp;1.1. It already
contains Getopt and the collection classes from the GNU Classpath
project. If you want to use the swing interface, you have to download
swing separately. </li>
<ul> <li><?php jarlink("-1.1") ?> is for JDK&nbsp;1.1. It contains
the collection classes from the GNU Classpath project. If you want to
use the swing interface, you have to download swing separately. </li>
<li> <?php jarlink("-1.2") ?> is for JDK&nbsp;1.2. It already
contains Getopt, so you don't need any other package.</li> </ul>
<li> <?php jarlink("-1.2") ?> is for JDK&nbsp;1.2 or better. </li> </ul>
</p>
<h2>CVS Repository</h2>
<h1>CVS Repository</h1>
You can get the latest sources from the <?php sflink("cvs/") ?>
<p>You can get the latest sources from the <?php sflink("cvs/") ?>
CVS repository</a>.
Follow the instruction on that page; use <code>jode</code> as
<i>modulename</i>. Then change to the directory jode and run
<pre>aclocal && automake -a && autoconf</pre>
Afterwards follow the instruction in the INSTALL file.
Afterwards follow the instruction in the INSTALL file. </p>
<?php require("footer.inc"); ?>

@ -1,11 +1,10 @@
</td></tr>
</table>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
<TABLE class=footer width="100%" border="0" cellspacing="0" cellpadding="2">
<TR>
<TD align="center"><FONT color="#ffffff"><SPAN class="titlebar">
<TD align="center"><SPAN class=footer>
All trademarks and copyrights on this page are properties of their respective owners. <br>
Last updated on 30-Jun-2000,
Copyright &copy; 1998-2000 by Jochen Hoenicke.</SPAN></FONT>
Last updated on 27-May-2001,
Copyright &copy; 1998-2001 by Jochen Hoenicke.
Canonic URL is <a class=boldlink href="http://jode.sourceforge.net/">http://jode.sourceforge.net/</a></SPAN>
</TD>
</TR>
</TABLE>

@ -1,13 +1,17 @@
<?php
$version="1.0.93";
if (! $extension) {
$extension = "php";
}
$version="1.1";
function selflink($link) {
global $extension;
echo "<a href=\"./";
if ($link != "jode") {
if ($link != "index") {
if (ereg("#", $link)) {
$link = ereg_replace("#", ".php#", $link);
$link = ereg_replace("#", ".$extension#", $link);
} else {
$link .= ".php";
$link .= ".$extension";
}
echo "$link";
}
@ -21,22 +25,39 @@ function sflink($link) {
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="date" content="2000-06-30">
<meta name="date" content="2001-05-27">
<meta name="description" content="JODE - Java Optimize and Decompile Environment.">
<meta name="author" content="Jochen Hoenicke">
<meta name="keywords" content="jode, java, decompiler, obfuscator, deobfuscator, reverse engineering, free, GPL">
<style type="text/css">
<!--
body { color:#000000; background-color: #FFFFFF; }
.nav { font-family: Helvetica, Arial, sans-serif; font-weight: bold;
color:#000000; background-color: #EEEEF8; }
.footer { color:#FFFFFF; background-color: #737B9C; }
.boldlink { font-weight:bold; text-decoration: none; color:#FFFFFF; }
//-->
</style>
</head>
<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=4 cellspacing=1 width=100%>
<tr><td>
<?php /* <CENTER><img src="constructionint.gif" alt="Under Construction, "><br>
beware broken links</CENTER> */ ?>
</td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<body text=#000000 bgcolor=#FFFFFF>
<table cellpadding=4 cellspacing=1 width=100%
><tr
><td align="left"
><img src="jode-logo.gif" alt="JODE" width=286 height=110
></td
><td align="right"
>Powered by <a href="http://sourceforge.net"><img
src="http://sourceforge.net/sflogo.html?group_id=3790&type=1"
border=0 width=88 height=31 alt="SourceForge"></a><br
>Best viewed with <a
href="http://www.anybrowser.org/campaign/"><img
src="a-logo.gif" border=0 width=88 height=31 alt="Any
Browser"></a><br
></td
></tr
></table>
<?php require("menu.inc"); ?>
</td>
<td valign="top">

@ -2,52 +2,57 @@
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="date" content="2000-06-30">
<meta name="date" content="2001-05-27">
<meta name="description" content="JODE - Java Optimize and Decompile Environment.">
<meta name="author" content="Jochen Hoenicke">
<meta name="keywords" content="jode, java, decompiler, obfuscator, deobfuscator, reverse engineering, free, GPL">
<style type="text/css">
<!--
body { color:#000000; background-color: #FFFFFF; }
.nav { font-family: Helvetica, Arial, sans-serif; font-weight: bold;
color:#000000; background-color: #EEEEF8; }
.footer { color:#FFFFFF; background-color: #737B9C; }
.boldlink { font-weight:bold; text-decoration: none; color:#FFFFFF; }
//-->
</style>
</head>
<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=4 cellspacing=1 width=100%>
<tr><td>
</td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<table cellspacing=0 cellpadding=3 width=100% border=0 bgcolor=eeeef8>
<tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Jode</b></font></td></tr>
<tr><td align="right">
<a href="./"><B>Home</B></a><br>
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a><br>
<br>
<a href="./applet.html">Applet</a><br>
<a href="./download.html">Download</a><br>
<a href="./usage.html">Documentation</a><br>
<a href="./license.html">License</a><br>
<a href="./history.html">History</a><br>
<a href="./links.html">Links</a><br>
<a href="./bluesky.html">Blue&nbsp;Sky</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Feedback</b></font></td></tr>
<tr><td align="right">
<a href="http://sourceforge.net/bugs/?group_id=3790">Bug&nbsp;Tracking</a><br>
<a href="http://sourceforge.net/forum/?group_id=3790">Public&nbsp;Forums</a><br>
<a href="http://lists.sourceforge.net/mailman/listinfo/jode-users">Mailing&nbsp;List</a><br>
<a href="http://sourceforge.net/sendmessage.html?touser=18252">Private&nbsp;Mail</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Download</b></font></td></tr>
<tr><td align="right">
<a href="ftp://jode.sourceforge.net/pub/jode/">FTP&nbsp;server</a><br>
<a href="http://sourceforge.net/project/filelist.html?group_id=3790">Source&nbsp;releases</a></td></tr>
<tr bgcolor="ffffff"><td align="center"><br>Powered by <br>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.html?group_id=3790&type=1" border=0 width=88 height=31 alt="SourceForge"></a><br>
<br>Best viewed with <br>
<a href="http://www.anybrowser.org/campaign/"><img src="a-logo.gif" border=0 width=88 height=31 alt="Any Browser"></a><br>
</td></tr></table>
</td>
<td valign="top">
<h2>History</h2>
<body text=#000000 bgcolor=#FFFFFF>
<table cellpadding=4 cellspacing=1 width=100%
><tr
><td align="left"
><img src="jode-logo.gif" alt="JODE" width=286 height=110
></td
><td align="right"
>Powered by <a href="http://sourceforge.net"><img
src="http://sourceforge.net/sflogo.html?group_id=3790&type=1"
border=0 width=88 height=31 alt="SourceForge"></a><br
>Best viewed with <a
href="http://www.anybrowser.org/campaign/"><img
src="a-logo.gif" border=0 width=88 height=31 alt="Any
Browser"></a><br
></td
></tr
></table>
<table cellspacing=0 cellpadding=3 border=0 bgcolor=#EEEEF8 class="nav">
<tr><td class="nav">
<a href="./"><B>Home</B></a> |
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a> |
<a href="./applet..html">Applet</a> |
<a href="./download..html">Download</a> |
<a href="./faq..html">FAQ</a> |
<a href="./feedback..html">Feedback</a> |
<a href="./usage..html">Documentation</a> |
<a href="./license..html">License</a> |
<a href="./history..html">History</a> |
<a href="./links..html">Links</a> |
<a href="./bluesky..html">Blue&nbsp;Sky</a></td></tr>
</table><br>
<h1>History</h1>
<p>Someday I found <code>guavad</code>, a disassembler for java byte
code (it does similar things like <code>javap&nbsp;-c</code>). I used
@ -67,14 +72,13 @@ now, because it suited best.</p>
<p>Just for the records: the java code is now more than 50 times
bigger than the original perl script and is still growing.</p>
</td></tr>
</table>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
<TABLE class=footer width="100%" border="0" cellspacing="0" cellpadding="2">
<TR>
<TD align="center"><FONT color="#ffffff"><SPAN class="titlebar">
<TD align="center"><SPAN class=footer>
All trademarks and copyrights on this page are properties of their respective owners. <br>
Last updated on 8-May-2000,
Copyright &copy; 1998-2000 by Jochen Hoenicke.</SPAN></FONT>
Last updated on 27-May-2001,
Copyright &copy; 1998-2001 by Jochen Hoenicke.
Canonic URL is <a class=boldlink href="http://jode.sourceforge.net/">http://jode.sourceforge.net/</a></SPAN>
</TD>
</TR>
</TABLE>

@ -1,5 +1,5 @@
<?php require("header.inc"); ?>
<h2>History</h2>
<h1>History</h1>
<p>Someday I found <code>guavad</code>, a disassembler for java byte
code (it does similar things like <code>javap&nbsp;-c</code>). I used

@ -2,64 +2,68 @@
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="date" content="2000-06-30">
<meta name="date" content="2001-05-27">
<meta name="description" content="JODE - Java Optimize and Decompile Environment.">
<meta name="author" content="Jochen Hoenicke">
<meta name="keywords" content="jode, java, decompiler, obfuscator, deobfuscator, reverse engineering, free, GPL">
<style type="text/css">
<!--
body { color:#000000; background-color: #FFFFFF; }
.nav { font-family: Helvetica, Arial, sans-serif; font-weight: bold;
color:#000000; background-color: #EEEEF8; }
.footer { color:#FFFFFF; background-color: #737B9C; }
.boldlink { font-weight:bold; text-decoration: none; color:#FFFFFF; }
//-->
</style>
</head>
<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=4 cellspacing=1 width=100%>
<tr><td>
</td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<table cellspacing=0 cellpadding=3 width=100% border=0 bgcolor=eeeef8>
<tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Jode</b></font></td></tr>
<tr><td align="right">
<a href="./"><B>Home</B></a><br>
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a><br>
<br>
<a href="./applet.html">Applet</a><br>
<a href="./download.html">Download</a><br>
<a href="./usage.html">Documentation</a><br>
<a href="./license.html">License</a><br>
<a href="./history.html">History</a><br>
<a href="./links.html">Links</a><br>
<a href="./bluesky.html">Blue&nbsp;Sky</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Feedback</b></font></td></tr>
<tr><td align="right">
<a href="http://sourceforge.net/bugs/?group_id=3790">Bug&nbsp;Tracking</a><br>
<a href="http://sourceforge.net/forum/?group_id=3790">Public&nbsp;Forums</a><br>
<a href="http://lists.sourceforge.net/mailman/listinfo/jode-users">Mailing&nbsp;List</a><br>
<a href="http://sourceforge.net/sendmessage.html?touser=18252">Private&nbsp;Mail</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Download</b></font></td></tr>
<tr><td align="right">
<a href="ftp://jode.sourceforge.net/pub/jode/">FTP&nbsp;server</a><br>
<a href="http://sourceforge.net/project/filelist.html?group_id=3790">Source&nbsp;releases</a></td></tr>
<tr bgcolor="ffffff"><td align="center"><br>Powered by <br>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.html?group_id=3790&type=1" border=0 width=88 height=31 alt="SourceForge"></a><br>
<br>Best viewed with <br>
<a href="http://www.anybrowser.org/campaign/"><img src="a-logo.gif" border=0 width=88 height=31 alt="Any Browser"></a><br>
</td></tr></table>
</td>
<td valign="top">
<body text=#000000 bgcolor=#FFFFFF>
<table cellpadding=4 cellspacing=1 width=100%
><tr
><td align="left"
><img src="jode-logo.gif" alt="JODE" width=286 height=110
></td
><td align="right"
>Powered by <a href="http://sourceforge.net"><img
src="http://sourceforge.net/sflogo.html?group_id=3790&type=1"
border=0 width=88 height=31 alt="SourceForge"></a><br
>Best viewed with <a
href="http://www.anybrowser.org/campaign/"><img
src="a-logo.gif" border=0 width=88 height=31 alt="Any
Browser"></a><br
></td
></tr
></table>
<table cellspacing=0 cellpadding=3 border=0 bgcolor=#EEEEF8 class="nav">
<tr><td class="nav">
<a href="./"><B>Home</B></a> |
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a> |
<a href="./applet..html">Applet</a> |
<a href="./download..html">Download</a> |
<a href="./faq..html">FAQ</a> |
<a href="./feedback..html">Feedback</a> |
<a href="./usage..html">Documentation</a> |
<a href="./license..html">License</a> |
<a href="./history..html">History</a> |
<a href="./links..html">Links</a> |
<a href="./bluesky..html">Blue&nbsp;Sky</a></td></tr>
</table><br>
<P><i>JODE</i> is a java package containing a decompiler and an
optimizer for java. This package is freely available under the GPL
(see <a href="./license.html">license</a>).<p>
optimizer for java. This package is <a href="./license..html">freely available</a> under the GNU GPL.<p>
<P>The decompiler takes <tt>class</tt> files as input and produces
something similar to the original <tt>java</tt> file. Of course this
can't be perfect: There is no way to produce the comments or the names
of local variables (except when compiled with debuging) and there are
often more ways to write the same thing. But <i>JODE</i> does its job
quite well, so you should give it a try: <a href="./applet.html">start
the applet</a>.</P>
<P>The decompiler reads in <tt>class</tt> files and produces something
similar to the original <tt>java</tt> file. Of course this can't be
perfect: There is no way to produce the comments or the names of local
variables (except when compiled with debuging) and there are often
more ways to write the same thing. However, <i>JODE</i> does its job quite
well, so you should give it a try and <a href="./applet..html">start the
applet</a>.</P>
<P>The optimizer transforms <tt>class</tt> files in various ways with
can be controlled by a script file. It supports the following
@ -77,14 +81,23 @@ fields</li>
<h2>News</h2>
<ul>
<li>JODE 1.1 is out. With support for javac v8 (jdk 1.3). </li>
<li><i>JODE</i> is now hosted by <a href="http://sourceforge.net/">SourceForge</a>.</li>
<li>The latest <a href="http://sourceforge.net/cvs/?group_id=3790">CVS</a> version breaks long lines</li>
<li>I can now decompile <b>inner and anonymous</b> classes.</li>
<li>Now long lines are automatically broken.</li>
<li><b>Inner and anonymous</b> classes are automatically decompiled.</li>
<li>The optimizer (aka obfuscator) can be customized via a small
config file</li>
<li>Jode is <tt>autoconf</tt>igured.</li>
</ul>
<h2>Known bugs of the decompiler</h2>
<p>Some jdk1.3 synthetic access functions aren't understood. The
produced source contains access$xxx functions, but it still compiles.</p>
<p>There may be other bugs, that cause Exceptions or invalid code.
If you have such a problems don't hesitate to issue a bug report.
Please include the <code>class</code> file if possible.</p>
<h2>Limitations</h2>
<p>If not all dependent classes can be found, the verifier (which is
@ -104,25 +117,13 @@ the code should still be compileable. This does especially happen
when you compile with <tt>`-O'</tt> flag and javac has inlined some
methods. </p>
<p>Sometimes this program may exit with an <code>Exception</code> or
produce incorrect code. Most time the code can't be compiled, so that
it can be easily spotted. If you have one of these problems (except
those that occur on some of the <code>jode.test</code> files, I would
be very interested in a bug report (including the <code>class</code>
file, if possible). </p>
<p>Sometimes <i>JODE</i> generates some GOTO expression and labels.
This shouldn't happen any more with code produced by javac or jikes.
But some flow obfuscator may provoke this. In that case you can run
the Obfuscator first (to optimize away the flow obfuscation ;-).</p>
</td></tr>
</table>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
<TABLE class=footer width="100%" border="0" cellspacing="0" cellpadding="2">
<TR>
<TD align="center"><FONT color="#ffffff"><SPAN class="titlebar">
<TD align="center"><SPAN class=footer>
All trademarks and copyrights on this page are properties of their respective owners. <br>
Last updated on 8-May-2000,
Copyright &copy; 1998-2000 by Jochen Hoenicke.</SPAN></FONT>
Last updated on 27-May-2001,
Copyright &copy; 1998-2001 by Jochen Hoenicke.
Canonic URL is <a class=boldlink href="http://jode.sourceforge.net/">http://jode.sourceforge.net/</a></SPAN>
</TD>
</TR>
</TABLE>

@ -1,16 +1,16 @@
<?php require("header.inc"); ?>
<P><i>JODE</i> is a java package containing a decompiler and an
optimizer for java. This package is freely available under the GPL
(see <?php selflink("license") ?>license</a>).<p>
optimizer for java. This package is <?php selflink("license")
?>freely available</a> under the GNU GPL.<p>
<P>The decompiler takes <tt>class</tt> files as input and produces
something similar to the original <tt>java</tt> file. Of course this
can't be perfect: There is no way to produce the comments or the names
of local variables (except when compiled with debuging) and there are
often more ways to write the same thing. But <i>JODE</i> does its job
quite well, so you should give it a try: <? selflink("applet") ?>start
the applet</a>.</P>
<P>The decompiler reads in <tt>class</tt> files and produces something
similar to the original <tt>java</tt> file. Of course this can't be
perfect: There is no way to produce the comments or the names of local
variables (except when compiled with debuging) and there are often
more ways to write the same thing. However, <i>JODE</i> does its job quite
well, so you should give it a try and <? selflink("applet") ?>start the
applet</a>.</P>
<P>The optimizer transforms <tt>class</tt> files in various ways with
can be controlled by a script file. It supports the following
@ -28,14 +28,23 @@ fields</li>
<h2>News</h2>
<ul>
<li>JODE 1.1 is out. With support for javac v8 (jdk 1.3). </li>
<li><i>JODE</i> is now hosted by <a href="http://sourceforge.net/">SourceForge</a>.</li>
<li>The latest <?php sflink("cvs/") ?>CVS</a> version breaks long lines</li>
<li>I can now decompile <b>inner and anonymous</b> classes.</li>
<li>Now long lines are automatically broken.</li>
<li><b>Inner and anonymous</b> classes are automatically decompiled.</li>
<li>The optimizer (aka obfuscator) can be customized via a small
config file</li>
<li>Jode is <tt>autoconf</tt>igured.</li>
</ul>
<h2>Known bugs of the decompiler</h2>
<p>Some jdk1.3 synthetic access functions aren't understood. The
produced source contains access$xxx functions, but it still compiles.</p>
<p>There may be other bugs, that cause Exceptions or invalid code.
If you have such a problems don't hesitate to issue a bug report.
Please include the <code>class</code> file if possible.</p>
<h2>Limitations</h2>
<p>If not all dependent classes can be found, the verifier (which is
@ -55,15 +64,4 @@ the code should still be compileable. This does especially happen
when you compile with <tt>`-O'</tt> flag and javac has inlined some
methods. </p>
<p>Sometimes this program may exit with an <code>Exception</code> or
produce incorrect code. Most time the code can't be compiled, so that
it can be easily spotted. If you have one of these problems (except
those that occur on some of the <code>jode.test</code> files, I would
be very interested in a bug report (including the <code>class</code>
file, if possible). </p>
<p>Sometimes <i>JODE</i> generates some GOTO expression and labels.
This shouldn't happen any more with code produced by javac or jikes.
But some flow obfuscator may provoke this. In that case you can run
the Obfuscator first (to optimize away the flow obfuscation ;-).</p>
<?php require("footer.inc"); ?>

@ -2,72 +2,77 @@
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="date" content="2000-06-30">
<meta name="date" content="2001-05-27">
<meta name="description" content="JODE - Java Optimize and Decompile Environment.">
<meta name="author" content="Jochen Hoenicke">
<meta name="keywords" content="jode, java, decompiler, obfuscator, deobfuscator, reverse engineering, free, GPL">
<style type="text/css">
<!--
body { color:#000000; background-color: #FFFFFF; }
.nav { font-family: Helvetica, Arial, sans-serif; font-weight: bold;
color:#000000; background-color: #EEEEF8; }
.footer { color:#FFFFFF; background-color: #737B9C; }
.boldlink { font-weight:bold; text-decoration: none; color:#FFFFFF; }
//-->
</style>
</head>
<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=4 cellspacing=1 width=100%>
<tr><td>
</td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<table cellspacing=0 cellpadding=3 width=100% border=0 bgcolor=eeeef8>
<tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Jode</b></font></td></tr>
<tr><td align="right">
<a href="./"><B>Home</B></a><br>
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a><br>
<br>
<a href="./applet.html">Applet</a><br>
<a href="./download.html">Download</a><br>
<a href="./usage.html">Documentation</a><br>
<a href="./license.html">License</a><br>
<a href="./history.html">History</a><br>
<a href="./links.html">Links</a><br>
<a href="./bluesky.html">Blue&nbsp;Sky</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Feedback</b></font></td></tr>
<tr><td align="right">
<a href="http://sourceforge.net/bugs/?group_id=3790">Bug&nbsp;Tracking</a><br>
<a href="http://sourceforge.net/forum/?group_id=3790">Public&nbsp;Forums</a><br>
<a href="http://lists.sourceforge.net/mailman/listinfo/jode-users">Mailing&nbsp;List</a><br>
<a href="http://sourceforge.net/sendmessage.html?touser=18252">Private&nbsp;Mail</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Download</b></font></td></tr>
<tr><td align="right">
<a href="ftp://jode.sourceforge.net/pub/jode/">FTP&nbsp;server</a><br>
<a href="http://sourceforge.net/project/filelist.html?group_id=3790">Source&nbsp;releases</a></td></tr>
<tr bgcolor="ffffff"><td align="center"><br>Powered by <br>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.html?group_id=3790&type=1" border=0 width=88 height=31 alt="SourceForge"></a><br>
<br>Best viewed with <br>
<a href="http://www.anybrowser.org/campaign/"><img src="a-logo.gif" border=0 width=88 height=31 alt="Any Browser"></a><br>
</td></tr></table>
</td>
<td valign="top">
<body text=#000000 bgcolor=#FFFFFF>
<table cellpadding=4 cellspacing=1 width=100%
><tr
><td align="left"
><img src="jode-logo.gif" alt="JODE" width=286 height=110
></td
><td align="right"
>Powered by <a href="http://sourceforge.net"><img
src="http://sourceforge.net/sflogo.html?group_id=3790&type=1"
border=0 width=88 height=31 alt="SourceForge"></a><br
>Best viewed with <a
href="http://www.anybrowser.org/campaign/"><img
src="a-logo.gif" border=0 width=88 height=31 alt="Any
Browser"></a><br
></td
></tr
></table>
<table cellspacing=0 cellpadding=3 border=0 bgcolor=#EEEEF8 class="nav">
<tr><td class="nav">
<a href="./"><B>Home</B></a> |
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a> |
<a href="./applet..html">Applet</a> |
<a href="./download..html">Download</a> |
<a href="./faq..html">FAQ</a> |
<a href="./feedback..html">Feedback</a> |
<a href="./usage..html">Documentation</a> |
<a href="./license..html">License</a> |
<a href="./history..html">History</a> |
<a href="./links..html">Links</a> |
<a href="./bluesky..html">Blue&nbsp;Sky</a></td></tr>
</table><br>
<h1>License</h1>
<p><i>JODE</i> is Copyright &copy; 1998-2000 by Jochen Hoenicke. <br><br>
This program is free software; you can redistribute it and/or modify
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the <a
href="http://www.gnu.org/copyleft/gpl.html">GNU General Public
License</a> as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.<br><br>
version 2 of the License, or (at your option) any later version.</p>
This program is distributed in the hope that it will be useful,
<p>This program is distributed in the hope that it will be useful,
but <b>without any warranty</b>; without even the implied warranty of
<b>merchantability</b> or <b>fitness for a particular purpose</b>. See the
GNU General Public License for more details.
GNU General Public License for more details.</p>
</td></tr>
</table>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
<TABLE class=footer width="100%" border="0" cellspacing="0" cellpadding="2">
<TR>
<TD align="center"><FONT color="#ffffff"><SPAN class="titlebar">
<TD align="center"><SPAN class=footer>
All trademarks and copyrights on this page are properties of their respective owners. <br>
Last updated on 8-May-2000,
Copyright &copy; 1998-2000 by Jochen Hoenicke.</SPAN></FONT>
Last updated on 27-May-2001,
Copyright &copy; 1998-2001 by Jochen Hoenicke.
Canonic URL is <a class=boldlink href="http://jode.sourceforge.net/">http://jode.sourceforge.net/</a></SPAN>
</TD>
</TR>
</TABLE>

@ -1,15 +1,16 @@
<?php require("header.inc"); ?>
<h1>License</h1>
<p><i>JODE</i> is Copyright &copy; 1998-2000 by Jochen Hoenicke. <br><br>
This program is free software; you can redistribute it and/or modify
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the <a
href="http://www.gnu.org/copyleft/gpl.html">GNU General Public
License</a> as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.<br><br>
version 2 of the License, or (at your option) any later version.</p>
This program is distributed in the hope that it will be useful,
<p>This program is distributed in the hope that it will be useful,
but <b>without any warranty</b>; without even the implied warranty of
<b>merchantability</b> or <b>fitness for a particular purpose</b>. See the
GNU General Public License for more details.
GNU General Public License for more details.</p>
<?php require("footer.inc"); ?>

@ -2,51 +2,56 @@
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="date" content="2000-06-30">
<meta name="date" content="2001-05-27">
<meta name="description" content="JODE - Java Optimize and Decompile Environment.">
<meta name="author" content="Jochen Hoenicke">
<meta name="keywords" content="jode, java, decompiler, obfuscator, deobfuscator, reverse engineering, free, GPL">
<style type="text/css">
<!--
body { color:#000000; background-color: #FFFFFF; }
.nav { font-family: Helvetica, Arial, sans-serif; font-weight: bold;
color:#000000; background-color: #EEEEF8; }
.footer { color:#FFFFFF; background-color: #737B9C; }
.boldlink { font-weight:bold; text-decoration: none; color:#FFFFFF; }
//-->
</style>
</head>
<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=4 cellspacing=1 width=100%>
<tr><td>
</td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<table cellspacing=0 cellpadding=3 width=100% border=0 bgcolor=eeeef8>
<tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Jode</b></font></td></tr>
<tr><td align="right">
<a href="./"><B>Home</B></a><br>
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a><br>
<br>
<a href="./applet.html">Applet</a><br>
<a href="./download.html">Download</a><br>
<a href="./usage.html">Documentation</a><br>
<a href="./license.html">License</a><br>
<a href="./history.html">History</a><br>
<a href="./links.html">Links</a><br>
<a href="./bluesky.html">Blue&nbsp;Sky</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Feedback</b></font></td></tr>
<tr><td align="right">
<a href="http://sourceforge.net/bugs/?group_id=3790">Bug&nbsp;Tracking</a><br>
<a href="http://sourceforge.net/forum/?group_id=3790">Public&nbsp;Forums</a><br>
<a href="http://lists.sourceforge.net/mailman/listinfo/jode-users">Mailing&nbsp;List</a><br>
<a href="http://sourceforge.net/sendmessage.html?touser=18252">Private&nbsp;Mail</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Download</b></font></td></tr>
<tr><td align="right">
<a href="ftp://jode.sourceforge.net/pub/jode/">FTP&nbsp;server</a><br>
<a href="http://sourceforge.net/project/filelist.html?group_id=3790">Source&nbsp;releases</a></td></tr>
<tr bgcolor="ffffff"><td align="center"><br>Powered by <br>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.html?group_id=3790&type=1" border=0 width=88 height=31 alt="SourceForge"></a><br>
<br>Best viewed with <br>
<a href="http://www.anybrowser.org/campaign/"><img src="a-logo.gif" border=0 width=88 height=31 alt="Any Browser"></a><br>
</td></tr></table>
</td>
<td valign="top">
<body text=#000000 bgcolor=#FFFFFF>
<table cellpadding=4 cellspacing=1 width=100%
><tr
><td align="left"
><img src="jode-logo.gif" alt="JODE" width=286 height=110
></td
><td align="right"
>Powered by <a href="http://sourceforge.net"><img
src="http://sourceforge.net/sflogo.html?group_id=3790&type=1"
border=0 width=88 height=31 alt="SourceForge"></a><br
>Best viewed with <a
href="http://www.anybrowser.org/campaign/"><img
src="a-logo.gif" border=0 width=88 height=31 alt="Any
Browser"></a><br
></td
></tr
></table>
<table cellspacing=0 cellpadding=3 border=0 bgcolor=#EEEEF8 class="nav">
<tr><td class="nav">
<a href="./"><B>Home</B></a> |
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a> |
<a href="./applet..html">Applet</a> |
<a href="./download..html">Download</a> |
<a href="./faq..html">FAQ</a> |
<a href="./feedback..html">Feedback</a> |
<a href="./usage..html">Documentation</a> |
<a href="./license..html">License</a> |
<a href="./history..html">History</a> |
<a href="./links..html">Links</a> |
<a href="./bluesky..html">Blue&nbsp;Sky</a></td></tr>
</table><br>
<h1><i>JODE</i> Links</h1>
<h3>Other decompilers</h3>
<ul>
@ -100,20 +105,21 @@ href="http://jedit.standmed.com/plugins/JavaInsight">JavaInsight plugin</a> for
</dd>
<dt><a name="collections">Collection Classes</a>:</dt>
<dd>I have written a small script that puts the collection classes
from the <a href="http://www.classpath.org">GNU Classpath Project</a> into
its own package (<code>org.gnu.java.util.collections</code>). You can
download the <a href="http://www.informatik.uni-oldenburg.de/~delwi/jode/collections.tar.gz">source code</a> (including
the script), or <a href="collections.jar">a precompiled jar file</a>.
from the <a href="http://www.classpath.org">GNU Classpath Project</a>
into its own package (<code>gnu.java.util.collections</code>). This
script is now part of GNU classpath. For your convenience I have put a
precompiled <a
href="http://www.informatik.uni-oldenburg.de/~delwi/jode/collections.jar">jar
file</a> on this server.
</dd>
</dl>
</td></tr>
</table>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
<TABLE class=footer width="100%" border="0" cellspacing="0" cellpadding="2">
<TR>
<TD align="center"><FONT color="#ffffff"><SPAN class="titlebar">
<TD align="center"><SPAN class=footer>
All trademarks and copyrights on this page are properties of their respective owners. <br>
Last updated on 8-May-2000,
Copyright &copy; 1998-2000 by Jochen Hoenicke.</SPAN></FONT>
Last updated on 27-May-2001,
Copyright &copy; 1998-2001 by Jochen Hoenicke.
Canonic URL is <a class=boldlink href="http://jode.sourceforge.net/">http://jode.sourceforge.net/</a></SPAN>
</TD>
</TR>
</TABLE>

@ -52,10 +52,12 @@ href="http://jedit.standmed.com/plugins/JavaInsight">JavaInsight plugin</a> for
</dd>
<dt><a name="collections">Collection Classes</a>:</dt>
<dd>I have written a small script that puts the collection classes
from the <a href="http://www.classpath.org">GNU Classpath Project</a> into
its own package (<code>org.gnu.java.util.collections</code>). You can
download the <a href="http://www.informatik.uni-oldenburg.de/~delwi/jode/collections.tar.gz">source code</a> (including
the script), or <a href="collections.jar">a precompiled jar file</a>.
from the <a href="http://www.classpath.org">GNU Classpath Project</a>
into its own package (<code>gnu.java.util.collections</code>). This
script is now part of GNU classpath. For your convenience I have put a
precompiled <a
href="http://www.informatik.uni-oldenburg.de/~delwi/jode/collections.jar">jar
file</a> on this server.
</dd>
</dl>
<?php require("footer.inc"); ?>

@ -1,115 +1,47 @@
<?php
$menu = array(
"Jode",
array("<B>Home</B>" , "selflink", "jode",
$menu =
array("<B>Home</B>" , "selflink", "index",
"Project page" , "sflink", "project/",
"-", "-", "-",
"Applet" , "selflink", "applet",
"Download" , "selflink", "download",
"FAQ" , "selflink", "faq",
"Feedback" , "selflink", "feedback",
"Documentation", "selflink", "usage",
"License" , "selflink", "license",
"History" , "selflink", "history",
"Links" , "selflink", "links",
"Blue Sky" , "selflink", "bluesky"),
"Feedback",
array("Bug Tracking" , "sflink", "bugs/",
"Public Forums" , "sflink", "forum/",
"Mailing List" , "link",
"http://lists.sourceforge.net/mailman/listinfo/jode-users",
"Private Mail" , "link",
"http://sourceforge.net/sendmessage.php?touser=18252"),
"Download",
array("FTP server", "link", "ftp://jode.sourceforge.net/pub/jode/",
"Source releases", "sflink", "project/filelist.php"));
$images = array(
"Powered by ", "http://sourceforge.net/sflogo.php?group_id=3790&type=1",
"SourceForge", "http://sourceforge.net",
"Best viewed with ", "a-logo.gif",
"Any Browser", "http://www.anybrowser.org/campaign/");
if (eregi("^Lynx", $HTTP_USER_AGENT)) {
reset($menu);
while (list($dummy, $header) = each($menu)) {
list($dummy, $subitems) = each($menu);
echo "<b>$header:</b>\n";
reset($subitems);
while (list($dummy, $name) = each($subitems)) {
list($dummy, $type) = each($subitems);
list($dummy, $link) = each($subitems);
if ($type == "selflink") {
selflink($link);
} else if ($type == "sflink") {
sflink($link);
} else if ($type == "-") {
echo "<br>\n";
continue;
} else if ($type == "link") {
echo "<a href=\"$link\">";
}
$name = ereg_replace(" ", "&nbsp;", $name);
echo "$name</a>";
if (current($subitems)) {
echo " |\n";
}
}
echo "<br>\n\n";
}
echo "<right>\n";
reset($images);
while (list($dummy, $label) = each($images)) {
list($dummy, $src) = each($images);
list($dummy, $alt) = each($images);
list($dummy, $link) = each($images);
echo "$label<a href=\"$link\"><img src=\"$src\" border=0";
echo " width=88 height=31 alt=\"$alt\"></a>\n";
}
echo "</right>\n";
} else {
echo "<table cellspacing=0 cellpadding=3 width=100%";
echo " border=0 bgcolor=eeeef8>\n";
"Blue Sky" , "selflink", "bluesky");
?>
reset($menu);
while (list($dummy, $header) = each($menu)) {
list($dummy, $subitems) = each($menu);
echo "<tr bgcolor=\"7272cc\">\n<td align=\"center\">";
echo "<font color=\"ffffff\"><b>$header</b></font></td></tr>\n";
echo "<tr><td align=\"right\">\n";
reset($subitems);
while (list($dummy, $name) = each($subitems)) {
list($dummy, $type) = each($subitems);
list($dummy, $link) = each($subitems);
if ($type == "selflink") {
selflink($link);
} else if ($type == "sflink") {
sflink($link);
} else if ($type == "-") {
echo "<br>\n";
continue;
} else if ($type == "link") {
echo "<a href=\"$link\">";
}
$name = ereg_replace(" ", "&nbsp;", $name);
<table cellspacing=0 cellpadding=3 border=0 bgcolor=#EEEEF8 class="nav">
<tr><td class="nav">
<?php
reset($menu);
$self = ereg_replace("^.*/", "", $PHP_SELF);
while (list($dummy, $name) = each($menu)) {
list($dummy, $type) = each($menu);
list($dummy, $link) = each($menu);
$name = ereg_replace(" ", "&nbsp;", $name);
if ($type == "selflink") {
if ($self == "$link.$extension") {
echo "$name";
} else {
selflink($link);
echo "$name</a>";
if (current($subitems)) {
echo "<br>\n";
}
}
} else if ($type == "sflink") {
sflink($link);
echo "$name</a>";
} else if ($type == "-") {
echo "<br>\n";
continue;
} else if ($type == "link") {
echo "<a href=\"$link\">$name</a>";
}
echo "</td></tr>\n";
echo "<tr bgcolor=\"ffffff\"><td align=\"center\">";
reset($images);
while (list($dummy, $label) = each($images)) {
list($dummy, $src) = each($images);
list($dummy, $alt) = each($images);
list($dummy, $link) = each($images);
echo "<br>$label<br>\n";
echo "<a href=\"$link\"><img src=\"$src\" border=0";
echo " width=88 height=31 alt=\"$alt\"></a><br>\n";
if (current($menu)) {
echo " |\n";
}
echo "</td></tr></table>\n";
}
?>
</td></tr>
</table><br>

@ -2,73 +2,80 @@
<html>
<head>
<title>Java Optimize and Decompile Environment (JODE)</title>
<meta name="date" content="2000-06-30">
<meta name="date" content="2001-05-27">
<meta name="description" content="JODE - Java Optimize and Decompile Environment.">
<meta name="author" content="Jochen Hoenicke">
<meta name="keywords" content="jode, java, decompiler, obfuscator, deobfuscator, reverse engineering, free, GPL">
<style type="text/css">
<!--
body { color:#000000; background-color: #FFFFFF; }
.nav { font-family: Helvetica, Arial, sans-serif; font-weight: bold;
color:#000000; background-color: #EEEEF8; }
.footer { color:#FFFFFF; background-color: #737B9C; }
.boldlink { font-weight:bold; text-decoration: none; color:#FFFFFF; }
//-->
</style>
</head>
<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellpadding=4 cellspacing=1 width=100%>
<tr><td>
</td>
<td> <img src="jode-logo.gif" alt="JODE" width=286 height=110></td>
</tr>
<tr>
<td valign="top">
<table cellspacing=0 cellpadding=3 width=100% border=0 bgcolor=eeeef8>
<tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Jode</b></font></td></tr>
<tr><td align="right">
<a href="./"><B>Home</B></a><br>
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a><br>
<br>
<a href="./applet.html">Applet</a><br>
<a href="./download.html">Download</a><br>
<a href="./usage.html">Documentation</a><br>
<a href="./license.html">License</a><br>
<a href="./history.html">History</a><br>
<a href="./links.html">Links</a><br>
<a href="./bluesky.html">Blue&nbsp;Sky</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Feedback</b></font></td></tr>
<tr><td align="right">
<a href="http://sourceforge.net/bugs/?group_id=3790">Bug&nbsp;Tracking</a><br>
<a href="http://sourceforge.net/forum/?group_id=3790">Public&nbsp;Forums</a><br>
<a href="http://lists.sourceforge.net/mailman/listinfo/jode-users">Mailing&nbsp;List</a><br>
<a href="http://sourceforge.net/sendmessage.html?touser=18252">Private&nbsp;Mail</a><tr bgcolor="7272cc">
<td align="center"><font color="ffffff"><b>Download</b></font></td></tr>
<tr><td align="right">
<a href="ftp://jode.sourceforge.net/pub/jode/">FTP&nbsp;server</a><br>
<a href="http://sourceforge.net/project/filelist.html?group_id=3790">Source&nbsp;releases</a></td></tr>
<tr bgcolor="ffffff"><td align="center"><br>Powered by <br>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.html?group_id=3790&type=1" border=0 width=88 height=31 alt="SourceForge"></a><br>
<br>Best viewed with <br>
<a href="http://www.anybrowser.org/campaign/"><img src="a-logo.gif" border=0 width=88 height=31 alt="Any Browser"></a><br>
</td></tr></table>
</td>
<td valign="top">
<body text=#000000 bgcolor=#FFFFFF>
<table cellpadding=4 cellspacing=1 width=100%
><tr
><td align="left"
><img src="jode-logo.gif" alt="JODE" width=286 height=110
></td
><td align="right"
>Powered by <a href="http://sourceforge.net"><img
src="http://sourceforge.net/sflogo.html?group_id=3790&type=1"
border=0 width=88 height=31 alt="SourceForge"></a><br
>Best viewed with <a
href="http://www.anybrowser.org/campaign/"><img
src="a-logo.gif" border=0 width=88 height=31 alt="Any
Browser"></a><br
></td
></tr
></table>
<table cellspacing=0 cellpadding=3 border=0 bgcolor=#EEEEF8 class="nav">
<tr><td class="nav">
<a href="./"><B>Home</B></a> |
<a href="http://sourceforge.net/project/?group_id=3790">Project&nbsp;page</a> |
<a href="./applet..html">Applet</a> |
<a href="./download..html">Download</a> |
<a href="./faq..html">FAQ</a> |
<a href="./feedback..html">Feedback</a> |
<a href="./usage..html">Documentation</a> |
<a href="./license..html">License</a> |
<a href="./history..html">History</a> |
<a href="./links..html">Links</a> |
<a href="./bluesky..html">Blue&nbsp;Sky</a></td></tr>
</table><br>
<a name="decompiler">
<h1>Using the Decompiler</h1></a>
After you have <a href="./download.html">downloaded</a> the necessary
packages, put them into your <tt>CLASSPATH</tt>:
<p>After you have <a href="./download..html">downloaded</a> the jar archive
put it into your <tt>CLASSPATH</tt>. The package
<tt>swingall.jar</tt> is also needed if you are using JDK 1.1.</p>
<ul><li>Under Windows you have to start a MSDOS session and type
something like:
<pre>
set CLASSPATH=C:\download\jode-xxx.jar;C:\swing\swingall.jar
set CLASSPATH=C:\download\jode-1.1.jar;C:\swing\swingall.jar
</pre>
</li><li>Under Unix you start a shell and type (for bourne shell):
<pre>export CLASSPATH=/tmp/jode-xxx.jar:/usr/local/swing/swingall.jar</pre>
<li>Under Unix you start a shell and type (for bourne shell):
<pre>export CLASSPATH=/tmp/jode-1.1.jar:/usr/local/swing/swingall.jar</pre>
or for csh:
<pre>setenv CLASSPATH /tmp/jode-xxx.jar:/usr/local/swing/swingall.jar</pre>
<pre>setenv CLASSPATH /tmp/jode-1.1.jar:/usr/local/swing/swingall.jar</pre>
</ul>
<br>
There is also a batch file for windows and a script file for unix,
that you can use. Adapt the CLASSPATH in the file and put it to a
convenient location.
that you can use. You can extract it with the following command:
<pre>
jar -xvf jode-xxx.jar bin/jode.bat <i>resp.</i> bin/jode
jar -xvf jode-1.1-jdk1.1.jar bin/jode.bat <i>resp.</i> bin/jode
</pre>
Edit the file to adapt it to your paths and put it to a convenient location.
<a name="cmdline"><h3>Command Line Interface</h3></a>
@ -81,10 +88,17 @@ following command will give a complete list of the available commands:
<pre>java jode.decompiler.Main --help</pre>
If you want to decompile a jar package you can do it this way:
<pre>java jode.decompiler.Main --dest srcdir program.jar</pre>
If you have installed the batch file/script, you can use it like this:
<pre>jode --dest srcdir program.jar</pre>
<a name="awt"><h3>AWT Interface</h3></a>
The AWT Interface looks exactly like the <a href="./applet.html">applet</a>. In fact the applet uses the AWT Interface. You start it
after setting the <tt>CLASSPATH</tt> (see <a href="./usage.html#decompiler">above</a>), with
The AWT Interface looks exactly like the <a href="./applet..html">applet</a>. In fact the applet uses the AWT Interface. You start it
after setting the <tt>CLASSPATH</tt> (see <a href="./usage..html#decompiler">above</a>), with
<pre>java jode.decompiler.Window</pre>
@ -97,44 +111,45 @@ appear. You can save it via the <code>save</code> button.
<a name="swing"><h3>Swing Interface</h3></a>
For the swing interface you need java version 1.2 or the separately
available swing package (see <a href="./links.html#swing">link
page</a>. You can invoke it like this:
available swing package (see <a href="./links..html#swing">link
page</a>. You can invoke it with the following command:
<pre>
java jode.swingui.Main --classpath classes.jar
java jode.swingui.Main classes.jar
<i>resp.</i> jode swi classes.jar
</pre>
The swing interface will show the package hierarchie of all classes
<p>The swing interface will show the package hierarchie of all classes
in the classpath on the left side. You can now select a class and the
decompiled code will appear on the right side. Via the menu, you may
change the classpath or switch between package hierarchie tree and
class inheritence tree.<br>
class inheritence tree.</p>
The swing interface is very useful to browse through class files if
<p>The swing interface is very useful to browse through class files if
you don't have the source code. You can also use it to trace bugs in
library code. It is not meant to generate <tt>java</tt> files and so
you won't find a save option there.<br>
you won't find a save option there.</p>
<a name="java"><h3>Java Interface</h3></a>
If you want to integrate <i>JODE</i> into your own java program, you
can use the <a
<p>If you want to integrate <i>JODE</i> into your own java program,
you can use the <a
href="Decompiler.java"><code>jode.decompiler.Decompiler</code></a>
class. Note that the GPL only allows you to integrate <i>JODE</i>
into GPL programs. Please contact me if you use <i>JODE</i> in this
way.<br>
into GPL programs. Please tell me if you use <i>JODE</i> in this
way.</p>
You may use this <a
<p>You may use this <a
href="ftp://jode.sourceforge.net/pub/jode/jode-embedded.jar">stripped
down jar archive</a> containing all necessary classes.
down jar archive</a> containing all necessary classes.</p>
<a name="optimizer"><h1>Using the Obfuscator</h1>
To use the obfuscator you should first create a script file, say <a
<p>To use the obfuscator you should first create a script file, say <a
href="myproject.jos"><tt>myproject.jos</tt></a>. Then you can invoke the
obfuscator with:
<pre>
java jode.obfuscator.Main myproject.jos
</pre>
</pre></p>
<p>The script file should contain the following options: </p>
@ -265,14 +280,13 @@ change the bytecode interface.</p>
<pre>
post = new LocalOptimizer, new RemovePopAnalyzer
</pre>
</td></tr>
</table>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
<TABLE class=footer width="100%" border="0" cellspacing="0" cellpadding="2">
<TR>
<TD align="center"><FONT color="#ffffff"><SPAN class="titlebar">
<TD align="center"><SPAN class=footer>
All trademarks and copyrights on this page are properties of their respective owners. <br>
Last updated on 8-May-2000,
Copyright &copy; 1998-2000 by Jochen Hoenicke.</SPAN></FONT>
Last updated on 27-May-2001,
Copyright &copy; 1998-2001 by Jochen Hoenicke.
Canonic URL is <a class=boldlink href="http://jode.sourceforge.net/">http://jode.sourceforge.net/</a></SPAN>
</TD>
</TR>
</TABLE>

@ -9,26 +9,28 @@
*/ ?>
<a name="decompiler">
<h1>Using the Decompiler</h1></a>
After you have <?php selflink("download") ?>downloaded</a> the necessary
packages, put them into your <tt>CLASSPATH</tt>:
<p>After you have <?php selflink("download") ?>downloaded</a> the jar archive
put it into your <tt>CLASSPATH</tt>. The package
<tt>swingall.jar</tt> is also needed if you are using JDK 1.1.</p>
<ul><li>Under Windows you have to start a MSDOS session and type
something like:
<pre>
set CLASSPATH=C:\download\jode-xxx.jar;C:\swing\swingall.jar
set CLASSPATH=C:\download\jode-<?php echo "$version"?>.jar;C:\swing\swingall.jar
</pre>
</li><li>Under Unix you start a shell and type (for bourne shell):
<pre>export CLASSPATH=/tmp/jode-xxx.jar:/usr/local/swing/swingall.jar</pre>
<li>Under Unix you start a shell and type (for bourne shell):
<pre>export CLASSPATH=/tmp/jode-<?php echo "$version"?>.jar:/usr/local/swing/swingall.jar</pre>
or for csh:
<pre>setenv CLASSPATH /tmp/jode-xxx.jar:/usr/local/swing/swingall.jar</pre>
<pre>setenv CLASSPATH /tmp/jode-<?php echo "$version"?>.jar:/usr/local/swing/swingall.jar</pre>
</ul>
<br>
There is also a batch file for windows and a script file for unix,
that you can use. Adapt the CLASSPATH in the file and put it to a
convenient location.
that you can use. You can extract it with the following command:
<pre>
jar -xvf jode-xxx.jar bin/jode.bat <i>resp.</i> bin/jode
jar -xvf jode-<?php echo "$version-jdk1.1"?>.jar bin/jode.bat <i>resp.</i> bin/jode
</pre>
Edit the file to adapt it to your paths and put it to a convenient location.
<a name="cmdline"><h3>Command Line Interface</h3></a>
@ -41,6 +43,13 @@ following command will give a complete list of the available commands:
<pre>java jode.decompiler.Main --help</pre>
If you want to decompile a jar package you can do it this way:
<pre>java jode.decompiler.Main --dest srcdir program.jar</pre>
If you have installed the batch file/script, you can use it like this:
<pre>jode --dest srcdir program.jar</pre>
<a name="awt"><h3>AWT Interface</h3></a>
The AWT Interface looks exactly like the <?php selflink("applet") ?>
@ -60,43 +69,44 @@ appear. You can save it via the <code>save</code> button.
For the swing interface you need java version 1.2 or the separately
available swing package (see <?php selflink("links#swing") ?>link
page</a>. You can invoke it like this:
page</a>. You can invoke it with the following command:
<pre>
java jode.swingui.Main --classpath classes.jar
java jode.swingui.Main classes.jar
<i>resp.</i> jode swi classes.jar
</pre>
The swing interface will show the package hierarchie of all classes
<p>The swing interface will show the package hierarchie of all classes
in the classpath on the left side. You can now select a class and the
decompiled code will appear on the right side. Via the menu, you may
change the classpath or switch between package hierarchie tree and
class inheritence tree.<br>
class inheritence tree.</p>
The swing interface is very useful to browse through class files if
<p>The swing interface is very useful to browse through class files if
you don't have the source code. You can also use it to trace bugs in
library code. It is not meant to generate <tt>java</tt> files and so
you won't find a save option there.<br>
you won't find a save option there.</p>
<a name="java"><h3>Java Interface</h3></a>
If you want to integrate <i>JODE</i> into your own java program, you
can use the <a
<p>If you want to integrate <i>JODE</i> into your own java program,
you can use the <a
href="Decompiler.java"><code>jode.decompiler.Decompiler</code></a>
class. Note that the GPL only allows you to integrate <i>JODE</i>
into GPL programs. Please contact me if you use <i>JODE</i> in this
way.<br>
into GPL programs. Please tell me if you use <i>JODE</i> in this
way.</p>
You may use this <a
<p>You may use this <a
href="ftp://jode.sourceforge.net/pub/jode/jode-embedded.jar">stripped
down jar archive</a> containing all necessary classes.
down jar archive</a> containing all necessary classes.</p>
<a name="optimizer"><h1>Using the Obfuscator</h1>
To use the obfuscator you should first create a script file, say <a
<p>To use the obfuscator you should first create a script file, say <a
href="myproject.jos"><tt>myproject.jos</tt></a>. Then you can invoke the
obfuscator with:
<pre>
java jode.obfuscator.Main myproject.jos
</pre>
</pre></p>
<p>The script file should contain the following options: </p>

@ -617,9 +617,6 @@ public class ClassInfo extends BinaryInfo {
String message = ex.getMessage();
if ((howMuch & ~(FIELDS|METHODS|HIERARCHY
|INNERCLASSES|OUTERCLASSES)) != 0) {
GlobalOptions.err.println
("Can't read class " + name + ".");
ex.printStackTrace(GlobalOptions.err);
throw new NoClassDefFoundError(name);
}
// Try getting the info through the reflection interface

@ -54,8 +54,7 @@ public class MethodInfo extends BinaryInfo {
if ((howMuch & KNOWNATTRIBS) != 0 && name.equals("Code")) {
bytecode = new BytecodeInfo(this);
bytecode.read(cp, input);
} else if ((howMuch & KNOWNATTRIBS) != 0
&& name.equals("Exceptions")) {
} else if (name.equals("Exceptions")) {
int count = input.readUnsignedShort();
exceptions = new String[count];
for (int i=0; i< count; i++)

@ -57,6 +57,12 @@ public class ClassAnalyzer
* The minimal visible complexity.
*/
private static double STEP_COMPLEXITY = 0.03;
/**
* The value of the strictfp modifier.
* JDK1.1 doesn't define it.
*/
private static int STRICTFP = 0x800;
double methodComplexity = 0.0;
double innerComplexity = 0.0;
@ -126,6 +132,10 @@ public class ClassAnalyzer
return Modifier.isStatic(modifiers);
}
public final boolean isStrictFP() {
return (modifiers & STRICTFP) != 0;
}
public FieldAnalyzer getField(int index) {
return fields[index];
}
@ -231,6 +241,17 @@ public class ClassAnalyzer
staticConstructor = methods[j];
else
constrVector.addElement(methods[j]);
/* Java bytecode can't have strictfp modifier for
* classes, while java can't have strictfp modifier
* for constructors. We handle the difference here.
*
* If only a few constructors are strictfp and the
* methods aren't this would add too much strictfp,
* but that isn't really dangerous.
*/
if (methods[j].isStrictFP())
modifiers |= STRICTFP;
}
methodComplexity += methods[j].getComplexity();
}
@ -400,7 +421,76 @@ public class ClassAnalyzer
public void dumpDeclaration(TabbedPrintWriter writer) throws IOException
{
dumpSource(writer);
dumpDeclaration(writer, null, 0.0, 0.0);
}
public void dumpDeclaration(TabbedPrintWriter writer,
ProgressListener pl, double done, double scale)
throws IOException
{
if (fields == null) {
/* This means that the class could not be loaded.
* give up.
*/
return;
}
writer.startOp(writer.NO_PAREN, 0);
/* Clear the SUPER bit, which is also used as SYNCHRONIZED bit. */
int modifiedModifiers = modifiers & ~(Modifier.SYNCHRONIZED
| STRICTFP);
if (clazz.isInterface())
/* interfaces are implicitily abstract */
modifiedModifiers &= ~Modifier.ABSTRACT;
if (parent instanceof MethodAnalyzer) {
/* method scope classes are implicitly private */
modifiedModifiers &= ~Modifier.PRIVATE;
/* anonymous classes are implicitly final */
if (name == null)
modifiedModifiers &= ~Modifier.FINAL;
}
String modif = Modifier.toString(modifiedModifiers);
if (modif.length() > 0)
writer.print(modif + " ");
if (isStrictFP()) {
/* The STRICTFP modifier is set.
* We handle it, since java.lang.reflect.Modifier is too dumb.
*/
writer.print("strictfp ");
}
/* interface is in modif */
if (!clazz.isInterface())
writer.print("class ");
writer.print(name);
ClassInfo superClazz = clazz.getSuperclass();
if (superClazz != null &&
superClazz != ClassInfo.javaLangObject) {
writer.breakOp();
writer.print(" extends " + (writer.getClassString
(superClazz, Scope.CLASSNAME)));
}
ClassInfo[] interfaces = clazz.getInterfaces();
if (interfaces.length > 0) {
writer.breakOp();
writer.print(clazz.isInterface() ? " extends " : " implements ");
writer.startOp(writer.EXPL_PAREN, 1);
for (int i=0; i < interfaces.length; i++) {
if (i > 0) {
writer.print(", ");
writer.breakOp();
}
writer.print(writer.getClassString
(interfaces[i], Scope.CLASSNAME));
}
writer.endOp();
}
writer.println();
writer.openBraceClass();
writer.tab();
dumpBlock(writer, pl, done, scale);
writer.untab();
writer.closeBraceClass();
}
public void dumpBlock(TabbedPrintWriter writer)
@ -501,6 +591,7 @@ public class ClassAnalyzer
needNewLine = true;
}
writer.popScope();
clazz.dropInfo(clazz.KNOWNATTRIBS | clazz.UNKNOWNATTRIBS);
}
public void dumpSource(TabbedPrintWriter writer)
@ -513,64 +604,8 @@ public class ClassAnalyzer
ProgressListener pl, double done, double scale)
throws IOException
{
if (fields == null) {
/* This means that the class could not be loaded.
* give up.
*/
return;
}
writer.startOp(writer.NO_PAREN, 0);
/* Clear the SUPER bit, which is also used as SYNCHRONIZED bit. */
int modifiedModifiers = modifiers & ~Modifier.SYNCHRONIZED;
if (clazz.isInterface())
/* interfaces are implicitily abstract */
modifiedModifiers &= ~Modifier.ABSTRACT;
if (parent instanceof MethodAnalyzer) {
/* method scope classes are implicitly private */
modifiedModifiers &= ~Modifier.PRIVATE;
/* anonymous classes are implicitly final */
if (name == null)
modifiedModifiers &= ~Modifier.FINAL;
}
String modif = Modifier.toString(modifiedModifiers);
if (modif.length() > 0)
writer.print(modif + " ");
/* interface is in modif */
if (!clazz.isInterface())
writer.print("class ");
writer.print(name);
ClassInfo superClazz = clazz.getSuperclass();
if (superClazz != null &&
superClazz != ClassInfo.javaLangObject) {
writer.breakOp();
writer.print(" extends " + (writer.getClassString
(superClazz, Scope.CLASSNAME)));
}
ClassInfo[] interfaces = clazz.getInterfaces();
if (interfaces.length > 0) {
writer.breakOp();
writer.print(clazz.isInterface() ? " extends " : " implements ");
writer.startOp(writer.EXPL_PAREN, 1);
for (int i=0; i < interfaces.length; i++) {
if (i > 0) {
writer.print(", ");
writer.breakOp();
}
writer.print(writer.getClassString
(interfaces[i], Scope.CLASSNAME));
}
writer.endOp();
}
dumpDeclaration(writer, pl, done, scale);
writer.println();
writer.openBraceClass();
writer.tab();
dumpBlock(writer, pl, done, scale);
writer.untab();
writer.closeBraceClass();
writer.println();
clazz.dropInfo(clazz.KNOWNATTRIBS | clazz.UNKNOWNATTRIBS);
}
public void dumpJavaFile(TabbedPrintWriter writer)
@ -608,7 +643,11 @@ public class ClassAnalyzer
}
public boolean conflicts(String name, int usageType) {
ClassInfo info = clazz;
return conflicts(clazz, name, usageType);
}
private static boolean conflicts(ClassInfo info,
String name, int usageType) {
while (info != null) {
if (usageType == NOSUPERMETHODNAME || usageType == METHODNAME) {
MethodInfo[] minfos = info.getMethods();
@ -636,6 +675,11 @@ public class ClassAnalyzer
if (usageType == NOSUPERFIELDNAME
|| usageType == NOSUPERMETHODNAME)
return false;
ClassInfo[] ifaces = info.getInterfaces();
for (int i = 0; i < ifaces.length; i++)
if (conflicts(ifaces[i], name, usageType))
return true;
info = info.getSuperclass();
}
return false;

@ -57,7 +57,7 @@ public class FieldAnalyzer implements Analyzer {
if (fd.getConstant() != null) {
constant = new ConstOperator(fd.getConstant());
constant.setType(type);
constant.makeInitializer();
constant.makeInitializer(type);
}
}
@ -107,7 +107,7 @@ public class FieldAnalyzer implements Analyzer {
}
analyzedSynthetic();
} else
expr.makeInitializer();
expr.makeInitializer(type);
constant = expr;
return true;

@ -383,8 +383,7 @@ public class LocalInfo implements Declarable {
if (((LocalVarOperator) enum.nextElement()).isWrite())
writes++;
}
if (writes > 1)
return false;
/* FIXME: Check if declaring final is okay */
li.isFinal = true;
return true;
}

@ -19,7 +19,6 @@
package jode.decompiler;
import jode.bytecode.ClassInfo;
import jode.bytecode.SearchPath;
import jode.GlobalOptions;
import java.io.BufferedOutputStream;
@ -103,7 +102,7 @@ public class Main extends Options {
err.println(" -D, --debug=... "+
"use --debug=help for more information.");
err.println("The following options can be turned on or off with `yes' or `no' argument.");
err.println("NOTE: The following options can be turned on or off with `yes' or `no'.");
err.println("The options tagged with (default) are normally on. Omitting the yes/no");
err.println("argument will toggle the option, e.g. --verify is equivalent to --verify=no.");
err.println(" --inner "+
@ -200,13 +199,35 @@ public class Main extends Options {
}
public static void main(String[] params) {
try {
decompile(params);
} catch (ExceptionInInitializerError ex) {
ex.getException().printStackTrace();
} catch (Throwable ex) {
ex.printStackTrace();
}
/* When AWT applications are compiled with insufficient
* classpath the type guessing by reflection code can
* generate an awt thread that will prevent normal
* exiting.
*/
System.exit(0);
}
public static void decompile(String[] params) {
if (params.length == 0) {
usage();
return;
}
String classPath = System.getProperty("java.class.path")
.replace(File.pathSeparatorChar, SearchPath.altPathSeparatorChar);
.replace(File.pathSeparatorChar, Decompiler.altPathSeparatorChar);
String bootClassPath = System.getProperty("sun.boot.class.path");
if (bootClassPath != null)
classPath += Decompiler.altPathSeparatorChar
+ bootClassPath.replace(File.pathSeparatorChar,
Decompiler.altPathSeparatorChar);
String destDir = null;
int importPackageLimit = ImportHandler.DEFAULT_PACKAGE_LIMIT;
@ -337,7 +358,7 @@ public class Main extends Options {
* Lets do him a pleasure and allow this.
*/
ClassInfo.setClassPath(params[i]
+ SearchPath.altPathSeparatorChar
+ Decompiler.altPathSeparatorChar
+ classPath);
Enumeration enum = new ZipFile(params[i]).entries();
while (enum.hasMoreElements()) {

@ -81,6 +81,11 @@ public class MethodAnalyzer implements Scope, ClassDeclarer {
* The minimal visible complexity.
*/
private static double STEP_COMPLEXITY = 0.01;
/**
* The value of the strictfp modifier.
* JDK1.1 doesn't define it.
*/
private static int STRICTFP = 0x800;
/**
* The import handler where we should register our types.
*/
@ -317,6 +322,14 @@ public class MethodAnalyzer implements Scope, ClassDeclarer {
return minfo.isSynthetic();
}
/**
* Checks if this method is strictfp
* @return true, iff this method is synthetic.
*/
public final boolean isStrictFP() {
return (minfo.getModifiers() & STRICTFP) != 0;
}
/**
* Tells if this method is the constructor$xx method generated by jikes.
* @param value true, iff this method is the jikes constructor.
@ -594,7 +607,7 @@ public class MethodAnalyzer implements Scope, ClassDeclarer {
CodeVerifier verifier
= new CodeVerifier(getClazz(), minfo, code);
try {
verifier.verify();
verifier.verify();
} catch (VerifyException ex) {
ex.printStackTrace(GlobalOptions.err);
throw new jode.AssertError("Verification error");
@ -720,7 +733,7 @@ public class MethodAnalyzer implements Scope, ClassDeclarer {
if (synth.getKind() == synth.GETCLASS)
return true;
if (synth.getKind() >= synth.ACCESSGETFIELD
&& synth.getKind() <= synth.ACCESSCONSTRUCTOR
&& synth.getKind() <= synth.ACCESSDUPPUTSTATIC
&& (Options.options & Options.OPTION_INNER) != 0
&& (Options.options & Options.OPTION_ANON) != 0)
return true;
@ -747,10 +760,12 @@ public class MethodAnalyzer implements Scope, ClassDeclarer {
if (isJikesBlockInitializer)
return true;
/* The default constructor must be empty of course */
/* The default constructor must be empty
* and mustn't throw exceptions */
if (getMethodHeader() == null
|| !(getMethodHeader().getBlock() instanceof jode.flow.EmptyBlock)
|| !getMethodHeader().hasNoJumps())
|| !getMethodHeader().hasNoJumps()
|| exceptions.length > 0)
return false;
if (declareAsConstructor
@ -840,6 +855,7 @@ public class MethodAnalyzer implements Scope, ClassDeclarer {
if (isConstructor() && isStatic())
modifiedModifiers &= ~(Modifier.FINAL | Modifier.PUBLIC
| Modifier.PROTECTED | Modifier.PRIVATE);
modifiedModifiers &= ~STRICTFP;
writer.startOp(writer.NO_PAREN, 1);
String delim = "";
@ -848,11 +864,28 @@ public class MethodAnalyzer implements Scope, ClassDeclarer {
delim = " ";
}
String modif = Modifier.toString(modifiedModifiers);
if (modif.length() > 0) {
writer.print(delim + modif);
delim = " ";
}
if (isStrictFP()) {
/* The STRICTFP modifier is set.
* We handle it, since java.lang.reflect.Modifier is too dumb.
*/
/* If STRICTFP is already set for class don't set it for method.
* And don't set STRICTFP for native methods or constructors.
*/
if (!classAnalyzer.isStrictFP()
&& !isConstructor()
&& (modifiedModifiers & Modifier.NATIVE) == 0) {
writer.print(delim + "strictfp");
delim = " ";
}
}
if (isConstructor
&& (isStatic()
|| (classAnalyzer.getName() == null

@ -71,6 +71,7 @@ public class OuterValues
private Expression[] head;
private Vector ovListeners;
private boolean jikesAnonymousInner;
private boolean implicitOuterClass;
/**
* The maximal number of parameters used for outer values.
@ -270,6 +271,17 @@ public class OuterValues
return jikesAnonymousInner;
}
/**
* Javac 1.3 doesn't give an outer class reference for anonymous
* classes that extend inner classes, provided the outer class is
* the normal this parameter. Instead it takes a normal outer
* value parameter for this. This method tells if this is such a
* class.
*/
public boolean isImplicitOuterClass() {
return implicitOuterClass;
}
public void addOuterValueListener(OuterValueListener l) {
if (ovListeners == null)
ovListeners = new Vector();
@ -285,6 +297,10 @@ public class OuterValues
jikesAnonymousInner = value;
}
public void setImplicitOuterClass(boolean value) {
implicitOuterClass = value;
}
private static int countSlots(Expression[] exprs, int length) {
int slots = 0;
for (int i=0; i < length; i++)
@ -346,8 +362,8 @@ public class OuterValues
}
if (jikesAnonymousInner)
sb.append("!jikesAnonymousInner");
if (implicitOuterClass)
sb.append("!implicitOuterClass");
return sb.append("]").toString();
}
}

@ -101,11 +101,8 @@ public class TabbedPrintWriter {
}
public void startOp(int opts, int penalty, int pos) {
if (startPos != -1) {
System.err.println("WARNING: missing breakOp");
Thread.dumpStack();
return;
}
if (startPos != -1)
throw new InternalError("missing breakOp");
startPos = pos;
options = opts;
breakPenalty = penalty;
@ -539,8 +536,9 @@ public class TabbedPrintWriter {
Stack state = new Stack();
int pos = currentLine.length();
while (currentBP.parentBP != null) {
state.push(new Integer(currentBP.options));
state.push(new Integer(currentBP.breakPenalty));
/* We don't want parentheses or unconventional line breaking */
currentBP.options = DONT_BREAK;
currentBP.endPos = pos;
currentBP = currentBP.parentBP;
}
@ -551,8 +549,7 @@ public class TabbedPrintWriter {
Stack state = (Stack) s;
while (!state.isEmpty()) {
int penalty = ((Integer) state.pop()).intValue();
int options = ((Integer) state.pop()).intValue();
startOp(options, penalty);
startOp(DONT_BREAK, penalty);
}
}

@ -32,4 +32,29 @@ public class ArrayStoreOperator extends ArrayLoadOperator
public boolean matches(Operator loadop) {
return loadop instanceof ArrayLoadOperator;
}
public void dumpExpression(TabbedPrintWriter writer)
throws java.io.IOException {
Type arrType = subExpressions[0].getType().getHint();
if (arrType instanceof ArrayType) {
Type elemType = ((ArrayType) arrType).getElementType();
if (!elemType.isOfType(getType())) {
/* We need an explicit widening cast */
writer.print("(");
writer.startOp(writer.EXPL_PAREN, 1);
writer.print("(");
writer.printType(Type.tArray(getType().getHint()));
writer.print(") ");
writer.breakOp();
subExpressions[0].dumpExpression(writer, 700);
writer.print(")");
writer.breakOp();
writer.print("[");
subExpressions[1].dumpExpression(writer, 0);
writer.print("]");
return;
}
}
super.dumpExpression(writer);
}
}

@ -109,7 +109,7 @@ public class ConstOperator extends NoArgOperator {
return false;
}
public void makeInitializer() {
public void makeInitializer(Type type) {
isInitializer = true;
}

@ -48,7 +48,7 @@ public class ConstantArrayOperator extends Operator {
empty = new ConstOperator(emptyVal);
empty.setType(argType);
empty.makeInitializer();
empty.makeInitializer(argType);
initOperands(size);
for (int i=0; i < subExpressions.length; i++)
setSubExpressions(i, empty);
@ -74,7 +74,7 @@ public class ConstantArrayOperator extends Operator {
setType(Type.tSuperType(Type.tArray(value.getType())));
subExpressions[index] = value;
value.parent = this;
value.makeInitializer();
value.makeInitializer(argType);
return true;
}
@ -82,8 +82,9 @@ public class ConstantArrayOperator extends Operator {
return 200;
}
public void makeInitializer() {
isInitializer = true;
public void makeInitializer(Type type) {
if (type.getHint().isOfType(getType()))
isInitializer = true;
}
public Expression simplify() {

@ -208,7 +208,7 @@ public abstract class Expression {
return null;
}
public void makeInitializer() {
public void makeInitializer(Type type) {
}
public boolean isConstant() {

@ -25,6 +25,7 @@ import jode.bytecode.FieldInfo;
import jode.bytecode.ClassInfo;
import jode.bytecode.Reference;
import jode.bytecode.InnerClassInfo;
import jode.bytecode.TypeSignature;
import jode.decompiler.MethodAnalyzer;
import jode.decompiler.ClassAnalyzer;
import jode.decompiler.MethodAnalyzer;
@ -33,6 +34,7 @@ import jode.decompiler.Options;
import jode.decompiler.TabbedPrintWriter;
import jode.decompiler.Scope;
import java.lang.reflect.Modifier;
import @COLLECTIONS@.Collection;
/**
@ -120,6 +122,33 @@ public abstract class FieldOperator extends Operator {
return Type.tType(ref.getType());
}
private static FieldInfo getFieldInfo(ClassInfo clazz,
String name, String type) {
while (clazz != null) {
FieldInfo field = clazz.findField(name, type);
if (field != null)
return field;
ClassInfo[] ifaces = clazz.getInterfaces();
for (int i = 0; i < ifaces.length; i++) {
field = getFieldInfo(ifaces[i], name, type);
if (field != null)
return field;
}
clazz = clazz.getSuperclass();
}
return null;
}
public FieldInfo getFieldInfo() {
ClassInfo clazz;
if (ref.getClazz().charAt(0) == '[')
clazz = ClassInfo.javaLangObject;
else
clazz = TypeSignature.getClassInfo(ref.getClazz());
return getFieldInfo(clazz, ref.getName(), ref.getType());
}
public boolean needsCast(Type type) {
if (type instanceof NullType)
return true;
@ -129,6 +158,37 @@ public abstract class FieldOperator extends Operator {
ClassInfo clazz = ((ClassInterfacesType) classType).getClassInfo();
ClassInfo parClazz = ((ClassInterfacesType) type).getClassInfo();
FieldInfo field = clazz.findField(ref.getName(), ref.getType());
find_field:
while (field == null) {
ClassInfo ifaces[] = clazz.getInterfaces();
for (int i = 0; i < ifaces.length; i++) {
field = ifaces[i].findField(ref.getName(), ref.getType());
if (field != null)
break find_field;
}
clazz = clazz.getSuperclass();
if (clazz == null)
/* Weird, field not existing? */
return false;
field = clazz.findField(ref.getName(), ref.getType());
}
if (Modifier.isPrivate(field.getModifiers()))
return parClazz != clazz;
else if ((field.getModifiers()
& (Modifier.PROTECTED | Modifier.PUBLIC)) == 0) {
/* Field is protected. We need a cast if parClazz is in
* other package than clazz.
*/
int lastDot = clazz.getName().lastIndexOf('.');
if (lastDot == -1
|| lastDot != parClazz.getName().lastIndexOf('.')
|| !(parClazz.getName()
.startsWith(clazz.getName().substring(0,lastDot))))
return true;
}
while (clazz != parClazz && clazz != null) {
FieldInfo[] fields = parClazz.getFields();
for (int i = 0; i < fields.length; i++) {
@ -216,20 +276,8 @@ public abstract class FieldOperator extends Operator {
*/
getField() == null
&& writer.conflicts(fieldName, null,
Scope.NOSUPERFIELDNAME))) {
ClassAnalyzer ana = methodAnalyzer.getClassAnalyzer();
while (ana.getParent() instanceof ClassAnalyzer
&& ana != scope)
ana = (ClassAnalyzer) ana.getParent();
if (ana == scope)
// For a simple outer class we can say this
writer.print("this");
else {
// For a class that owns a method that owns
// us, we have to give the full class name
thisOp.dumpExpression(writer, 950);
}
Scope.NOSUPERFIELDNAME))) {
thisOp.dumpExpression(writer, 950);
writer.breakOp();
writer.print(".");
}

@ -58,6 +58,7 @@ public final class InvokeOperator extends Operator
int methodFlag;
MethodType methodType;
String methodName;
Reference ref;
int skippedArgs;
Type classType;
Type[] hints;
@ -127,6 +128,7 @@ public final class InvokeOperator extends Operator
public InvokeOperator(MethodAnalyzer methodAnalyzer,
int methodFlag, Reference reference) {
super(Type.tUnknown, 0);
this.ref = reference;
this.methodType = Type.tMethod(reference.getType());
this.methodName = reference.getName();
this.classType = Type.tType(reference.getClazz());
@ -166,6 +168,25 @@ public final class InvokeOperator extends Operator
return methodName;
}
private static MethodInfo getMethodInfo(ClassInfo clazz,
String name, String type) {
while (clazz != null) {
MethodInfo method = clazz.findMethod(name, type);
if (method != null)
return method;
clazz = clazz.getSuperclass();
}
return null;
}
public MethodInfo getMethodInfo() {
ClassInfo clazz;
if (ref.getClazz().charAt(0) == '[')
clazz = ClassInfo.javaLangObject;
else
clazz = TypeSignature.getClassInfo(ref.getClazz());
return getMethodInfo(clazz, ref.getName(), ref.getType());
}
public Type getClassType() {
return classType;
}
@ -586,14 +607,20 @@ public final class InvokeOperator extends Operator
synth.getReference());
break;
case SyntheticAnalyzer.ACCESSPUTFIELD:
case SyntheticAnalyzer.ACCESSDUPPUTFIELD:
op = new StoreInstruction
(new PutFieldOperator(methodAnalyzer, false,
synth.getReference()));
if (synth.getKind() == synth.ACCESSDUPPUTFIELD)
((StoreInstruction) op).makeNonVoid();
break;
case SyntheticAnalyzer.ACCESSPUTSTATIC:
case SyntheticAnalyzer.ACCESSDUPPUTSTATIC:
op = new StoreInstruction
(new PutFieldOperator(methodAnalyzer, true,
synth.getReference()));
if (synth.getKind() == synth.ACCESSDUPPUTSTATIC)
((StoreInstruction) op).makeNonVoid();
break;
case SyntheticAnalyzer.ACCESSMETHOD:
op = new InvokeOperator(methodAnalyzer, ACCESSSPECIAL,
@ -636,9 +663,35 @@ public final class InvokeOperator extends Operator
Type realClassType;
if (methodFlag == STATIC)
realClassType = classType;
else {
if (param == 0)
return paramTypes[0] instanceof NullType;
else if (param == 0) {
if (paramTypes[0] instanceof NullType)
return true;
if (!(paramTypes[0] instanceof ClassInterfacesType
&& classType instanceof ClassInterfacesType))
return false;
ClassInfo clazz = ((ClassInterfacesType) classType).getClassInfo();
ClassInfo parClazz
= ((ClassInterfacesType) paramTypes[0]).getClassInfo();
MethodInfo method = getMethodInfo();
if (method == null)
/* This is a NoSuchMethodError */
return false;
if (Modifier.isPrivate(method.getModifiers()))
return parClazz != clazz;
else if ((method.getModifiers()
& (Modifier.PROTECTED | Modifier.PUBLIC)) == 0) {
/* Method is protected. We need a cast if parClazz is in
* other package than clazz.
*/
int lastDot = clazz.getName().lastIndexOf('.');
if (lastDot != parClazz.getName().lastIndexOf('.')
|| !(parClazz.getName()
.startsWith(clazz.getName().substring(0,lastDot+1))))
return true;
}
return false;
} else {
realClassType = paramTypes[0];
}
@ -731,6 +784,7 @@ public final class InvokeOperator extends Operator
int arg = 1;
int length = subExpressions.length;
boolean jikesAnonymousInner = false;
boolean implicitOuterClass = false;
if ((Options.options & Options.OPTION_ANON) != 0
&& clazzAna != null
@ -739,6 +793,7 @@ public final class InvokeOperator extends Operator
OuterValues ov = clazzAna.getOuterValues();
arg += ov.getCount();
jikesAnonymousInner = ov.isJikesAnonymousInner();
implicitOuterClass = ov.isImplicitOuterClass();
for (int i=1; i< arg; i++) {
Expression expr = subExpressions[i];
@ -768,7 +823,9 @@ public final class InvokeOperator extends Operator
if ((Options.options & Options.OPTION_INNER) != 0
&& outer != null && outer.outer != null && outer.name != null
&& !Modifier.isStatic(outer.modifiers)) {
&& !Modifier.isStatic(outer.modifiers)
&& !implicitOuterClass
&& arg < length) {
Expression outerExpr = jikesAnonymousInner
? subExpressions[--length]
@ -830,6 +887,7 @@ public final class InvokeOperator extends Operator
boolean qualifiedNew = false;
boolean jikesAnonymousInner = false;
boolean implicitOuterClass = false;
/* Check if this is an anonymous constructor. In this case
@ -851,6 +909,7 @@ public final class InvokeOperator extends Operator
OuterValues ov = clazzAna.getOuterValues();
arg += ov.getCount();
jikesAnonymousInner = ov.isJikesAnonymousInner();
implicitOuterClass = ov.isImplicitOuterClass();
if (outer.name == null) {
/* This is an anonymous class */
@ -893,47 +952,54 @@ public final class InvokeOperator extends Operator
(Options.OPTION_INNER
| Options.OPTION_CONTRAFO)) == 0) {
Expression outerExpr = jikesAnonymousInner
? subExpressions[--length]
if (implicitOuterClass) {
/* Outer class is "this" and is not given
* explicitly. No need to print something.
*/
} else if (arg < length) {
Expression outerExpr = jikesAnonymousInner
? subExpressions[--length]
: subExpressions[arg++];
if (outerExpr instanceof CheckNullOperator) {
CheckNullOperator cno = (CheckNullOperator) outerExpr;
outerExpr = cno.subExpressions[0];
} else if (!(outerExpr instanceof ThisOperator)) {
if (!jikesAnonymousInner)
// Bug in jikes: it doesn't do a check null.
// We don't complain here.
writer.print("MISSING CHECKNULL ");
}
if (outerExpr instanceof CheckNullOperator) {
CheckNullOperator cno = (CheckNullOperator) outerExpr;
outerExpr = cno.subExpressions[0];
} else {
/* We used to complain about MISSING CHECKNULL
* here except for ThisOperators. But javac
* v8 doesn't seem to create CHECKNULL ops.
*/
}
if (outerExpr instanceof ThisOperator) {
Scope scope = writer.getScope
(((ThisOperator) outerExpr).getClassInfo(),
Scope.CLASSSCOPE);
if (writer.conflicts(outer.name, scope, Scope.CLASSNAME)) {
if (outerExpr instanceof ThisOperator) {
Scope scope = writer.getScope
(((ThisOperator) outerExpr).getClassInfo(),
Scope.CLASSSCOPE);
if (writer.conflicts(outer.name, scope, Scope.CLASSNAME)) {
qualifiedNew = true;
outerExpr.dumpExpression(writer, 950);
writer.breakOp();
writer.print(".");
}
} else {
qualifiedNew = true;
outerExpr.dumpExpression(writer, 950);
if (outerExpr.getType() instanceof NullType) {
writer.print("(");
writer.startOp(writer.EXPL_PAREN, 1);
writer.print("(");
writer.printType(Type.tClass
(ClassInfo.forName(outer.outer)));
writer.print(") ");
writer.breakOp();
outerExpr.dumpExpression(writer, 700);
writer.endOp();
writer.print(")");
} else
outerExpr.dumpExpression(writer, 950);
writer.breakOp();
writer.print(".");
}
} else {
qualifiedNew = true;
if (outerExpr.getType() instanceof NullType) {
writer.print("(");
writer.startOp(writer.EXPL_PAREN, 1);
writer.print("(");
writer.printType(Type.tClass
(ClassInfo.forName(outer.outer)));
writer.print(") ");
writer.breakOp();
outerExpr.dumpExpression(writer, 700);
writer.endOp();
writer.print(")");
} else
outerExpr.dumpExpression(writer, 950);
writer.breakOp();
writer.print(".");
}
} else
writer.print("MISSING OUTEREXPR ");
}
if (subExpressions[0] instanceof NewOperator
@ -1062,10 +1128,10 @@ public final class InvokeOperator extends Operator
Scope scope = writer.getScope(thisOp.getClassInfo(),
Scope.CLASSSCOPE);
if (writer.conflicts(methodName, scope, Scope.METHODNAME)
|| (/* This field is inherited from the parent of
|| (/* This method is inherited from the parent of
* an outer class, or it is inherited from the
* parent of this class and there is a conflicting
* field in some outer class.
* method in some outer class.
*/
getMethodAnalyzer() == null
&& (!isThis() ||

@ -19,6 +19,7 @@
package jode.flow;
import jode.expr.ConstOperator;
import jode.type.Type;
/**
* This block represents a case instruction. A case instruction is a
@ -173,8 +174,9 @@ public class CaseBlock extends StructuredBlock {
writer.untab();
}
ConstOperator constOp = new ConstOperator(new Integer(value));
constOp.setType(((SwitchBlock)outer).getInstruction().getType());
constOp.makeInitializer();
Type type = ((SwitchBlock)outer).getInstruction().getType();
constOp.setType(type);
constOp.makeInitializer(type);
writer.print("case " + constOp.toString() + ":");
}
if (subBlock != null) {

@ -116,7 +116,6 @@ public class InstructionBlock extends InstructionContainer {
* change this to a initializing variable declaration.
*/
isDeclaration = true;
storeOp.getSubExpressions()[1].makeInitializer();
declareSet.remove(local);
}
}
@ -144,6 +143,7 @@ public class InstructionBlock extends InstructionContainer {
local.dumpDeclaration(writer);
writer.breakOp();
writer.print(" = ");
store.getSubExpressions()[1].makeInitializer(local.getType());
store.getSubExpressions()[1].dumpExpression(writer.IMPL_PAREN,
writer);
writer.endOp();

@ -33,6 +33,7 @@ public class JsrBlock extends StructuredBlock {
* The inner block that jumps to the subroutine.
*/
StructuredBlock innerBlock;
boolean good = false;
public JsrBlock(Jump subroutine, Jump next) {
innerBlock = new EmptyBlock(subroutine);
@ -40,6 +41,13 @@ public class JsrBlock extends StructuredBlock {
setJump(next);
}
public void setGood(boolean g) {
good = g;
}
public boolean isGood() {
return good;
}
/* The implementation of getNext[Flow]Block is the standard
* implementation */

@ -265,7 +265,6 @@ public class LoopBlock extends StructuredBlock implements BreakableBlock {
* change this to a initializing variable declaration.
*/
isDeclaration = true;
storeOp.getSubExpressions()[1].makeInitializer();
declareSet.remove(local);
}
}
@ -332,6 +331,8 @@ public class LoopBlock extends StructuredBlock implements BreakableBlock {
local.dumpDeclaration(writer);
writer.breakOp();
writer.print(" = ");
store.getSubExpressions()[1]
.makeInitializer(local.getType());
store.getSubExpressions()[1].dumpExpression(writer, 100);
writer.endOp();
} else

@ -41,6 +41,7 @@ MY_JAVA_FILES = \
RetBlock.java \
ReturnBlock.java \
SequentialBlock.java \
SlotSet.java \
SpecialBlock.java \
StructuredBlock.java \
SwitchBlock.java \

@ -148,6 +148,9 @@ public class SpecialBlock extends StructuredBlock {
* to:
* method_invocation()
*
* With java1.3 due to access$ methods the method_invocation can
* already be a non void store instruction.
*
* PUSH arg1
* PUSH arg2
* POP2
@ -174,7 +177,8 @@ public class SpecialBlock extends StructuredBlock {
if (instr.getType().stackSize() == count) {
StructuredBlock newBlock;
if (instr instanceof InvokeOperator) {
if (instr instanceof InvokeOperator
|| instr instanceof StoreInstruction) {
Expression newExpr
= new PopOperator(instr.getType()).addOperand(instr);
prev.setInstruction(newExpr);

@ -33,6 +33,7 @@ import jode.type.MethodType;
import jode.type.Type;
import jode.bytecode.ClassInfo;
import jode.bytecode.InnerClassInfo;
import jode.bytecode.MethodInfo;
import java.util.Vector;
import java.util.Enumeration;
@ -318,6 +319,17 @@ public class TransformConstructors {
}
}
if (minSuperOuter == 1
&& superAna.getParent() instanceof ClassAnalyzer) {
/* Check if this is the implicit Outer Class */
LocalLoadOperator llop = (LocalLoadOperator) subExpr[start];
if (outerValues.getValueBySlot(llop.getLocalInfo().getSlot())
instanceof ThisOperator) {
minSuperOuter = 0;
outerValues.setImplicitOuterClass(true);
}
}
if (minSuperOuter > 0) {
if (superOV == null || superOV.getCount() < minSuperOuter) {
if ((GlobalOptions.debuggingFlags
@ -602,6 +614,24 @@ public class TransformConstructors {
fo.getFieldType()) >= fieldSlot)
return null;
}
if (expr instanceof InvokeOperator) {
/* Don't allow method invocations that can throw a checked
* exception to leave the constructor.
*/
MethodInfo method = ((InvokeOperator) expr).getMethodInfo();
String[] excs = method == null ? null : method.getExceptions();
if (excs != null) {
ClassInfo runtimeException
= ClassInfo.forName("java.lang.RuntimeException");
ClassInfo error = ClassInfo.forName("java.lang.Error");
for (int i = 0; i < excs.length; i++) {
ClassInfo exClass = ClassInfo.forName(excs[i]);
if (!runtimeException.superClassOf(exClass)
&& !error.superClassOf(exClass))
return null;
}
}
}
if (expr instanceof Operator) {
Operator op = (Operator) expr;
Expression[] subExpr = op.getSubExpressions();

@ -205,7 +205,7 @@ public class TransformExceptionHandlers {
* @param tryFlow the FlowBLock of the try block.
* @param subRoutine the FlowBlock of the sub routine.
*/
private void removeBadJSR(FlowBlock tryFlow, StructuredBlock catchBlock,
private void removeJSR(FlowBlock tryFlow, StructuredBlock catchBlock,
FlowBlock subRoutine) {
Jump nextJump;
for (Jump jumps = tryFlow.getJumps(subRoutine);
@ -215,18 +215,27 @@ public class TransformExceptionHandlers {
nextJump = jumps.next;
if (prev instanceof EmptyBlock
&& prev.outer instanceof JsrBlock) {
JsrBlock jsr = (JsrBlock) prev.outer;
if (prev.outer == catchBlock) {
/* This is the mandatory jsr in the catch block */
continue;
}
/* We have a JSR to the subroutine, which is badly placed.
* We complain here.
*/
DescriptionBlock msg
= new DescriptionBlock("ERROR: JSR FINALLY BLOCK!");
tryFlow.removeSuccessor(jumps);
prev.removeJump();
msg.replace(prev.outer);
if (jsr.isGood()) {
StructuredBlock next = jsr.getNextBlock();
jsr.removeBlock();
if (next instanceof ReturnBlock)
removeReturnLocal((ReturnBlock) next);
} else {
/* We have a JSR to the subroutine, which is badly placed.
* We complain here.
*/
DescriptionBlock msg
= new DescriptionBlock("ERROR: JSR FINALLY BLOCK!");
msg.replace(prev.outer);
}
} else {
/* We have a jump to the subroutine, that is wrong.
* We complain here.
@ -331,18 +340,15 @@ public class TransformExceptionHandlers {
StructuredBlock pred = skipFinExitChain(prev);
if (pred instanceof JsrBlock) {
StructuredBlock jsrInner = ((JsrBlock) pred).innerBlock;
JsrBlock jsr = (JsrBlock) pred;
StructuredBlock jsrInner = jsr.innerBlock;
if (jsrInner instanceof EmptyBlock
&& jsrInner.jump != null
&& jsrInner.jump.destination == subRoutine) {
/* The jump is preceeded by the right jsr. Remove
* the jsr.
/* The jump is preceeded by the right jsr. Mark the
* jsr as good.
*/
tryFlow.removeSuccessor(jsrInner.jump);
jsrInner.removeJump();
pred.removeBlock();
if (prev instanceof ReturnBlock)
removeReturnLocal((ReturnBlock) prev);
jsr.setGood(true);
continue;
}
}
@ -388,7 +394,7 @@ public class TransformExceptionHandlers {
}
}
if (tryFlow.getSuccessors().contains(subRoutine))
removeBadJSR(tryFlow, catchBlock, subRoutine);
removeJSR(tryFlow, catchBlock, subRoutine);
}
private void checkAndRemoveMonitorExit(FlowBlock tryFlow,
@ -420,7 +426,8 @@ public class TransformExceptionHandlers {
}
StructuredBlock pred = skipFinExitChain(prev);
if (pred instanceof JsrBlock) {
StructuredBlock jsrInner = ((JsrBlock) pred).innerBlock;
JsrBlock jsr = (JsrBlock) pred;
StructuredBlock jsrInner = jsr.innerBlock;
if (jsrInner instanceof EmptyBlock
&& jsrInner.jump != null) {
FlowBlock dest = jsrInner.jump.destination;
@ -434,14 +441,10 @@ public class TransformExceptionHandlers {
}
if (dest == subRoutine) {
/* The jump is preceeded by the right jsr. Remove
* the jsr.
/* The jump is preceeded by the right jsr.
* Mark it as good.
*/
tryFlow.removeSuccessor(jsrInner.jump);
jsrInner.removeJump();
pred.removeBlock();
if (prev instanceof ReturnBlock)
removeReturnLocal((ReturnBlock) prev);
jsr.setGood(true);
continue;
}
}
@ -507,7 +510,7 @@ public class TransformExceptionHandlers {
if (subRoutine != null) {
if (tryFlow.getSuccessors().contains(subRoutine))
removeBadJSR(tryFlow, catchBlock, subRoutine);
removeJSR(tryFlow, catchBlock, subRoutine);
tryFlow.mergeAddr(subRoutine);
}
}

@ -45,6 +45,8 @@ public class SyntheticAnalyzer implements Opcodes {
public final static int ACCESSPUTSTATIC = 6;
public final static int ACCESSSTATICMETHOD = 7;
public final static int ACCESSCONSTRUCTOR = 8;
public final static int ACCESSDUPPUTFIELD = 9;
public final static int ACCESSDUPPUTSTATIC = 10;
int kind = UNKNOWN;
Reference reference;
@ -141,25 +143,23 @@ public class SyntheticAnalyzer implements Opcodes {
return true;
}
private final int modifierMask = (Modifier.PRIVATE | Modifier.PROTECTED |
Modifier.PUBLIC | Modifier.STATIC);
private final int modifierMask = Modifier.PUBLIC | Modifier.STATIC;
public boolean checkStaticAccess() {
ClassInfo clazzInfo = method.getClazzInfo();
BytecodeInfo bytecode = method.getBytecode();
Iterator iter = bytecode.getInstructions().iterator();
boolean dupSeen = false;
Instruction instr = (Instruction) iter.next();
if (instr.getOpcode() == opc_getstatic) {
Reference ref = instr.getReference();
String refClazz = ref.getClazz().substring(1);
if (!(refClazz.substring(0, refClazz.length()-1)
.equals(clazzInfo.getName().replace('.','/'))))
ClassInfo refClazz = TypeSignature.getClassInfo(ref.getClazz());
if (!refClazz.superClassOf(clazzInfo))
return false;
FieldInfo refField
= clazzInfo.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) !=
(Modifier.PRIVATE | Modifier.STATIC))
= refClazz.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != Modifier.STATIC)
return false;
instr = (Instruction) iter.next();
if (instr.getOpcode() < opc_ireturn
@ -179,38 +179,50 @@ public class SyntheticAnalyzer implements Opcodes {
|| instr.getOpcode() == opc_dload) ? 2 : 1;
instr = (Instruction) iter.next();
}
if (instr.getOpcode() == (opc_dup - 3) + 3 * slot) {
/* This is probably a opc_dup or opc_dup2,
* preceding a opc_putstatic
*/
instr = (Instruction) iter.next();
if (instr.getOpcode() != opc_putstatic)
return false;
dupSeen = true;
}
if (instr.getOpcode() == opc_putstatic) {
if (params != 1)
return false;
/* For valid bytecode the type of param matches automatically */
Reference ref = instr.getReference();
String refClazz = ref.getClazz().substring(1);
if (!(refClazz.substring(0, refClazz.length()-1)
.equals(clazzInfo.getName().replace('.','/'))))
ClassInfo refClazz = TypeSignature.getClassInfo(ref.getClazz());
if (!refClazz.superClassOf(clazzInfo))
return false;
FieldInfo refField
= clazzInfo.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) !=
(Modifier.PRIVATE | Modifier.STATIC))
= refClazz.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != Modifier.STATIC)
return false;
instr = (Instruction) iter.next();
if (instr.getOpcode() != opc_return)
return false;
if (dupSeen) {
if (instr.getOpcode() < opc_ireturn
|| instr.getOpcode() > opc_areturn)
return false;
kind = ACCESSDUPPUTSTATIC;
} else {
if (instr.getOpcode() != opc_return)
return false;
kind = ACCESSPUTSTATIC;
}
reference = ref;
kind = ACCESSPUTSTATIC;
return true;
}
if (instr.getOpcode() == opc_invokestatic) {
Reference ref = instr.getReference();
String refClazz = ref.getClazz().substring(1);
if (!(refClazz.substring(0, refClazz.length()-1)
.equals(clazzInfo.getName().replace('.','/'))))
ClassInfo refClazz = TypeSignature.getClassInfo(ref.getClazz());
if (!refClazz.superClassOf(clazzInfo))
return false;
MethodInfo refMethod
= clazzInfo.findMethod(ref.getName(), ref.getType());
= refClazz.findMethod(ref.getName(), ref.getType());
MethodType refType = Type.tMethod(ref.getType());
if ((refMethod.getModifiers() & modifierMask) !=
(Modifier.PRIVATE | Modifier.STATIC)
if ((refMethod.getModifiers() & modifierMask) != Modifier.STATIC
|| refType.getParameterTypes().length != params)
return false;
instr = (Instruction) iter.next();
@ -235,6 +247,7 @@ public class SyntheticAnalyzer implements Opcodes {
ClassInfo clazzInfo = method.getClazzInfo();
BytecodeInfo bytecode = method.getBytecode();
Handler[] excHandlers = bytecode.getExceptionHandlers();
boolean dupSeen = false;
if (excHandlers != null && excHandlers.length != 0)
return false;
@ -251,13 +264,12 @@ public class SyntheticAnalyzer implements Opcodes {
if (instr.getOpcode() == opc_getfield) {
Reference ref = instr.getReference();
String refClazz = ref.getClazz().substring(1);
if (!(refClazz.substring(0, refClazz.length()-1)
.equals(clazzInfo.getName().replace('.','/'))))
ClassInfo refClazz = TypeSignature.getClassInfo(ref.getClazz());
if (!refClazz.superClassOf(clazzInfo))
return false;
FieldInfo refField
= clazzInfo.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != Modifier.PRIVATE)
= refClazz.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != 0)
return false;
instr = (Instruction) iter.next();
if (instr.getOpcode() < opc_ireturn
@ -277,36 +289,51 @@ public class SyntheticAnalyzer implements Opcodes {
|| instr.getOpcode() == opc_dload) ? 2 : 1;
instr = (Instruction) iter.next();
}
if (instr.getOpcode() == (opc_dup_x1 - 6) + 3 * slot) {
/* This is probably a opc_dup_x1 or opc_dup2_x1,
* preceding a opc_putfield
*/
instr = (Instruction) iter.next();
if (instr.getOpcode() != opc_putfield)
return false;
dupSeen = true;
}
if (instr.getOpcode() == opc_putfield) {
if (params != 1)
return false;
/* For valid bytecode the type of param matches automatically */
Reference ref = instr.getReference();
String refClazz = ref.getClazz().substring(1);
if (!(refClazz.substring(0, refClazz.length()-1)
.equals(clazzInfo.getName().replace('.','/'))))
ClassInfo refClazz = TypeSignature.getClassInfo(ref.getClazz());
if (!refClazz.superClassOf(clazzInfo))
return false;
FieldInfo refField
= clazzInfo.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != Modifier.PRIVATE)
= refClazz.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != 0)
return false;
instr = (Instruction) iter.next();
if (instr.getOpcode() != opc_return)
return false;
if (dupSeen) {
if (instr.getOpcode() < opc_ireturn
|| instr.getOpcode() > opc_areturn)
return false;
kind = ACCESSDUPPUTFIELD;
} else {
if (instr.getOpcode() != opc_return)
return false;
kind = ACCESSPUTFIELD;
}
reference = ref;
kind = ACCESSPUTFIELD;
return true;
}
if (instr.getOpcode() == opc_invokespecial) {
Reference ref = instr.getReference();
String refClazz = ref.getClazz().substring(1);
if (!(refClazz.substring(0, refClazz.length()-1)
.equals(clazzInfo.getName().replace('.','/'))))
ClassInfo refClazz = TypeSignature.getClassInfo(ref.getClazz());
if (!refClazz.superClassOf(clazzInfo))
return false;
MethodInfo refMethod
= clazzInfo.findMethod(ref.getName(), ref.getType());
= refClazz.findMethod(ref.getName(), ref.getType());
MethodType refType = Type.tMethod(ref.getType());
if ((refMethod.getModifiers() & modifierMask) != Modifier.PRIVATE
if ((refMethod.getModifiers() & modifierMask) != 0
|| refType.getParameterTypes().length != params)
return false;
instr = (Instruction) iter.next();
@ -364,14 +391,13 @@ public class SyntheticAnalyzer implements Opcodes {
unifyParam = params++;
Reference ref = instr.getReference();
String refClazz = ref.getClazz().substring(1);
if (!(refClazz.substring(0, refClazz.length()-1)
.equals(clazzInfo.getName().replace('.','/'))))
ClassInfo refClazz = TypeSignature.getClassInfo(ref.getClazz());
if (refClazz != clazzInfo)
return false;
MethodInfo refMethod
= clazzInfo.findMethod(ref.getName(), ref.getType());
= refClazz.findMethod(ref.getName(), ref.getType());
MethodType refType = Type.tMethod(ref.getType());
if ((refMethod.getModifiers() & modifierMask) != Modifier.PRIVATE
if ((refMethod.getModifiers() & modifierMask) != 0
|| !refMethod.getName().equals("<init>")
|| unifyParam == -1
|| refType.getParameterTypes().length != params - 2)

@ -345,15 +345,41 @@ public class Main
}
}
public static void usage() {
System.err.println("Usage: java jode.swingui.Main [CLASSPATH]");
System.err.println("The directories in CLASSPATH should be separated by ','.");
System.err.println("If no CLASSPATH is given the virtual machine classpath is used.");
}
public static void main(String[] params) {
String cp = System.getProperty("java.class.path", "");
cp = cp.replace(File.pathSeparatorChar,
Decompiler.altPathSeparatorChar);
for (int i=0; i<params.length; i++) {
if (params[i].equals("--classpath"))
String bootClassPath = System.getProperty("sun.boot.class.path");
if (bootClassPath != null)
cp += Decompiler.altPathSeparatorChar
+ bootClassPath.replace(File.pathSeparatorChar,
Decompiler.altPathSeparatorChar);
int i = 0;
if (i < params.length) {
if (params[i].equals("--classpath")
|| params[i].equals("--cp")
|| params[i].equals("-c"))
cp = params[++i];
else
else if (params[i].startsWith("-")) {
if (!params[i].equals("--help")
&& !params[i].equals("-h"))
System.err.println("Unknown option: "+params[i]);
usage();
return;
} else
cp = params[i];
i++;
}
if (i < params.length) {
System.err.println("Too many arguments.");
usage();
return;
}
Main win = new Main(cp);
win.show();

@ -47,12 +47,18 @@ public class ArrayType extends ReferenceType {
}
public Type getSuperType() {
return tRange(tObject,
(ReferenceType) tArray(elementType.getSuperType()));
if (elementType instanceof IntegerType)
return tRange(tObject, this);
else
return tRange(tObject,
(ReferenceType) tArray(elementType.getSuperType()));
}
public Type getSubType() {
return tArray(elementType.getSubType());
if (elementType instanceof IntegerType)
return this;
else
return tArray(elementType.getSubType());
}
public Type getHint() {
@ -69,11 +75,11 @@ public class ArrayType extends ReferenceType {
* @return the range type, or tError if not possible.
*/
public Type createRangeType(ReferenceType bottom) {
/*
* tArray(y), tArray(x) -> tArray( y.intersection(x) )
* obj , tArray(x) -> <obj, tArray(x)>
/*
* tArray(y), tArray(x) -> tArray( y.intersection(x) )
* obj , tArray(x) -> <obj, tArray(x)>
* iff tArray extends and implements obj
*/
*/
if (bottom.getTypeCode() == TC_ARRAY)
return tArray(elementType.intersection
(((ArrayType)bottom).elementType));
@ -93,11 +99,11 @@ public class ArrayType extends ReferenceType {
* @return the common sub type.
*/
public Type getSpecializedType(Type type) {
/*
* tArray(x), object -> tArray(x) iff tArray implements object
/*
* tArray(x), iface -> tArray(x) iff tArray implements iface
* tArray(x), tArray(y) -> tArray(x.intersection(y))
* tArray(x), other -> tError
*/
* tArray(x), other -> tError
*/
if (type.getTypeCode() == TC_RANGE) {
type = ((RangeType) type).getBottom();
}
@ -123,10 +129,10 @@ public class ArrayType extends ReferenceType {
* @return the common super type.
*/
public Type getGeneralizedType(Type type) {
/* tArray(x), tNull -> tArray(x)
* tArray(x), tClass(y) -> common ifaces of tArray and tClass
* tArray(x), tArray(y) -> tArray(x.intersection(y)) or tObject
* tArray(x), other -> tError
/* tArray(x), tNull -> tArray(x)
* tArray(x), tClass(y) -> common ifaces of tArray and tClass
* tArray(x), tArray(y) -> tArray(x.intersection(y)) or tObject
* tArray(x), other -> tError
*/
if (type.getTypeCode() == TC_RANGE) {
type = ((RangeType) type).getTop();
@ -136,7 +142,9 @@ public class ArrayType extends ReferenceType {
if (type.getTypeCode() == TC_ARRAY) {
Type elType = elementType.intersection
(((ArrayType)type).elementType);
return elType != tError ? tArray(elType) : tObject;
if (elType != tError)
return tArray(elType);
return ClassInterfacesType.create(null, arrayIfaces);
}
if (type.getTypeCode() == TC_CLASS) {
ClassInterfacesType other = (ClassInterfacesType) type;

@ -509,36 +509,57 @@ public class ClassInterfacesType extends ReferenceType {
private final static Hashtable keywords = new Hashtable();
static {
keywords.put("package", Boolean.TRUE);
keywords.put("import", Boolean.TRUE);
keywords.put("abstract", Boolean.TRUE);
keywords.put("default", Boolean.TRUE);
keywords.put("if", Boolean.TRUE);
keywords.put("else", Boolean.TRUE);
keywords.put("for", Boolean.TRUE);
keywords.put("while", Boolean.TRUE);
keywords.put("private", Boolean.TRUE);
keywords.put("throw", Boolean.TRUE);
keywords.put("return", Boolean.TRUE);
keywords.put("class", Boolean.TRUE);
keywords.put("interface", Boolean.TRUE);
keywords.put("boolean", Boolean.TRUE);
keywords.put("do", Boolean.TRUE);
keywords.put("implements", Boolean.TRUE);
keywords.put("extends", Boolean.TRUE);
keywords.put("protected", Boolean.TRUE);
keywords.put("throws", Boolean.TRUE);
keywords.put("break", Boolean.TRUE);
keywords.put("double", Boolean.TRUE);
keywords.put("import", Boolean.TRUE);
keywords.put("public", Boolean.TRUE);
keywords.put("transient", Boolean.TRUE);
keywords.put("byte", Boolean.TRUE);
keywords.put("else", Boolean.TRUE);
keywords.put("instanceof", Boolean.TRUE);
keywords.put("new", Boolean.TRUE);
keywords.put("return", Boolean.TRUE);
keywords.put("try", Boolean.TRUE);
keywords.put("case", Boolean.TRUE);
keywords.put("extends", Boolean.TRUE);
keywords.put("int", Boolean.TRUE);
keywords.put("boolean", Boolean.TRUE);
keywords.put("long", Boolean.TRUE);
keywords.put("float", Boolean.TRUE);
keywords.put("double", Boolean.TRUE);
keywords.put("short", Boolean.TRUE);
keywords.put("public", Boolean.TRUE);
keywords.put("protected", Boolean.TRUE);
keywords.put("private", Boolean.TRUE);
keywords.put("void", Boolean.TRUE);
keywords.put("catch", Boolean.TRUE);
keywords.put("final", Boolean.TRUE);
keywords.put("interface", Boolean.TRUE);
keywords.put("static", Boolean.TRUE);
keywords.put("synchronized", Boolean.TRUE);
keywords.put("strict", Boolean.TRUE);
keywords.put("transient", Boolean.TRUE);
keywords.put("abstract", Boolean.TRUE);
keywords.put("volatile", Boolean.TRUE);
keywords.put("final", Boolean.TRUE);
keywords.put("char", Boolean.TRUE);
keywords.put("finally", Boolean.TRUE);
keywords.put("long", Boolean.TRUE);
keywords.put("super", Boolean.TRUE);
keywords.put("while", Boolean.TRUE);
keywords.put("class", Boolean.TRUE);
keywords.put("float", Boolean.TRUE);
keywords.put("native", Boolean.TRUE);
keywords.put("switch", Boolean.TRUE);
keywords.put("const", Boolean.TRUE);
keywords.put("for", Boolean.TRUE);
keywords.put("new", Boolean.TRUE);
keywords.put("synchronized", Boolean.TRUE);
keywords.put("continue", Boolean.TRUE);
keywords.put("goto", Boolean.TRUE);
keywords.put("package", Boolean.TRUE);
keywords.put("this", Boolean.TRUE);
keywords.put("strictfp", Boolean.TRUE);
keywords.put("null", Boolean.TRUE);
keywords.put("true", Boolean.TRUE);
keywords.put("false", Boolean.TRUE);
}
/**

@ -107,13 +107,18 @@ public class RangeType extends Type {
/**
* Returns the hint type of this range type set. This returns the
* singleton set containing only the first top type, except if it
* is null and there is a unique bottom type, in which case it returns
* the bottom type.
* is null and there is a unique bottom type, in which case it
* returns the bottom type.
* @return the hint type.
*/
public Type getHint() {
return topType == tNull && bottomType.equals(bottomType.getHint())
? bottomType.getHint(): topType.getHint();
Type bottomHint = bottomType.getHint();
Type topHint = topType.getHint();
if (topType == tNull && bottomType.equals(bottomHint))
return bottomHint;
return topHint;
}
/**

Loading…
Cancel
Save