Releases: TeamworkGuy2/ClassLoading
Releases · TeamworkGuy2/ClassLoading
ClassLoading 0.6.0
Add loop and if-statements detection to decompilation, also handle basic try-catch and synchronized blocks.
Added
StringBuilderIndentprovides the same API asStringBuilder(unfortunately we can't extend StringBuilder because it is final) and implementsIndentso that this class can be used to easily build source code stringssrc/twg2/jbcm/toSource/structureswith 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.CodetoClassString()renamedtoClassCodeString()CpIndexChangeris now stateful and contains the old and new index and uses a proper visitor pattern to handle changing indexesIndentchanged from a class to an interface with a public staticImplsubclassIterateCoderenamedCodeIteratorRuntimeReloadMainrefactored, more complex threaded loading and invocation of methods from updated class files, some code moved to new classestwg2.jbcm.runtime.ClassLoadersandFileUtilitytwg2.jbcm.runtimeLoadingpackage renamedtwg2.jbcm.runtimeCodeFlowcontains algorithms for detecting loops and if-statements in byte codeDataCountingInputStreamadded and used inClassFilewhen parsing a class to improve debug and error message with exact byte index locations- Several new unit/integration tests added,
CompileTestrenamedCompileJava - Fixed compiling code during runtime to support class names with arbitrary package paths, required extensive changes to
CompileSource JumpConditionInforewritten to support representing loop and nested if-statement conditionsTypeUtility.classNameFieldDescriptor()renamedtoBinaryClassName()
ClassLoading 0.5.1
Fix switch statements to decompile much more accurately based on code flow analysis. Start work on if statements.
Added
- new
Indentclass to handleSourceWriterindentation Switchto handle switch code flow initialization and info
Changed
- Add code flow analysis initialization and info to
JumpConditionInfo - Assume that a forward goto right before a condition is an
elsestatement
ClassLoading 0.5.0
Decompilation to source code in-progress and first round trip compile/decompile unit tests
Added
- A new
twg2.jbcm.irpackage with helper classes for tracking state and data related to decompilation CodeOffsetGetterinterface implemented byChangeCpIndexCodeFlowfor helping analyze potential code flow paths through a method- Unit tests with tests which perform compilation of source code and check decompilation back to intermediate view
Changed
CodeToSourceis in-progress, simple code can be converted, loops, switch statements, and interface/dynamic method calls are still TODO- Split
IoUtilityinto newCodeUtilityclass and moved static no-opCpIndexChangerandCodeOffsetChangerinto their respective interfaces - Renamed
ByteCodeConsumer->BytcodeConsumer - Moved
MethodStackto newtwg2.jbcm.irpackage - Lots of new functionality in
Opcodesto support to source decompilation - Extensive
CompileSourcechanges/improvements to support simple use cases like compiling in-memory (although a physical temp file still gets written under the hood) - Moved
LookupswitchOffsetModifierandTableswitchOffsetModifierout ofIoUtilityand into their own classes
Removed
CpIndexChanger.shiftIndex()interface method since it was unused andCodeOffsetChangeris equivalent- Unused classes:
Offset,OffsetOpcode,Opcode,OpcodeObject
ClassLoading 0.3.0
Changed
- Upgrade to Java 9
- Java 9 ClassFile format support:
- New Attributes:
Module,ModuleMainClass,ModulePackages - New constant pool types:
CONSTANT_Module,CONSTANT_Package
- New Attributes:
- Renamed/changed the
public static final int CONSTANT_*_infofield topublic static final byte TAGand removed the instancedtagfield from all constantPool classes - Renamed
Target_Info_Type->Target_Info_Union - Consolidated
twg2.jbcm.classFormat.attributes, nested classes that are only used by one class inside the class - Added/fixed several attributes'
toString()methods - Cleaned up some attributes field documentation
- Renamed
UnitTest->UsageCliMainand added support for printing dependencies and loading multiple classes, printing multiple classes, and clearing loaded classes
ClassLoading 0.2.1
Changed
- Forgot to update jar file
ClassLoading 0.2.0
Changed
- Cleaned up unnecessary twg2.jbcm.opcode package classes
- Renamed twg2.jbcm.modify.IndexChange -> IndexChanger
- Renamed twg2.jbcm.modify.OpcodeChangeCpIndex -> CpIndexChanger
- Renamed twg2.jbcm.modify.OpcodeChangeOffset -> CodeOffsetChanger
ClassLoading 0.1.0
Added
- Initial versioning of existing code, including classfile loading/parsing, dynamic classfile modification, and runtime class loading.
ClassLoading 0.4.0
Added
ClassFileToSourceandCodeToSourcework-in-progress to convert class file back into Java source codeCONSTANT_CP_Info.toShortString()added interface method and to implementations
Changed
- Clean up
Settingsmega-utility class. Move methods intoConstantPoolExtensions,ClassFile, andClassFileAttributes - Cleaned up
Opcodes
Removed
- Unused
ConstantPoolIndexArrayandConstantPoolTagannotations