Col-E / CAFED00D

Obfuscation resilent Java class reader/writer
MIT License
122 stars 14 forks source link

Finish implementing complete class file spec #2

Open Col-E opened 4 years ago

Col-E commented 4 years ago

Currently, many attributes use a raw byte[] dummy implementation, which works for IO purposes... but this does not allow users to explore the class using Cafedude's defined types and restricts the ability to parse things in detail.

JCWasmx86 commented 3 years ago

Hey, I would like to help you and implement some/all attributes.

Col-E commented 3 years ago

That'd be great!

I don't have a real contribution guide set up, but in general the process is:

  1. Pick an attribute from the switch in ClassFileReader
  2. Find the relevant section on the class file spec page and check what order of u1, u2, u4 etc (Example: LineNumberTable)
  3. Create the class in me/coley/cafedude/attribute
  4. Fill out the switch-case in the reader class to construct a new instance of the attribute class
  5. Fill out the switch-case in the writer class to write back an instance of the attribute to the output stream
  6. Verify that the test class EqualityIOTest passes, which means the read/writes are identical

I was working a bit on the develop branch for annotation processing. It includes some refactoring so you may want to branch off of it instead of master.