Top Description Methods
javax.annotation

public @Interface Syntax

extends Annotation
Annotations
@Documented
@TypeQualifier
applicableTo:CharSequence
@Retention:RUNTIME
Imports
java.lang.annotation.Documented, .Retention, .RetentionPolicy, javax.annotation.meta.TypeQualifier, .When

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()").

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a name indicating the particular syntax.
value
()

Value indicating the particular syntax denoted by this annotation.

public When
when()

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

Value 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"

Syntax names can be followed by a colon and a list of key value pairs, separated by commas. For example, "SQL:dialect=Oracle,version=2.3". Tools should ignore any keys they don't recognize.

Returns:String

a name indicating the particular syntax.

whenback to summary
public When when()