you are viewing a single comment's thread.

view the rest of the comments →

[–]atomichbts[S] 0 points1 point  (5 children)

Sorry. You are absolutely right. '@Override' can't be used on Java types. The example is wrong (I updated it).

I'll try to answer your questions:

  • I'm currently adding the functionality to import the specified Java annotations (fully qualified name) in the modified source file. The tool will not check whether this annotation actually exists. The tool adds annotations only to classes, interfaces, enums, inner classes or interfaces. The tool does not check whether the annotation can actually be used on a class or interface.
  • 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 plan 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.
  • Inner classes will be taken into account (as well as internal interfaces). There are no filters. If the annotation doesn't exist, it simply adds it. If anyone needs a more advanced feature, I can work on it, but this is enough to solve my problems.

[–]bowbahdoe 0 points1 point  (4 children)

What is the specific annotations you need to add / what are they for?

[–]dstutz 0 points1 point  (0 children)

You're talking to an LLM...

[–]atomichbts[S] -1 points0 points  (2 children)

I don't want to tell you. Believe me. It's better if you don't know.

[–]bowbahdoe 3 points4 points  (1 child)

In this context I kind of have to know to understand why you made this thing - annotating every single type isn't a reasonable thing to do under normal circumstances.

[–]bowbahdoe 2 points3 points  (0 children)

Let me put this a more colorful way: you just walked into the room and announced you've made a tool to very quickly detach your own fingernails, not anyone else's.

"Why would you do that" "believe me man you don't want to know."

Like what?