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 Exhaustive 8 </TITLE> 9 10 <META NAME="keywords" CONTENT="javax.annotation.meta.Exhaustive 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="Exhaustive"; 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> </TD> 38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 39 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 <A HREF="../../../javax/annotation/meta/Exclusive.html" title="annotation in javax.annotation.meta"><B>PREV CLASS</B></A> 55 <A HREF="../../../javax/annotation/meta/TypeQualifier.html" title="annotation in javax.annotation.meta"><B>NEXT CLASS</B></A></FONT></TD> 56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 57 <A HREF="../../../index.html?javax/annotation/meta/Exhaustive.html" target="_top"><B>FRAMES</B></A> 58 <A HREF="Exhaustive.html" target="_top"><B>NO FRAMES</B></A> 59 <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: REQUIRED | OPTIONAL</FONT></TD> 76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 77 DETAIL: ELEMENT</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.meta</FONT> 88 <BR> 89 Annotation Type Exhaustive</H2> 90 <HR> 91 <DL> 92 <DT><PRE><FONT SIZE="-1">@Documented 93 @Retention(value=RUNTIME) 94 </FONT>public @interface <B>Exhaustive</B></DL> 95 </PRE> 96 97 <P> 98 This annotation can be applied to the value() element of an annotation that 99 is annotated as a TypeQualifier. This is only appropriate if the value field 100 returns a value that is an Enumeration. 101 102 Applications of the type qualifier with different values are exclusive, and 103 the enumeration is an exhaustive list of the possible values. 104 105 <<<<<<< .mine 106 For example, the following defines a type qualifier such that if you know 107 a value is neither &#064;Foo(Color.Red) or &#064;Foo(Color.Blue), then the value must be 108 &#064;Foo(Color.Green). And if you know it is &#064;Foo(Color.Green), you know it cannot 109 be &#064;Foo(Color.Red) or &#064;Foo(Color.Blue) 110 111 ======= 112 For example, the following defines a type qualifier such that if you know a 113 value is neither @Foo(Color.Red) or @Foo(Color.Blue), 114 then the value must be @Foo(Color.Green). And if you know it is 115 @Foo(Color.Green), you know it cannot be 116 @Foo(Color.Red) or @Foo(Color.Blue) 117 118 >>>>>>> .r47 119 <code> 120 @TypeQualifier @interface Foo { 121 enum Color {RED, BLUE, GREEN}; 122 @Exhaustive Color value(); 123 } 124 </code> 125 <P> 126 127 <P> 128 129 <P> 130 131 <P> 132 <!-- ========= END OF CLASS DATA ========= --> 133 <HR> 134 135 136 <!-- ======= START OF BOTTOM NAVBAR ====== --> 137 <A NAME="navbar_bottom"><!-- --></A> 138 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 139 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 140 <TR> 141 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 142 <A NAME="navbar_bottom_firstrow"><!-- --></A> 143 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 144 <TR ALIGN="center" VALIGN="top"> 145 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 146 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 147 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 148 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 149 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 150 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 151 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 152 </TR> 153 </TABLE> 154 </TD> 155 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 156 </EM> 157 </TD> 158 </TR> 159 160 <TR> 161 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 162 <A HREF="../../../javax/annotation/meta/Exclusive.html" title="annotation in javax.annotation.meta"><B>PREV CLASS</B></A> 163 <A HREF="../../../javax/annotation/meta/TypeQualifier.html" title="annotation in javax.annotation.meta"><B>NEXT CLASS</B></A></FONT></TD> 164 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 165 <A HREF="../../../index.html?javax/annotation/meta/Exhaustive.html" target="_top"><B>FRAMES</B></A> 166 <A HREF="Exhaustive.html" target="_top"><B>NO FRAMES</B></A> 167 <SCRIPT type="text/javascript"> 168 <!-- 169 if(window==top) { 170 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); 171 } 172 //--> 173 </SCRIPT> 174 <NOSCRIPT> 175 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> 176 </NOSCRIPT> 177 178 179 </FONT></TD> 180 </TR> 181 <TR> 182 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 183 SUMMARY: REQUIRED | OPTIONAL</FONT></TD> 184 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 185 DETAIL: ELEMENT</FONT></TD> 186 </TR> 187 </TABLE> 188 <A NAME="skip-navbar_bottom"></A> 189 <!-- ======== END OF BOTTOM NAVBAR ======= --> 190 191 <HR> 192 193 </BODY> 194 </HTML> 195