P
P
prizrak392020-01-22 14:19:25
Java
prizrak39, 2020-01-22 14:19:25

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

1 answer(s)
D
Dmitry Roo, 2020-01-22
@xez

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 question

Ask a Question

731 491 924 answers to any question