Creating annotation in java [Java AnnotationsundefinedReflection API]

Опубликовано: 17 Июнь 2020
на канале: MJC
8,163
183

We create our own annotations. We study what the annotation consists of, what they are for and how to process them. Nikolai Bunis, senior engineer, will tell you about the main components of an annotation, its life cycle and scope. Using the Reflection API, let's figure out how to create our own annotation and write our annotation handler.undefined
As an example, let's take a familiar situation when you need to validate class fields for the minimum and maximum length, match the email template, and so on. There are 2 main options for how to do this. The first is to write the validation logic for each specific class every time. Well, the second option is to make an annotation processor and annotate the class fields. Thus, the logic will be written once. It is this example that we will analyze in our video.

Like, write in the comments what other examples with annotations you would like to analyze.
________
An example from the video can be found at the link below:
Bitbucket: https://bitbucket.org/nbu-team-one/ex...
________
Subscribe to our social networks:
Instagram:   / mjc.talks  
MJC Telegram Chat: https://t.me/mjcby
Community page: https://mjc.by


Смотрите видео Creating annotation in java [Java AnnotationsundefinedReflection API] онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь MJC 17 Июнь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 8,163 раз и оно понравилось 183 людям.