CAFED00D icon indicating copy to clipboard operation
CAFED00D copied to clipboard

Finish implementing complete class file spec

Open Col-E opened this issue 4 years ago • 2 comments

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.

Col-E avatar Aug 20 '20 05:08 Col-E

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

JCWasmx86 avatar Jan 29 '21 08:01 JCWasmx86

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.

Col-E avatar Jan 29 '21 15:01 Col-E