[email protected]

A single-element annotation is a shorthand notation typically for use with single-element annotation types, whose only annotation type element is declared as a value() element. Single-element annotation will not work if the element in the single-element annotation type is not declared as a value() element. However, there is no requirement that the single element should be either required or optional. Note that there is no restriction on declaring a value() element for any annotation type, but that alone does not guarantee that single-element annotation can be used.