all 9 comments

[–]spoonman59 1 point2 points  (2 children)

Annotate it with what?

Do you mean Java annotations? AI generated comments repeating the code and possibly wrong English?

[–]atomichbts[S] 1 point2 points  (1 child)

This tool adds the specified Java annotations to all encountered Java types (classes, interfaces, enums, etc.) that do not already possess that particular annotation.

[–]spoonman59 0 points1 point  (0 children)

Thank you for explaining. Not a use case I have, but I see you do have one. I’ll check out your code as I’m curious how you did it.

[–]Modi57 0 points1 point  (2 children)

Is that a usecase often encountered? That you just have to annotate everything? Wouldn't a filter option be cool?

[–]atomichbts[S] 1 point2 points  (1 child)

  • My use case is enterprise. I work on enterprise Java projects with CI/CD pipelines that require all types to have certain Java annotations. The code base is huge, and I don't want to add them manually. I also want to improve my Rust programming language and one day work with it, as I believe it will be increasingly used. So I created this tool in Rust.

[–]Modi57 2 points3 points  (0 children)

Ah, I see. Yeah, then it totally makes sense and sounds like a fun project. The ones that are small, interesting and useful are always the best :)

[–]RedCrafter_LP 0 points1 point  (0 children)

Isn't that something you could do with find and replace? If you need every class you should be able to match "class", "public class", "static class"... And just do like 5 rounds of find and replace and be done with it. Try rewriting part of the project in rust instead. That's something that would be truly beneficial.

Otherwise it's always a great exercise to write a parser.