Revision: 7947
Author: [email protected]
Date: Mon Apr 19 11:58:31 2010
Log: Make ClientBundle- and RPC-related annotations have runtime retention to support developers that want to re-use these classes in a dynamic server environment.
http://code.google.com/p/google-web-toolkit/issues/detail?id=3803
http://code.google.com/p/google-web-toolkit/issues/detail?id=4797
Patch by: bobv
Review by: rjrjr

Review at http://gwt-code-reviews.appspot.com/306802

http://code.google.com/p/google-web-toolkit/source/detail?r=7947

Modified:
 /trunk/user/src/com/google/gwt/resources/client/ClientBundle.java
 /trunk/user/src/com/google/gwt/resources/client/CssResource.java
 /trunk/user/src/com/google/gwt/resources/client/GwtCreateResource.java
 /trunk/user/src/com/google/gwt/resources/client/ImageResource.java
/trunk/user/src/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.java

=======================================
--- /trunk/user/src/com/google/gwt/resources/client/ClientBundle.java Mon Nov 23 16:21:36 2009 +++ /trunk/user/src/com/google/gwt/resources/client/ClientBundle.java Mon Apr 19 11:58:31 2010
@@ -19,6 +19,8 @@
 import com.google.gwt.resources.rg.BundleResourceGenerator;

 import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;

 /**
@@ -35,6 +37,7 @@
* Specifies the classpath location of the resource or resources associated
    * with the {...@link ResourcePrototype}.
    */
+  @Retention(RetentionPolicy.RUNTIME)
   @Target(ElementType.METHOD)
   public @interface Source {
     String[] value();
=======================================
--- /trunk/user/src/com/google/gwt/resources/client/CssResource.java Sat Oct 10 13:50:44 2009 +++ /trunk/user/src/com/google/gwt/resources/client/CssResource.java Mon Apr 19 11:58:31 2010
@@ -21,6 +21,8 @@

 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;

 /**
@@ -162,6 +164,7 @@
    * </pre>
    */
   @Documented
+  @Retention(RetentionPolicy.RUNTIME)
   @Target(ElementType.METHOD)
   public @interface ClassName {
     String value();
@@ -209,6 +212,7 @@
    * CssResource.
    */
   @Documented
+  @Retention(RetentionPolicy.RUNTIME)
   @Target(ElementType.METHOD)
   public @interface Import {
     Class<? extends CssResource>[] value();
@@ -221,6 +225,7 @@
    * @see Import
    */
   @Documented
+  @Retention(RetentionPolicy.RUNTIME)
   @Target(ElementType.TYPE)
   public @interface ImportedWithPrefix {
     String value();
@@ -242,6 +247,7 @@
    * </pre>
    */
   @Documented
+  @Retention(RetentionPolicy.RUNTIME)
   @Target(ElementType.METHOD)
   public @interface NotStrict {
   }
@@ -286,6 +292,7 @@
    * enough to warrant an easier use-case.
    */
   @Documented
+  @Retention(RetentionPolicy.RUNTIME)
   @Target(ElementType.TYPE)
   public @interface Shared {
   }
@@ -296,6 +303,7 @@
    * @deprecated Strict mode is now the default behavior for CssResource
    */
   @Deprecated
+  @Retention(RetentionPolicy.RUNTIME)
   @Target(ElementType.METHOD)
   public @interface Strict {
   }
=======================================
--- /trunk/user/src/com/google/gwt/resources/client/GwtCreateResource.java Wed Mar 11 17:58:41 2009 +++ /trunk/user/src/com/google/gwt/resources/client/GwtCreateResource.java Mon Apr 19 11:58:31 2010
@@ -20,6 +20,8 @@

 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;

 /**
@@ -47,6 +49,7 @@
    * </pre>
    */
   @Documented
+  @Retention(RetentionPolicy.RUNTIME)
   @Target(ElementType.METHOD)
   public @interface ClassType {
     Class<?> value();
=======================================
--- /trunk/user/src/com/google/gwt/resources/client/ImageResource.java Thu Aug 20 05:44:21 2009 +++ /trunk/user/src/com/google/gwt/resources/client/ImageResource.java Mon Apr 19 11:58:31 2010
@@ -21,6 +21,8 @@

 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;

 /**
@@ -34,6 +36,7 @@
    * Specifies additional options to control how an image is bundled.
    */
   @Documented
+  @Retention(RetentionPolicy.RUNTIME)
   @Target(ElementType.METHOD)
   public @interface ImageOptions {
     /**
=======================================
--- /trunk/user/src/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.java Sun Mar 9 21:59:14 2008 +++ /trunk/user/src/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.java Mon Apr 19 11:58:31 2010
@@ -17,6 +17,8 @@

 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;

 /**
@@ -29,6 +31,7 @@
  * default path.
  */
 @Documented
+...@retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.TYPE)
 public @interface RemoteServiceRelativePath {
   /**

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to