Package javax.annotation
Annotation Type Syntax
@Documented
@TypeQualifier(applicableTo=java.lang.String.class)
@Retention(RUNTIME)
public @interface Syntax
This annotation a value that is of a particular syntax, such as Java syntax
or regular expression syntax. This can be used to provide syntax checking of
constant values at compile time, run time checking at runtime, and can assist
IDEs in deciding how to interpret String constants (e.g., should a
refactoring that renames method x() to y() update the String constant "x()").
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueValue indicating the particular syntax denoted by this annotation. Different tools will recognize different syntaxes, but some proposed canonical values are:- "Java"
- "RegEx"
- "JavaScript"
- "Ruby"
- "Groovy"
- "SQL"
- "FormatString"
-
when
When when- Default:
ALWAYS
-