mardi 3 août 2021

How can we consolidate the working of a java class into a custom annotation?

I am very new to Java and to annotations. So far, I have been using a .jar file to be imported for my java classes to work. For example, there is a source code for "Controller". I make java objects that inherits the source class Controller and its functions. What I essentially want to do is to remove the need for this source code by consolidating it in an annotation. So, instead of importing the entire source code for controller, I can simply annotate my java class with @Controller.

Let me describe what I have learnt for this so far. I already know how to create custom annotations in Java. I am learning how to do the processing for these annotations. I have also reviewed Java Reflection, which is what I believe the processing will involve majorly.

Please help me with some steps on how to start this task. If there is anything else needed from my end, I would be more than glad to provide. I do not have a test code ready, so I am really into the very start of this project. Would really appreciate your inputs on my query.

Thank you in advance!





Aucun commentaire:

Enregistrer un commentaire