Change one annotation into another

42 views
Skip to first unread message

Paul Rubin

unread,
Apr 30, 2021, 10:58:09 AM4/30/21
to Project Lombok
I am trying to write code that supports two frameworks (Quarkus and Spring Boot).  They use similar but different annotation for the same functionalities.  I am getting trapped by the fact that annotations do not inherit.  What I think would solve my problem is if I could make an annotation process for 1 annotation that converts to or adds the alternate correct annotation.

For example: 
Quarkus @ConfigProperties(prefix="foo")
SpringBoot @ConfigurationProperties(prefix="foo")
Super annotation @ConfigurationProperties(prefix="foo")

So I write an annotation process for @ConfigurationProperties in the Quarkus version of my library that changes and or add the @ConfigProperties to the annotated class.

I understand that Lumbok does not do this, I was hoping to borrow some code that could.

I have cloned the project and it is amazingly huge.  I found 7 annotation processors, but they appear to process all annotations.

Can you perhaps point me to one specific one that might give me some clue how to alter the annotations attached to a class?

Thank you.

Jan Materne

unread,
Apr 30, 2021, 11:20:48 AM4/30/21
to project...@googlegroups.com
You could write your own annotation and handlers. The handler could use a configuration to specify the 'dialect' to generate. (Specify the generation strategy).

Jan

--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/project-lombok/830dc937-8a07-46df-b46b-e008946540adn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages