I want to create a custom annotation (using Java) which would accept other annotations as parameter, something like:
public @interface ExclusiveOr { Annotation[] value(); }
But this causes compiler error ‘invalid type for annotation member’.
Object[] also doesn’t work.
Is there a way to do what I want?
I myself hereby propose a workaround for the given problem:
Well, what I wanted to make possible was something like that:
Proposed workaround:
Define a class with parameter-less constructor (which will be called by your own annotation processor later) in following way:
usage: