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 git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7947 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/resources/client/ClientBundle.java b/user/src/com/google/gwt/resources/client/ClientBundle.java index a25cba5..7bbd76c 100644 --- a/user/src/com/google/gwt/resources/client/ClientBundle.java +++ b/user/src/com/google/gwt/resources/client/ClientBundle.java
@@ -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();
diff --git a/user/src/com/google/gwt/resources/client/CssResource.java b/user/src/com/google/gwt/resources/client/CssResource.java index 6f4baec..1578095 100644 --- a/user/src/com/google/gwt/resources/client/CssResource.java +++ b/user/src/com/google/gwt/resources/client/CssResource.java
@@ -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 { }
diff --git a/user/src/com/google/gwt/resources/client/GwtCreateResource.java b/user/src/com/google/gwt/resources/client/GwtCreateResource.java index a13b32a..ca5aa35 100644 --- a/user/src/com/google/gwt/resources/client/GwtCreateResource.java +++ b/user/src/com/google/gwt/resources/client/GwtCreateResource.java
@@ -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();
diff --git a/user/src/com/google/gwt/resources/client/ImageResource.java b/user/src/com/google/gwt/resources/client/ImageResource.java index 8095ed5..b918d7e 100644 --- a/user/src/com/google/gwt/resources/client/ImageResource.java +++ b/user/src/com/google/gwt/resources/client/ImageResource.java
@@ -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 { /**
diff --git a/user/src/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.java b/user/src/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.java index 65bc9fe..1524923 100644 --- a/user/src/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.java +++ b/user/src/com/google/gwt/user/client/rpc/RemoteServiceRelativePath.java
@@ -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 { /**