Home | History | Annotate | Download | only in annotation
      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      2 <!--NewPage-->
      3 <HTML>
      4 <HEAD>
      5 <!-- Generated by javadoc (build 1.5.0_16) on Tue Feb 03 09:28:21 PST 2009 -->
      6 <TITLE>
      7 Syntax
      8 </TITLE>
      9 
     10 <META NAME="keywords" CONTENT="javax.annotation.Syntax class">
     11 
     12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
     13 
     14 <SCRIPT type="text/javascript">
     15 function windowTitle()
     16 {
     17     parent.document.title="Syntax";
     18 }
     19 </SCRIPT>
     20 <NOSCRIPT>
     21 </NOSCRIPT>
     22 
     23 </HEAD>
     24 
     25 <BODY BGCOLOR="white" onload="windowTitle();">
     26 
     27 
     28 <!-- ========= START OF TOP NAVBAR ======= -->
     29 <A NAME="navbar_top"><!-- --></A>
     30 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
     31 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
     32 <TR>
     33 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
     34 <A NAME="navbar_top_firstrow"><!-- --></A>
     35 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
     36   <TR ALIGN="center" VALIGN="top">
     37   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
     38   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
     39   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
     40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
     41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
     42   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
     43   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
     44   </TR>
     45 </TABLE>
     46 </TD>
     47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
     48 </EM>
     49 </TD>
     50 </TR>
     51 
     52 <TR>
     53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     54 &nbsp;<A HREF="../../javax/annotation/Signed.html" title="annotation in javax.annotation"><B>PREV CLASS</B></A>&nbsp;
     55 &nbsp;<A HREF="../../javax/annotation/Tainted.html" title="annotation in javax.annotation"><B>NEXT CLASS</B></A></FONT></TD>
     56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     57   <A HREF="../../index.html?javax/annotation/Syntax.html" target="_top"><B>FRAMES</B></A>  &nbsp;
     58 &nbsp;<A HREF="Syntax.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
     59 &nbsp;<SCRIPT type="text/javascript">
     60   <!--
     61   if(window==top) {
     62     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
     63   }
     64   //-->
     65 </SCRIPT>
     66 <NOSCRIPT>
     67   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
     68 </NOSCRIPT>
     69 
     70 
     71 </FONT></TD>
     72 </TR>
     73 <TR>
     74 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
     75   SUMMARY:&nbsp;<A HREF="#annotation_type_required_element_summary">REQUIRED</A>&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
     76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
     77 DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
     78 </TR>
     79 </TABLE>
     80 <A NAME="skip-navbar_top"></A>
     81 <!-- ========= END OF TOP NAVBAR ========= -->
     82 
     83 <HR>
     84 <!-- ======== START OF CLASS DATA ======== -->
     85 <H2>
     86 <FONT SIZE="-1">
     87 javax.annotation</FONT>
     88 <BR>
     89 Annotation Type Syntax</H2>
     90 <HR>
     91 <DL>
     92 <DT><PRE><FONT SIZE="-1">@Documented
     93 <A HREF="../../javax/annotation/meta/TypeQualifier.html" title="annotation in javax.annotation.meta">@TypeQualifier</A>(<A HREF="../../javax/annotation/meta/TypeQualifier.html#applicableTo()">applicableTo</A>=java.lang.String.class)
     94 @Retention(value=RUNTIME)
     95 </FONT>public @interface <B>Syntax</B></DL>
     96 </PRE>
     97 
     98 <P>
     99 This annotation a value that is of a particular syntax, such as Java syntax
    100  or regular expression syntax. This can be used to provide syntax checking of
    101  constant values at compile time, run time checking at runtime, and can assist
    102  IDEs in deciding how to interpret String constants (e.g., should a
    103  refactoring that renames method x() to y() update the String constant "x()").
    104 <P>
    105 
    106 <P>
    107 <HR>
    108 
    109 <P>
    110 <!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->
    111 
    112 <A NAME="annotation_type_required_element_summary"><!-- --></A>
    113 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    114 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    115 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    116 <B>Required Element Summary</B></FONT></TH>
    117 </TR>
    118 <TR BGCOLOR="white" CLASS="TableRowColor">
    119 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    120 <CODE>&nbsp;java.lang.String</CODE></FONT></TD>
    121 <TD><CODE><B><A HREF="../../javax/annotation/Syntax.html#value()">value</A></B></CODE>
    122 
    123 <BR>
    124 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Value indicating the particular syntax denoted by this annotation.</TD>
    125 </TR>
    126 </TABLE>
    127 &nbsp;<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
    128 
    129 <A NAME="annotation_type_optional_element_summary"><!-- --></A>
    130 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    131 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    132 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    133 <B>Optional Element Summary</B></FONT></TH>
    134 </TR>
    135 <TR BGCOLOR="white" CLASS="TableRowColor">
    136 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    137 <CODE>&nbsp;<A HREF="../../javax/annotation/meta/When.html" title="enum in javax.annotation.meta">When</A></CODE></FONT></TD>
    138 <TD><CODE><B><A HREF="../../javax/annotation/Syntax.html#when()">when</A></B></CODE>
    139 
    140 <BR>
    141 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    142 </TR>
    143 </TABLE>
    144 &nbsp;
    145 <P>
    146 
    147 <!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
    148 
    149 <A NAME="annotation_type_element_detail"><!-- --></A>
    150 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    151 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    152 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    153 <B>Element Detail</B></FONT></TH>
    154 </TR>
    155 </TABLE>
    156 
    157 <A NAME="value()"><!-- --></A><H3>
    158 value</H3>
    159 <PRE>
    160 public abstract java.lang.String <B>value</B></PRE>
    161 <DL>
    162 <DD>Value indicating the particular syntax denoted by this annotation.
    163  Different tools will recognize different syntaxes, but some proposed
    164  canonical values are:
    165  <ul>
    166  <li> "Java"
    167  <li> "RegEx"
    168  <li> "JavaScript"
    169  <li> "Ruby"
    170  <li> "Groovy"
    171  <li> "SQL"
    172  <li> "FormatString"
    173  </ul>
    174  
    175  Syntax names can be followed by a colon and a list of key value pairs,
    176  separated by commas. For example, "SQL:dialect=Oracle,version=2.3". Tools
    177  should ignore any keys they don't recognize.
    178 <P>
    179 <DD><DL>
    180 </DL>
    181 </DD>
    182 <DD><DL>
    183 </DL>
    184 </DL>
    185 <A NAME="when()"><!-- --></A><H3>
    186 when</H3>
    187 <PRE>
    188 public abstract <A HREF="../../javax/annotation/meta/When.html" title="enum in javax.annotation.meta">When</A> <B>when</B></PRE>
    189 <DL>
    190 <DD><DL>
    191 </DL>
    192 </DD>
    193 <DD><DL>
    194 </DL>
    195 <DL>
    196 <DT><B>Default:</B><DD>ALWAYS</DD>
    197 </DL>
    198 </DL>
    199 <!-- ========= END OF CLASS DATA ========= -->
    200 <HR>
    201 
    202 
    203 <!-- ======= START OF BOTTOM NAVBAR ====== -->
    204 <A NAME="navbar_bottom"><!-- --></A>
    205 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
    206 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
    207 <TR>
    208 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
    209 <A NAME="navbar_bottom_firstrow"><!-- --></A>
    210 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
    211   <TR ALIGN="center" VALIGN="top">
    212   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
    213   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
    214   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
    215   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
    216   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
    217   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
    218   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
    219   </TR>
    220 </TABLE>
    221 </TD>
    222 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
    223 </EM>
    224 </TD>
    225 </TR>
    226 
    227 <TR>
    228 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    229 &nbsp;<A HREF="../../javax/annotation/Signed.html" title="annotation in javax.annotation"><B>PREV CLASS</B></A>&nbsp;
    230 &nbsp;<A HREF="../../javax/annotation/Tainted.html" title="annotation in javax.annotation"><B>NEXT CLASS</B></A></FONT></TD>
    231 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    232   <A HREF="../../index.html?javax/annotation/Syntax.html" target="_top"><B>FRAMES</B></A>  &nbsp;
    233 &nbsp;<A HREF="Syntax.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
    234 &nbsp;<SCRIPT type="text/javascript">
    235   <!--
    236   if(window==top) {
    237     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
    238   }
    239   //-->
    240 </SCRIPT>
    241 <NOSCRIPT>
    242   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
    243 </NOSCRIPT>
    244 
    245 
    246 </FONT></TD>
    247 </TR>
    248 <TR>
    249 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    250   SUMMARY:&nbsp;<A HREF="#annotation_type_required_element_summary">REQUIRED</A>&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
    251 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    252 DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
    253 </TR>
    254 </TABLE>
    255 <A NAME="skip-navbar_bottom"></A>
    256 <!-- ======== END OF BOTTOM NAVBAR ======= -->
    257 
    258 <HR>
    259 
    260 </BODY>
    261 </HTML>
    262