A
A
Alexey22222019-03-31 10:31:30
Java
Alexey2222, 2019-03-31 10:31:30

Why is an Access annotation needed? Do I understand how it works correctly?

Do I understand correctly that it is only needed to read annotations from attributes / getters? Can you write which of these statements are correct and which are not?
If the class has Access.FIELD, then annotations will be read from attributes, if PROPERTY - then from methods.
And if the class has FIELD, and one method has PROPERTY, then annotations will be read for the entire class at attributes, and where PROPERTY is at the method.
And the question is: why do this? Why write these extra. annotations, when you can just change the annotations in the code itself for accessors / attributes?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question