Comments (9)
Do you have any proposed syntax? My main concern is to find a way to represent all the possible optional attributes in a way that is easy to use and avoids unnecessarily cluttering up the grammar.
from krakatau.
@Ltest/TestClass;(value = "Test")
from krakatau.
I've added runtime annotation support. Try it now.
By the way, annotations like @OverRide are source only, so they're not going to show up in the classfile anyway.
from krakatau.
Having an issue trying to disassemble now.
from krakatau.
Try it now. Sorry I couldn't really test it due to not having any examples of classes with runtime annotations to test it with. But I tested it with ScenterMod so it should work now.
from krakatau.
I tested it out and it managed to only do @Mod.PreInit, @Mod.Init, @Mod.PostInit which are methods. But it missed the two used for the class along w/ the two used for the class fields. When I did a reassemble it didn't place anything w/ the annotations. I also noticed there is another Class Attribute called InnerClasses that might have to be used w/ reassembly.
from krakatau.
Sorry, RuntimeAnnotations are currently only implemented for methods. I would add them for classes and fields, but I'm still investigating a good way to do this. The problem is that fields are currently only a single line, with no obvious way to add attributes.
InnerClasses is a seperate attribute, but I can add support for that once the class/field thing is cleared up.
from krakatau.
I just discovered several more bugs in the assembler. I'll upload everything once I'm done adding support for the other attributes and testing to try to find any more bugs that might be hiding.
from krakatau.
Everything should be working now. The disassembler now supports all defined attributes except for LineNumberTable, LocalVariableTable, and LocalVariableTypeTable, though contentless ones like Deprecated are handled through the generic attribute syntax.
from krakatau.
Related Issues (20)
- Permission denied with disassemble.py, but not with decompile .py HOT 1
- Re-assembled class fails to load (java/lang/ClassFormatError) HOT 11
- Assemble resource files HOT 2
- Decompilation error: AttributeError: 'NoneType' object has no attribute 'type' HOT 4
- try-catch class name causing UnicodeEncodeError: 'ascii' codec can't encode character u'\u200b' in position 0: ordinal not in range(128) HOT 2
- error Traceback (most recent call last) HOT 1
- illegal class/method/package names or modifiers HOT 2
- Interest in Krakatau 2? HOT 85
- bytecode peephole optimization non-looping-loops HOT 6
- Krakatau does not generate local variables info HOT 5
- Missing undocumented opcodes. HOT 3
- Cannot reassemble HOT 4
- is there any grammar book/doc for krak2? HOT 2
- When executing the command, an error "krak2 dis --out temp" HOT 2
- Fields without access flags have an extra space in the disassembly result.
- v2 seems not to have an option to assemble multiple classes into a single .jar HOT 7
- RuntimeError: maximum recursion depth exceeded while calling a Python object HOT 1
- crash with useless trycatches HOT 3
- Assemble .j files in Directory HOT 3
- 'rU' mode generate a backtrace in python 3.11+ HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from krakatau.