Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish implementing complete class file spec #2

Open
Col-E opened this issue Aug 20, 2020 · 2 comments
Open

Finish implementing complete class file spec #2

Col-E opened this issue Aug 20, 2020 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Col-E
Copy link
Owner

Col-E commented Aug 20, 2020

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 Col-E added enhancement New feature or request help wanted Extra attention is needed labels Aug 20, 2020
@JCWasmx86
Copy link
Contributor

JCWasmx86 commented Jan 29, 2021

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

@Col-E
Copy link
Owner Author

Col-E commented Jan 29, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants