Add loop and if-statements detection to decompilation, also handle basic try-catch and synchronized blocks.
Added
StringBuilderIndent
provides the same API asStringBuilder
(unfortunately we can't extend StringBuilder because it is final) and implementsIndent
so that this class can be used to easily build source code stringssrc/twg2/jbcm/toSource/structures
with state handlers for inserting more complex structures such as loops and try-catch statements into source code during opcode iteration
Changed
twg2.jbcm.classFormat.attributes.Code
toClassString()
renamedtoClassCodeString()
CpIndexChanger
is now stateful and contains the old and new index and uses a proper visitor pattern to handle changing indexesIndent
changed from a class to an interface with a public staticImpl
subclassIterateCode
renamedCodeIterator
RuntimeReloadMain
refactored, more complex threaded loading and invocation of methods from updated class files, some code moved to new classestwg2.jbcm.runtime.ClassLoaders
andFileUtility
twg2.jbcm.runtimeLoading
package renamedtwg2.jbcm.runtime
CodeFlow
contains algorithms for detecting loops and if-statements in byte codeDataCountingInputStream
added and used inClassFile
when parsing a class to improve debug and error message with exact byte index locations- Several new unit/integration tests added,
CompileTest
renamedCompileJava
- Fixed compiling code during runtime to support class names with arbitrary package paths, required extensive changes to
CompileSource
JumpConditionInfo
rewritten to support representing loop and nested if-statement conditionsTypeUtility.classNameFieldDescriptor()
renamedtoBinaryClassName()