Annotation is another annotation.

Is it possible to have a custom annotation that does the same job as another annotation?

for example, if I write @MyCustomAnnotation, as if I have a @override entry!

+6
source share
1 answer

There is definitely no support for inheritance using annotations. See: Is there something like annotation inheritance in java?

Thus, without this, if some structure did not decide to provide extensibility around its annotation processing, you would have many problems with achieving this effect.

+1
source

Source: https://habr.com/ru/post/921437/


All Articles