Answer the question
In order to leave comments, you need to log in
How to intercept main method call in java?
Good afternoon.
Interested in the following question. For example, the hibernate framework, JPA annotations are read and the process of creating / updating tables (etc.) according to the objects begins - I understand that all this is done using Reflection. This all happens before the main execution of the code, which is placed in the main () method. This raises the question, how is interception or something else carried out so that the code from the library is executed first, and then the entire main code?
Answer the question
In order to leave comments, you need to log in
A simple and clear article "Annotations in JAVA: an overview of the syntax and creating your own." Start with her. At the end of the article are recommendations for further study.
https://habr.com/ru/post/139736/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question