Reputation: 2598
Is it possible to have an custom annotation that do the same work as another annotation ?
For example if I write @MyCustomAnnotation like I have write @override !
Upvotes: 7
Views: 1598
Reputation: 1252
There's definitely no support for inheritance with Annotations. See: Is there something like Annotation Inheritance in java?
So without that, unless some framework chose to provide extensibility around its annotation processing, you would have a lot of trouble achieving such an effect.
Upvotes: 1