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.6.0-google-internal) on Mon Jan 04 20:47:56 PST 2010 --> 6 <TITLE> 7 GwtCompatible (Guava Libraries 2010.01.04) 8 </TITLE> 9 10 <META NAME="date" CONTENT="2010-01-04"> 11 12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> 13 14 <SCRIPT type="text/javascript"> 15 function windowTitle() 16 { 17 if (location.href.indexOf('is-external=true') == -1) { 18 parent.document.title="GwtCompatible (Guava Libraries 2010.01.04)"; 19 } 20 } 21 </SCRIPT> 22 <NOSCRIPT> 23 </NOSCRIPT> 24 25 </HEAD> 26 27 <BODY BGCOLOR="white" onload="windowTitle();"> 28 <HR> 29 30 31 <!-- ========= START OF TOP NAVBAR ======= --> 32 <A NAME="navbar_top"><!-- --></A> 33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A> 34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 35 <TR> 36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 37 <A NAME="navbar_top_firstrow"><!-- --></A> 38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 39 <TR ALIGN="center" VALIGN="top"> 40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/GwtCompatible.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 48 </TR> 49 </TABLE> 50 </TD> 51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 52 </EM> 53 </TD> 54 </TR> 55 56 <TR> 57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 58 PREV CLASS 59 <A HREF="../../../../com/google/common/annotations/GwtIncompatible.html" title="annotation in com.google.common.annotations"><B>NEXT CLASS</B></A></FONT></TD> 60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 61 <A HREF="../../../../index.html?com/google/common/annotations/GwtCompatible.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="GwtCompatible.html" target="_top"><B>NO FRAMES</B></A> 63 <SCRIPT type="text/javascript"> 64 <!-- 65 if(window==top) { 66 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 67 } 68 //--> 69 </SCRIPT> 70 <NOSCRIPT> 71 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 72 </NOSCRIPT> 73 74 75 </FONT></TD> 76 </TR> 77 <TR> 78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 79 SUMMARY: REQUIRED | <A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD> 80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 81 DETAIL: <A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD> 82 </TR> 83 </TABLE> 84 <A NAME="skip-navbar_top"></A> 85 <!-- ========= END OF TOP NAVBAR ========= --> 86 87 <HR> 88 <!-- ======== START OF CLASS DATA ======== --> 89 <H2> 90 <FONT SIZE="-1"> 91 com.google.common.annotations</FONT> 92 <BR> 93 Annotation Type GwtCompatible</H2> 94 <HR> 95 <DL> 96 <DT><PRE><FONT SIZE="-1"><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</A>=<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#CLASS" title="class or interface in java.lang.annotation">CLASS</A>) 97 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</A>={<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</A>,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</A>}) 98 </FONT>public @interface <B>GwtCompatible</B></DL> 99 </PRE> 100 101 <P> 102 The presence of this annotation on a type indicates that the type may be 103 used with the 104 <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> (GWT). 105 When applied to a method, the return type of the method is GWT compatible. 106 It's useful to indicate that an instance created by factory methods has a GWT 107 serializable type. In the following example, 108 109 <pre style="code"> 110 @GwtCompatible 111 class Lists { 112 ... 113 @GwtCompatible(serializable = true) 114 static <E> List<E> newArrayList(E... elements) { 115 ... 116 } 117 } 118 </pre> 119 The return value of <code>Lists.newArrayList(E[])</code> has GWT 120 serializable type. It is also useful in specifying contracts of interface 121 methods. In the following example, 122 123 <pre style="code"> 124 @GwtCompatible 125 interface ListFactory { 126 ... 127 @GwtCompatible(serializable = true) 128 <E> List<E> newArrayList(E... elements); 129 } 130 </pre> 131 The <code>newArrayList(E[])</code> method of all implementations of <code>ListFactory</code> is expected to return a value with a GWT serializable type. 132 133 <p>Note that a <code>GwtCompatible</code> type may have some <A HREF="../../../../com/google/common/annotations/GwtIncompatible.html" title="annotation in com.google.common.annotations"><CODE>GwtIncompatible</CODE></A> methods. 134 <P> 135 136 <P> 137 <DL> 138 <DT><B>Author:</B></DT> 139 <DD>Charles Fry, Hayward Chan</DD> 140 </DL> 141 <HR> 142 143 <P> 144 <!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 145 146 <A NAME="annotation_type_optional_element_summary"><!-- --></A> 147 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 148 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 149 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 150 <B>Optional Element Summary</B></FONT></TH> 151 </TR> 152 <TR BGCOLOR="white" CLASS="TableRowColor"> 153 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 154 <CODE> boolean</CODE></FONT></TD> 155 <TD><CODE><B><A HREF="../../../../com/google/common/annotations/GwtCompatible.html#emulated()">emulated</A></B></CODE> 156 157 <BR> 158 When <code>true</code>, the annotated type is emulated in GWT.</TD> 159 </TR> 160 <TR BGCOLOR="white" CLASS="TableRowColor"> 161 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 162 <CODE> boolean</CODE></FONT></TD> 163 <TD><CODE><B><A HREF="../../../../com/google/common/annotations/GwtCompatible.html#serializable()">serializable</A></B></CODE> 164 165 <BR> 166 When <code>true</code>, the annotated type or the type of the method return 167 value is GWT serializable.</TD> 168 </TR> 169 </TABLE> 170 171 <P> 172 <A NAME="serializable()"><!-- --></A><H3> 173 serializable</H3> 174 <PRE> 175 public abstract boolean <B>serializable</B></PRE> 176 <DL> 177 <DD>When <code>true</code>, the annotated type or the type of the method return 178 value is GWT serializable. 179 <P> 180 <DD><DL> 181 </DL> 182 </DD> 183 <DD><DL> 184 <DT><B>See Also:</B><DD><a href="http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&t=DevGuideSerializableTypes"> 185 Documentation about GWT serialization</a></DL> 186 <DL> 187 <DT><B>Default:</B><DD>false</DD> 188 </DL> 189 </DL> 190 <HR> 191 192 <A NAME="emulated()"><!-- --></A><H3> 193 emulated</H3> 194 <PRE> 195 public abstract boolean <B>emulated</B></PRE> 196 <DL> 197 <DD>When <code>true</code>, the annotated type is emulated in GWT. The emulated 198 source (also known as super-source) is different from the implementation 199 used by the JVM. 200 <P> 201 <DD><DL> 202 </DL> 203 </DD> 204 <DD><DL> 205 <DT><B>See Also:</B><DD><a href="http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&t=DevGuideModuleXml"> 206 Documentation about GWT emulated source</a></DL> 207 <DL> 208 <DT><B>Default:</B><DD>false</DD> 209 </DL> 210 </DL> 211 <!-- ========= END OF CLASS DATA ========= --> 212 <HR> 213 214 215 <!-- ======= START OF BOTTOM NAVBAR ====== --> 216 <A NAME="navbar_bottom"><!-- --></A> 217 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 218 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 219 <TR> 220 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 221 <A NAME="navbar_bottom_firstrow"><!-- --></A> 222 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 223 <TR ALIGN="center" VALIGN="top"> 224 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 225 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 226 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 227 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/GwtCompatible.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 228 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 229 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 230 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 231 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 232 </TR> 233 </TABLE> 234 </TD> 235 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 236 </EM> 237 </TD> 238 </TR> 239 240 <TR> 241 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 242 PREV CLASS 243 <A HREF="../../../../com/google/common/annotations/GwtIncompatible.html" title="annotation in com.google.common.annotations"><B>NEXT CLASS</B></A></FONT></TD> 244 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 245 <A HREF="../../../../index.html?com/google/common/annotations/GwtCompatible.html" target="_top"><B>FRAMES</B></A> 246 <A HREF="GwtCompatible.html" target="_top"><B>NO FRAMES</B></A> 247 <SCRIPT type="text/javascript"> 248 <!-- 249 if(window==top) { 250 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 251 } 252 //--> 253 </SCRIPT> 254 <NOSCRIPT> 255 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 256 </NOSCRIPT> 257 258 259 </FONT></TD> 260 </TR> 261 <TR> 262 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 263 SUMMARY: REQUIRED | <A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD> 264 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 265 DETAIL: <A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD> 266 </TR> 267 </TABLE> 268 <A NAME="skip-navbar_bottom"></A> 269 <!-- ======== END OF BOTTOM NAVBAR ======= --> 270 271 <HR> 272 273 </BODY> 274 </HTML> 275