Krakatau bug fix

This commit is contained in:
Konloch 2015-08-03 12:19:14 -06:00
parent 870987f65f
commit bd0938476c
10 changed files with 3 additions and 916 deletions

View File

@ -1,48 +0,0 @@
<html>
<!--
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
-->
<body>
Provides some useful class and method adapters. <i>The preferred way of using
these adapters is by chaining them together and to custom adapters (instead of
inheriting from them)</i>. Indeed this approach provides more combination
possibilities than inheritance. For instance, suppose you want to implement an
adapter MyAdapter than needs sorted local variables and intermediate stack map
frame values taking into account the local variables sort. By using inheritance,
this would require MyAdapter to extend AnalyzerAdapter, itself extending
LocalVariablesSorter. But AnalyzerAdapter is not a subclass of
LocalVariablesSorter, so this is not possible. On the contrary, by using
delegation, you can make LocalVariablesSorter delegate to AnalyzerAdapter,
itself delegating to MyAdapter. In this case AnalyzerAdapter computes
intermediate frames based on the output of LocalVariablesSorter, and MyAdapter
can add new locals by calling the newLocal method on LocalVariablesSorter, and
can get the stack map frame state before each instruction by reading the locals
and stack fields in AnalyzerAdapter (this requires references from MyAdapter
back to LocalVariablesSorter and AnalyzerAdapter).
</body>

View File

@ -1,87 +0,0 @@
<html>
<!--
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
-->
<body>
Provides a small and fast bytecode manipulation framework.
<p>
The <a href="http://www.objectweb.org/asm">ASM</a> framework is organized
around the {@link org.objectweb.asm.ClassVisitor ClassVisitor},
{@link org.objectweb.asm.FieldVisitor FieldVisitor},
{@link org.objectweb.asm.MethodVisitor MethodVisitor} and
{@link org.objectweb.asm.AnnotationVisitor AnnotationVisitor} abstract classes,
which allow one to visit the fields, methods and annotations of a class,
including the bytecode instructions of each method.
<p>
In addition to these main abstract classes, ASM provides a {@link
org.objectweb.asm.ClassReader ClassReader} class, that can parse an
existing class and make a given visitor visit it. ASM also provides
a {@link org.objectweb.asm.ClassWriter ClassWriter} class, which is
a visitor that generates Java class files.
<p>
In order to generate a class from scratch, only the {@link
org.objectweb.asm.ClassWriter ClassWriter} class is necessary. Indeed,
in order to generate a class, one must just call its visit<i>Xxx</i>
methods with the appropriate arguments to generate the desired fields
and methods. See the "helloworld" example in the ASM distribution for
more details about class generation.
<p>
In order to modify existing classes, one must use a {@link
org.objectweb.asm.ClassReader ClassReader} class to analyze
the original class, a class modifier, and a {@link org.objectweb.asm.ClassWriter
ClassWriter} to construct the modified class. The class modifier
is just a {@link org.objectweb.asm.ClassVisitor ClassVisitor}
that delegates most of the work to another {@link org.objectweb.asm.ClassVisitor
ClassVisitor}, but that sometimes changes some parameter values,
or call additional methods, in order to implement the desired
modification process. In order to make it easier to implement such
class modifiers, the {@link org.objectweb.asm.ClassVisitor
ClassVisitor} and {@link org.objectweb.asm.MethodVisitor MethodVisitor}
classes delegate by default all the method calls they receive to an
optional visitor. See the "adapt" example in the ASM
distribution for more details about class modification.
<p>
The size of the core ASM library, <tt>asm.jar</tt>, is only 45KB, which is much
smaller than the size of the
<a href="http://jakarta.apache.org/bcel">BCEL</a> library (504KB), and than the
size of the
<a href="http://serp.sourceforge.net">SERP</a> library (150KB). ASM is also
much faster than these tools. Indeed the overhead of a load time class
transformation process is of the order of 60% with ASM, 700% or more with BCEL,
and 1100% or more with SERP (see the <tt>test/perf</tt> directory in the ASM
distribution)!
@since ASM 1.3
</body>
</html>

View File

@ -1,36 +0,0 @@
<html>
<!--
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
-->
<body>
Provides support for type signatures.
@since ASM 2.0
</body>
</html>

View File

@ -1,67 +0,0 @@
<html>
<!--
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
-->
<body>
<p>
Provides a framework for static code analysis based on the asm.tree package.
</p>
<p>
Basic usage:
</p>
<pre>
ClassReader cr = new ClassReader(bytecode);
ClassNode cn = new ClassNode();
cr.accept(cn, ClassReader.SKIP_DEBUG);
List methods = cn.methods;
for (int i = 0; i < methods.size(); ++i) {
MethodNode method = (MethodNode) methods.get(i);
if (method.instructions.size() > 0) {
Analyzer a = new Analyzer(new BasicInterpreter());
a.analyze(cn.name, method);
Frame[] frames = a.getFrames();
// Elements of the frames arrray now contains info for each instruction
// from the analyzed method. BasicInterpreter creates BasicValue, that
// is using simplified type system that distinguishes the UNINITIALZED,
// INT, FLOAT, LONG, DOUBLE, REFERENCE and RETURNADDRESS types.
...
}
}
</pre>
<p>
@since ASM 1.4.3
</p>
</body>
</html>

View File

@ -1,192 +0,0 @@
<html>
<!--
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
-->
<body>
<p>
Provides an ASM visitor that constructs a tree representation of the
classes it visits. This class adapter can be useful to implement "complex"
class manipulation operations, i.e., operations that would be very hard to
implement without using a tree representation (such as optimizing the number
of local variables used by a method).
</p>
<p>
However, this class adapter has a cost: it makes ASM bigger and slower. Indeed
it requires more than twenty new classes, and multiplies the time needed to
transform a class by almost two (it is almost two times faster to read, "modify"
and write a class with a ClassVisitor than with a ClassNode). This is why
this package is bundled in an optional <tt>asm-tree.jar</tt> library that
is separated from (but requires) the <tt>asm.jar</tt> library, which contains
the core ASM framework. This is also why <i><font color="red">it is recommended
not to use this class adapter when it is possible</font></i>.
</p>
<p>
The root class is the ClassNode, that can be created from existing bytecode. For example:
</p>
<pre>
ClassReader cr = new ClassReader(source);
ClassNode cn = new ClassNode();
cr.accept(cn, true);
</pre>
<p>
Now the content of ClassNode can be modified and then
serialized back into bytecode:
</p>
<pre>
ClassWriter cw = new ClassWriter(true);
cn.accept(cw);
</pre>
<p>
Using a simple ClassVisitor it is possible to create MethodNode instances per-method.
In this example MethodNode is acting as a buffer that is flushed out at visitEnd() call:
</p>
<pre>
ClassReader cr = new ClassReader(source);
ClassWriter cw = new ClassWriter();
ClassVisitor cv = new ClassVisitor(cw) {
public MethodVisitor visitMethod(int access, String name,
String desc, String signature, String[] exceptions) {
final MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
MethodNode mn = new MethodNode(access, name, desc, signature, exceptions) {
public void visitEnd() {
// transform or analyze method code using tree API
accept(mv);
}
};
}
};
cr.accept(cv, true);
</pre>
<p>
Several strategies can be used to construct method code from scratch. The first
option is to create a MethodNode, and then create XxxInsnNode instances and
add them to the instructions list:
</p>
<pre>
MethodNode m = new MethodNode(...);
m.instructions.add(new VarInsnNode(ALOAD, 0));
...
</pre>
<p>
Alternatively, you can use the fact that MethodNode is a MethodVisitor, and use
that to create the XxxInsnNode and add them to the instructions list through
the standard MethodVisitor methods:
</p>
<pre>
MethodNode m = new MethodNode(...);
m.visitVarInsn(ALOAD, 0);
...
</pre>
<p>
If you cannot generate all the instructions in sequential order, i.e. if you
need to save some pointer in the instruction list and then insert instructions
at that place after other instructions have been generated, you can use InsnList
methods insert() and insertBefore() to insert instructions at a saved pointer.
</p>
<pre>
MethodNode m = new MethodNode(...);
m.visitVarInsn(ALOAD, 0);
AbstractInsnNode ptr = m.instructions.getLast();
m.visitVarInsn(ALOAD, 1);
// inserts an instruction between ALOAD 0 and ALOAD 1
m.instructions.insert(ptr, new VarInsnNode(ALOAD, 0));
...
</pre>
<p>
If you need to insert instructions while iterating over an existing instruction
list, you can also use several strategies. The first one is to use a
ListIterator over the instruction list:
</p>
<pre>
ListIterator it = m.instructions.iterator();
while (it.hasNext()) {
AbstractInsnNode n = (AbstractInsnNode) it.next();
if (...) {
it.add(new VarInsnNode(ALOAD, 0));
}
}
</pre>
<p>
It is also possible to convert an instruction list into an array and iterate trough
array elements:
</p>
<pre>
AbstractInsnNode[] insns = m.instructions.toArray();
for(int i = 0; i&lt;insns.length; i++) {
AbstractInsnNode n = insns[i];
if (...) {
m.instructions.insert(n, new VarInsnNode(ALOAD, 0));
}
}
</pre>
<p>
If you want to insert these instructions through the MethodVisitor methods,
you can use another instance of MethodNode as a MethodVisitor and then
insert instructions collected by that instance into the instruction list.
For example:
</p>
<pre>
AbstractInsnNode[] insns = m.instructions.toArray();
for(int i = 0; i&lt;insns.length; i++) {
AbstractInsnNode n = insns[i];
if (...) {
MethodNode mn = new MethodNode();
mn.visitVarInsn(ALOAD, 0);
mn.visitVarInsn(ALOAD, 1);
m.instructions.insert(n, mn.instructions);
}
}
</pre>
<p>
@since ASM 1.3.3
</p>
</body>
</html>

View File

@ -1,40 +0,0 @@
<html>
<!--
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
-->
<body>
Provides ASM visitors that can be useful for programming and
debugging purposes. These class visitors are normally not used by applications
at runtime. This is why they are bundled in an optional <tt>asm-util.jar</tt>
library that is separated from (but requires) the <tt>asm.jar</tt> library,
which contains the core ASM framework.
@since ASM 1.3.2
</body>
</html>

View File

@ -1,349 +0,0 @@
<!--
ASM XML Adapter
Copyright (c) 2004-2011, Eugene Kuleshov
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holders nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
-->
<!--
This DTD must be used to create XML documents to be processed by
org.objectweb.asm.xml.ASMContentHandler
-->
<!--
Root element used to aggregate multiple classes into single document.
-->
<!ELEMENT classes ( class+ )>
<!--
Root element for a single class.
-->
<!ELEMENT class ( interfaces, ( field | innerclass | method )*)>
<!ATTLIST class access CDATA #REQUIRED>
<!ATTLIST class name CDATA #REQUIRED>
<!ATTLIST class parent CDATA #REQUIRED>
<!ATTLIST class major CDATA #REQUIRED>
<!ATTLIST class minor CDATA #REQUIRED>
<!ATTLIST class source CDATA #IMPLIED>
<!ELEMENT interfaces ( interface* )>
<!ELEMENT interface EMPTY>
<!ATTLIST interface name CDATA #REQUIRED>
<!ELEMENT field EMPTY>
<!ATTLIST field access CDATA #REQUIRED>
<!ATTLIST field desc CDATA #REQUIRED>
<!ATTLIST field name CDATA #REQUIRED>
<!--
All characters out of interval 0x20 to 0x7f (inclusive) must
be encoded (\uXXXX) and character '\' must be replaced by "\\"
-->
<!ATTLIST field value CDATA #IMPLIED>
<!ELEMENT innerclass EMPTY>
<!ATTLIST innerclass access CDATA #REQUIRED>
<!ATTLIST innerclass innerName CDATA #IMPLIED>
<!ATTLIST innerclass name CDATA #REQUIRED>
<!ATTLIST innerclass outerName CDATA #IMPLIED>
<!--
Root element for method definition.
-->
<!ELEMENT method ( exceptions, code? )>
<!ATTLIST method access CDATA #REQUIRED>
<!ATTLIST method desc CDATA #REQUIRED>
<!ATTLIST method name CDATA #REQUIRED>
<!ELEMENT exceptions ( exception* )>
<!ELEMENT exception EMPTY>
<!ATTLIST exception name CDATA #REQUIRED>
<!--
code element contains bytecode instructions and definitions for labels, line numbers, try/catch and max
-->
<!ELEMENT code (( AALOAD | AASTORE | ACONST_NULL | ALOAD | ANEWARRAY | ARETURN | ARRAYLENGTH | ASTORE | ATHROW | BALOAD | BASTORE | BIPUSH | CALOAD | CASTORE | CHECKCAST | D2F | D2I | D2L | DADD | DALOAD | DASTORE | DCMPG | DCMPL | DCONST_0 | DCONST_1 | DDIV | DLOAD | DMUL | DNEG | DREM | DRETURN | DSTORE | DSUB | DUP | DUP2 | DUP2_X1 | DUP2_X2 | DUP_X1 | DUP_X2 | SWAP | F2D | F2I | F2L | FADD | FALOAD | FASTORE | FCMPG | FCMPL | FCONST_0 | FCONST_1 | FCONST_2 | FDIV | FLOAD | FMUL | FNEG | FREM | FRETURN | FSTORE | FSUB | GETFIELD | GETSTATIC | GOTO | I2B | I2C | I2D | I2F | I2L | I2S | IADD | IALOAD | IAND | IASTORE | ICONST_0 | ICONST_1 | ICONST_2 | ICONST_3 | ICONST_4 | ICONST_5 | ICONST_M1 | IDIV | IFEQ | IFGE | IFGT | IFLE | IFLT | IFNE | IFNONNULL | IFNULL | IF_ACMPEQ | IF_ACMPNE | IF_ICMPEQ | IF_ICMPGE | IF_ICMPGT | IF_ICMPLE | IF_ICMPLT | IF_ICMPNE | IINC | ILOAD | IMUL | INEG | INSTANCEOF | INVOKEINTERFACE | INVOKESPECIAL | INVOKESTATIC | INVOKEVIRTUAL | IOR | IREM | IRETURN | ISHL | ISHR | ISTORE | ISUB | IUSHR | IXOR | JSR | L2D | L2F | L2I | LADD | LALOAD | LAND | LASTORE | LCMP | LCONST_0 | LCONST_1 | LDC | LDIV | LLOAD | LMUL | LNEG | LOOKUPSWITCH | LOR | LREM | LRETURN | LSHL | LSHR | LSTORE | LSUB | LUSHR | LXOR | MONITORENTER | MONITOREXIT | MULTIANEWARRAY | NEW | NEWARRAY | NOP | POP | POP2 | PUTFIELD | PUTSTATIC | RET | RETURN | SALOAD | SASTORE | SIPUSH | TABLESWITCH | Label | LineNumber | TryCatch )*, Max)>
<!ELEMENT Label EMPTY>
<!ATTLIST Label name CDATA #REQUIRED>
<!ELEMENT TryCatch EMPTY>
<!ATTLIST TryCatch end CDATA #REQUIRED>
<!ATTLIST TryCatch handler CDATA #REQUIRED>
<!ATTLIST TryCatch start CDATA #REQUIRED>
<!ATTLIST TryCatch type CDATA #IMPLIED>
<!ELEMENT LineNumber EMPTY>
<!ATTLIST LineNumber line CDATA #REQUIRED>
<!ATTLIST LineNumber start CDATA #REQUIRED>
<!ELEMENT Max EMPTY>
<!ATTLIST Max maxLocals CDATA #REQUIRED>
<!ATTLIST Max maxStack CDATA #REQUIRED>
<!ELEMENT AALOAD EMPTY>
<!ELEMENT AASTORE EMPTY>
<!ELEMENT ACONST_NULL EMPTY>
<!ELEMENT ALOAD EMPTY>
<!ATTLIST ALOAD var CDATA #REQUIRED>
<!ELEMENT ANEWARRAY EMPTY>
<!ATTLIST ANEWARRAY desc CDATA #REQUIRED>
<!ELEMENT ARETURN EMPTY>
<!ELEMENT ARRAYLENGTH EMPTY>
<!ELEMENT ASTORE EMPTY>
<!ATTLIST ASTORE var CDATA #REQUIRED>
<!ELEMENT ATHROW EMPTY>
<!ELEMENT BALOAD EMPTY>
<!ELEMENT BASTORE EMPTY>
<!ELEMENT BIPUSH EMPTY>
<!ATTLIST BIPUSH value CDATA #REQUIRED>
<!ELEMENT CALOAD EMPTY>
<!ELEMENT CASTORE EMPTY>
<!ELEMENT CHECKCAST EMPTY>
<!ATTLIST CHECKCAST desc CDATA #REQUIRED>
<!ELEMENT D2F EMPTY>
<!ELEMENT D2I EMPTY>
<!ELEMENT D2L EMPTY>
<!ELEMENT DADD EMPTY>
<!ELEMENT DALOAD EMPTY>
<!ELEMENT DASTORE EMPTY>
<!ELEMENT DCMPG EMPTY>
<!ELEMENT DCMPL EMPTY>
<!ELEMENT DCONST_0 EMPTY>
<!ELEMENT DCONST_1 EMPTY>
<!ELEMENT DDIV EMPTY>
<!ELEMENT DLOAD EMPTY>
<!ATTLIST DLOAD var CDATA #REQUIRED>
<!ELEMENT DMUL EMPTY>
<!ELEMENT DNEG EMPTY>
<!ELEMENT DREM EMPTY>
<!ELEMENT DRETURN EMPTY>
<!ELEMENT DSTORE EMPTY>
<!ATTLIST DSTORE var CDATA #REQUIRED>
<!ELEMENT DSUB EMPTY>
<!ELEMENT DUP EMPTY>
<!ELEMENT DUP2 EMPTY>
<!ELEMENT DUP2_X1 EMPTY>
<!ELEMENT DUP2_X2 EMPTY>
<!ELEMENT DUP_X1 EMPTY>
<!ELEMENT DUP_X2 EMPTY>
<!ELEMENT SWAP EMPTY>
<!ELEMENT F2D EMPTY>
<!ELEMENT F2I EMPTY>
<!ELEMENT F2L EMPTY>
<!ELEMENT FADD EMPTY>
<!ELEMENT FALOAD EMPTY>
<!ELEMENT FASTORE EMPTY>
<!ELEMENT FCMPG EMPTY>
<!ELEMENT FCMPL EMPTY>
<!ELEMENT FCONST_0 EMPTY>
<!ELEMENT FCONST_1 EMPTY>
<!ELEMENT FCONST_2 EMPTY>
<!ELEMENT FDIV EMPTY>
<!ELEMENT FLOAD EMPTY>
<!ATTLIST FLOAD var CDATA #REQUIRED>
<!ELEMENT FMUL EMPTY>
<!ELEMENT FNEG EMPTY>
<!ELEMENT FREM EMPTY>
<!ELEMENT FRETURN EMPTY>
<!ELEMENT FSTORE EMPTY>
<!ATTLIST FSTORE var CDATA #REQUIRED>
<!ELEMENT FSUB EMPTY>
<!ELEMENT GETFIELD EMPTY>
<!ATTLIST GETFIELD desc CDATA #REQUIRED>
<!ATTLIST GETFIELD name CDATA #REQUIRED>
<!ATTLIST GETFIELD owner CDATA #REQUIRED>
<!ELEMENT GETSTATIC EMPTY>
<!ATTLIST GETSTATIC desc CDATA #REQUIRED>
<!ATTLIST GETSTATIC name CDATA #REQUIRED>
<!ATTLIST GETSTATIC owner CDATA #REQUIRED>
<!ELEMENT GOTO EMPTY>
<!ATTLIST GOTO label CDATA #REQUIRED>
<!ELEMENT I2B EMPTY>
<!ELEMENT I2C EMPTY>
<!ELEMENT I2D EMPTY>
<!ELEMENT I2F EMPTY>
<!ELEMENT I2L EMPTY>
<!ELEMENT I2S EMPTY>
<!ELEMENT IADD EMPTY>
<!ELEMENT IALOAD EMPTY>
<!ELEMENT IAND EMPTY>
<!ELEMENT IASTORE EMPTY>
<!ELEMENT ICONST_0 EMPTY>
<!ELEMENT ICONST_1 EMPTY>
<!ELEMENT ICONST_2 EMPTY>
<!ELEMENT ICONST_3 EMPTY>
<!ELEMENT ICONST_4 EMPTY>
<!ELEMENT ICONST_5 EMPTY>
<!ELEMENT ICONST_M1 EMPTY>
<!ELEMENT IDIV EMPTY>
<!ELEMENT IFEQ EMPTY>
<!ATTLIST IFEQ label CDATA #REQUIRED>
<!ELEMENT IFGE EMPTY>
<!ATTLIST IFGE label CDATA #REQUIRED>
<!ELEMENT IFGT EMPTY>
<!ATTLIST IFGT label CDATA #REQUIRED>
<!ELEMENT IFLE EMPTY>
<!ATTLIST IFLE label CDATA #REQUIRED>
<!ELEMENT IFLT EMPTY>
<!ATTLIST IFLT label CDATA #REQUIRED>
<!ELEMENT IFNE EMPTY>
<!ATTLIST IFNE label CDATA #REQUIRED>
<!ELEMENT IFNONNULL EMPTY>
<!ATTLIST IFNONNULL label CDATA #REQUIRED>
<!ELEMENT IFNULL EMPTY>
<!ATTLIST IFNULL label CDATA #REQUIRED>
<!ELEMENT IF_ACMPEQ EMPTY>
<!ATTLIST IF_ACMPEQ label CDATA #REQUIRED>
<!ELEMENT IF_ACMPNE EMPTY>
<!ATTLIST IF_ACMPNE label CDATA #REQUIRED>
<!ELEMENT IF_ICMPEQ EMPTY>
<!ATTLIST IF_ICMPEQ label CDATA #REQUIRED>
<!ELEMENT IF_ICMPGE EMPTY>
<!ATTLIST IF_ICMPGE label CDATA #REQUIRED>
<!ELEMENT IF_ICMPGT EMPTY>
<!ATTLIST IF_ICMPGT label CDATA #REQUIRED>
<!ELEMENT IF_ICMPLE EMPTY>
<!ATTLIST IF_ICMPLE label CDATA #REQUIRED>
<!ELEMENT IF_ICMPLT EMPTY>
<!ATTLIST IF_ICMPLT label CDATA #REQUIRED>
<!ELEMENT IF_ICMPNE EMPTY>
<!ATTLIST IF_ICMPNE label CDATA #REQUIRED>
<!ELEMENT IINC EMPTY>
<!ATTLIST IINC inc CDATA #REQUIRED>
<!ATTLIST IINC var CDATA #REQUIRED>
<!ELEMENT ILOAD EMPTY>
<!ATTLIST ILOAD var CDATA #REQUIRED>
<!ELEMENT IMUL EMPTY>
<!ELEMENT INEG EMPTY>
<!ELEMENT INSTANCEOF EMPTY>
<!ATTLIST INSTANCEOF desc CDATA #REQUIRED>
<!ELEMENT INVOKEINTERFACE EMPTY>
<!ATTLIST INVOKEINTERFACE desc CDATA #REQUIRED>
<!ATTLIST INVOKEINTERFACE name CDATA #REQUIRED>
<!ATTLIST INVOKEINTERFACE owner CDATA #REQUIRED>
<!ELEMENT INVOKESPECIAL EMPTY>
<!ATTLIST INVOKESPECIAL desc CDATA #REQUIRED>
<!ATTLIST INVOKESPECIAL name CDATA #REQUIRED>
<!ATTLIST INVOKESPECIAL owner CDATA #REQUIRED>
<!ELEMENT INVOKESTATIC EMPTY>
<!ATTLIST INVOKESTATIC desc CDATA #REQUIRED>
<!ATTLIST INVOKESTATIC name CDATA #REQUIRED>
<!ATTLIST INVOKESTATIC owner CDATA #REQUIRED>
<!ELEMENT INVOKEVIRTUAL EMPTY>
<!ATTLIST INVOKEVIRTUAL desc CDATA #REQUIRED>
<!ATTLIST INVOKEVIRTUAL name CDATA #REQUIRED>
<!ATTLIST INVOKEVIRTUAL owner CDATA #REQUIRED>
<!ELEMENT INVOKEDYNAMIC ( bsmArgs+ )>
<!ATTLIST INVOKEDYNAMIC desc CDATA #REQUIRED>
<!ATTLIST INVOKEDYNAMIC name CDATA #REQUIRED>
<!ATTLIST INVOKEDYNAMIC bsm CDATA #REQUIRED>
<!ELEMENT bsmArgs EMPTY>
<!ATTLIST bsmArgs cst CDATA #REQUIRED>
<!ATTLIST bsmArgs desc CDATA #REQUIRED>
<!ELEMENT IOR EMPTY>
<!ELEMENT IREM EMPTY>
<!ELEMENT IRETURN EMPTY>
<!ELEMENT ISHL EMPTY>
<!ELEMENT ISHR EMPTY>
<!ELEMENT ISTORE EMPTY>
<!ATTLIST ISTORE var CDATA #REQUIRED>
<!ELEMENT ISUB EMPTY>
<!ELEMENT IUSHR EMPTY>
<!ELEMENT IXOR EMPTY>
<!ELEMENT JSR EMPTY>
<!ATTLIST JSR label CDATA #REQUIRED>
<!ELEMENT L2D EMPTY>
<!ELEMENT L2F EMPTY>
<!ELEMENT L2I EMPTY>
<!ELEMENT LADD EMPTY>
<!ELEMENT LALOAD EMPTY>
<!ELEMENT LAND EMPTY>
<!ELEMENT LASTORE EMPTY>
<!ELEMENT LCMP EMPTY>
<!ELEMENT LCONST_0 EMPTY>
<!ELEMENT LCONST_1 EMPTY>
<!ELEMENT LDC EMPTY>
<!--
All characters out of interval 0x20 to 0x7f (inclusive) must
be encoded (\uXXXX) and character '\' must be replaced by "\\"
-->
<!ATTLIST LDC cst CDATA #REQUIRED>
<!ATTLIST LDC desc CDATA #REQUIRED>
<!ELEMENT LDIV EMPTY>
<!ELEMENT LLOAD EMPTY>
<!ATTLIST LLOAD var CDATA #REQUIRED>
<!ELEMENT LMUL EMPTY>
<!ELEMENT LNEG EMPTY>
<!ELEMENT LOR EMPTY>
<!ELEMENT LREM EMPTY>
<!ELEMENT LRETURN EMPTY>
<!ELEMENT LSHL EMPTY>
<!ELEMENT LSHR EMPTY>
<!ELEMENT LSTORE EMPTY>
<!ATTLIST LSTORE var CDATA #REQUIRED>
<!ELEMENT LSUB EMPTY>
<!ELEMENT LUSHR EMPTY>
<!ELEMENT LXOR EMPTY>
<!ELEMENT MONITORENTER EMPTY>
<!ELEMENT MONITOREXIT EMPTY>
<!ELEMENT MULTIANEWARRAY EMPTY>
<!ATTLIST MULTIANEWARRAY desc CDATA #REQUIRED>
<!ATTLIST MULTIANEWARRAY dims CDATA #REQUIRED>
<!ELEMENT NEW EMPTY>
<!ATTLIST NEW desc CDATA #REQUIRED>
<!ELEMENT NEWARRAY EMPTY>
<!ATTLIST NEWARRAY value CDATA #REQUIRED>
<!ELEMENT NOP EMPTY>
<!ELEMENT POP EMPTY>
<!ELEMENT POP2 EMPTY>
<!ELEMENT PUTFIELD EMPTY>
<!ATTLIST PUTFIELD desc CDATA #REQUIRED>
<!ATTLIST PUTFIELD name CDATA #REQUIRED>
<!ATTLIST PUTFIELD owner CDATA #REQUIRED>
<!ELEMENT PUTSTATIC EMPTY>
<!ATTLIST PUTSTATIC desc CDATA #REQUIRED>
<!ATTLIST PUTSTATIC name CDATA #REQUIRED>
<!ATTLIST PUTSTATIC owner CDATA #REQUIRED>
<!ELEMENT RET EMPTY>
<!ATTLIST RET var CDATA #REQUIRED>
<!ELEMENT RETURN EMPTY>
<!ELEMENT SALOAD EMPTY>
<!ELEMENT SASTORE EMPTY>
<!ELEMENT SIPUSH EMPTY>
<!ATTLIST SIPUSH value CDATA #REQUIRED>
<!ELEMENT LOOKUPSWITCH ( label+ )>
<!ATTLIST LOOKUPSWITCH dflt CDATA #REQUIRED>
<!ELEMENT TABLESWITCH ( label+ )>
<!ATTLIST TABLESWITCH dflt CDATA #REQUIRED>
<!ATTLIST TABLESWITCH max CDATA #REQUIRED>
<!ATTLIST TABLESWITCH min CDATA #REQUIRED>
<!ELEMENT label EMPTY>
<!ATTLIST label key CDATA #IMPLIED>
<!ATTLIST label name CDATA #REQUIRED>

View File

@ -1,96 +0,0 @@
<html>
<!--
* ASM XML Adapter
* Copyright (c) 2004-2011, Eugene Kuleshov
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
-->
<body>
Provides <a href="http://sax.sourceforge.net/">SAX 2.0</a> adapters for ASM
visitors to convert classes to and from XML.
These adapters can be chained with other SAX compliant content handlers and
filters, eg. XSLT or XQuery engines. This package is bundled as
a separate <tt>asm-xml.jar</tt> library and requires <tt>asm.jar</tt>.
<p>
<tt>ASMContentHandler</tt> and <tt>SAXClassAdapter/SAXCodeAdapter</tt>
are using <a href="asm-xml.dtd">asm-xml.dtd</a>.
Here is the example of bytecode to bytecode XSLT transformation.
<pre>
SAXTransformerFactory saxtf = ( SAXTransformerFactory) TransformerFactory.newInstance();
Templates templates = saxtf.newTemplates( xsltSource);
TransformerHandler handler = saxtf.newTransformerHandler( templates);
handler.setResult( new SAXResult( new ASMContentHandler( outputStream, computeMax)));
ClassReader cr = new ClassReader( bytecode);
cr.accept( new SAXClassAdapter( handler, cr.getVersion(), false), false);
</pre>
See JAXP and SAX documentation for more detils.
<p>
There are few illustrations of the bytecode transformation with XSLT in
examples directory. The following XSLT procesors has been tested.
<blockquote>
<table border="1" cellspacing="0" cellpadding="3">
<tr>
<th>Engine</td>
<th>javax.xml.transform.TransformerFactory property</td>
</tr>
<tr>
<td>jd.xslt</td>
<td>jd.xml.xslt.trax.TransformerFactoryImpl</td>
</tr>
<tr>
<td>Saxon</td>
<td>net.sf.saxon.TransformerFactoryImpl</td>
</tr>
<tr>
<td>Caucho</td>
<td>com.caucho.xsl.Xsl</td>
</tr>
<tr>
<td>Xalan interpeter</td>
<td>org.apache.xalan.processor.TransformerFactory</td>
</tr>
<tr>
<td>Xalan xsltc</td>
<td>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</td>
</tr>
</table>
</blockquote>
@since ASM 1.4.3
</body>
</html>

View File

@ -83,6 +83,7 @@ import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
* Make the tabs menu and middle mouse button click work on the tab itself not just the close button. * Make the tabs menu and middle mouse button click work on the tab itself not just the close button.
* *
* before 3.0.0: * before 3.0.0:
* EVERYTHING ON THE FUCKING GITHUB ISSUES LOL
* make it use that global last used inside of export as jar * make it use that global last used inside of export as jar
* Spiffy up the plugin console with hilighted lines * Spiffy up the plugin console with hilighted lines
* Take https://github.com/ptnkjke/Java-Bytecode-Editor visualize * Take https://github.com/ptnkjke/Java-Bytecode-Editor visualize
@ -98,7 +99,7 @@ import the.bytecode.club.bytecodeviewer.plugin.PluginManager;
* *
* -----2.9.9-----: * -----2.9.9-----:
* 08/01/2015 - Fixed a pingback concurrency exception issue. * 08/01/2015 - Fixed a pingback concurrency exception issue.
* 08/01/2015 - Fixed a typo for FernFlower decompiler. * 08/03/2015 - Fixed a typo for FernFlower decompiler.
* *
* @author Konloch * @author Konloch
* *

View File

@ -140,6 +140,7 @@ public class KrakatauDecompiler extends Decompiler {
BytecodeViewer.python, BytecodeViewer.python,
"-O", //love you storyyeller <3 "-O", //love you storyyeller <3
BytecodeViewer.krakatauWorkingDirectory + BytecodeViewer.fs + "decompile.py", BytecodeViewer.krakatauWorkingDirectory + BytecodeViewer.fs + "decompile.py",
"-skip", //love you storyyeller <3
"-nauto", "-nauto",
"-path", "-path",
BytecodeViewer.rt+";"+tempJar.getAbsolutePath(), BytecodeViewer.rt+";"+tempJar.getAbsolutePath(),