@ExclusiveWith

Target: Primary or non-primary annotations.

Description: Defines a list of annotations which must NOT be used with the annotated annotation.

JavaDoc: Click here

Attributes:

Name Description Data type Required Default value
value The FQN's of the annotations that must NOT be used with the annotation. String [] Yes -

Example:

@ExclusiveWith("my.package.MyOtherPrimaryAnnotation")
public @interface MyPrimaryAnnotation {
    ...
}

Back to meta-annotation reference