aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2012-03-05 20:18:10 +0100
committerRoel Spilker <r.spilker@gmail.com>2012-03-05 20:18:10 +0100
commit4c8cc228e8f72972fa91a6c96d6e5bdf5ab6905c (patch)
tree9756c0ca5699e261d6851180fd6160436593ea67 /test/transform
parent7988f17c28fb8f6a6f99a612f85ee804bed38dfe (diff)
parent73dab3e96613521b8769b29e6a3c7e4ee5f26911 (diff)
downloadlombok-4c8cc228e8f72972fa91a6c96d6e5bdf5ab6905c.tar.gz
lombok-4c8cc228e8f72972fa91a6c96d6e5bdf5ab6905c.tar.bz2
lombok-4c8cc228e8f72972fa91a6c96d6e5bdf5ab6905c.zip
Issue 348: @Delegate should also generate @Deprecated when the interface methods javadoc contains@deprecated
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/DelegateWithDeprecated.java24
-rw-r--r--test/transform/resource/after-ecj/DelegateWithDeprecated.java21
-rw-r--r--test/transform/resource/before/DelegateWithDeprecated.java13
3 files changed, 58 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/DelegateWithDeprecated.java b/test/transform/resource/after-delombok/DelegateWithDeprecated.java
new file mode 100644
index 00000000..04e12160
--- /dev/null
+++ b/test/transform/resource/after-delombok/DelegateWithDeprecated.java
@@ -0,0 +1,24 @@
+class DelegateWithDeprecated {
+ private Bar bar;
+ private interface Bar {
+ @Deprecated
+ void deprecatedAnnotation();
+ /** @deprecated */
+ void deprecatedComment();
+ void notDeprecated();
+ }
+ @java.lang.Deprecated
+ @java.lang.SuppressWarnings("all")
+ public void deprecatedAnnotation() {
+ this.bar.deprecatedAnnotation();
+ }
+ @java.lang.Deprecated
+ @java.lang.SuppressWarnings("all")
+ public void deprecatedComment() {
+ this.bar.deprecatedComment();
+ }
+ @java.lang.SuppressWarnings("all")
+ public void notDeprecated() {
+ this.bar.notDeprecated();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/DelegateWithDeprecated.java b/test/transform/resource/after-ecj/DelegateWithDeprecated.java
new file mode 100644
index 00000000..2a4fdf98
--- /dev/null
+++ b/test/transform/resource/after-ecj/DelegateWithDeprecated.java
@@ -0,0 +1,21 @@
+import lombok.Delegate;
+class DelegateWithDeprecated {
+ private interface Bar {
+ @Deprecated void deprecatedAnnotation();
+ void deprecatedComment();
+ void notDeprecated();
+ }
+ private @Delegate Bar bar;
+ public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void deprecatedAnnotation() {
+ this.bar.deprecatedAnnotation();
+ }
+ public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void deprecatedComment() {
+ this.bar.deprecatedComment();
+ }
+ public @java.lang.SuppressWarnings("all") void notDeprecated() {
+ this.bar.notDeprecated();
+ }
+ DelegateWithDeprecated() {
+ super();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/DelegateWithDeprecated.java b/test/transform/resource/before/DelegateWithDeprecated.java
new file mode 100644
index 00000000..b748c6ec
--- /dev/null
+++ b/test/transform/resource/before/DelegateWithDeprecated.java
@@ -0,0 +1,13 @@
+import lombok.Delegate;
+
+class DelegateWithDeprecated {
+ @Delegate private Bar bar;
+
+ private interface Bar {
+ @Deprecated
+ void deprecatedAnnotation();
+ /** @deprecated */
+ void deprecatedComment();
+ void notDeprecated();
+ }
+} \ No newline at end of file