aboutsummaryrefslogtreecommitdiff
path: root/usage_examples/onXExample_post.jpage
diff options
context:
space:
mode:
authorgrootjans <grootjans@gmail.com>2011-02-21 22:03:05 +0100
committergrootjans <grootjans@gmail.com>2011-02-28 16:44:06 +0100
commite0cfacd3b307b1ec9f0b62b2f953f0a0e85d9d1e (patch)
treedd90db57794d6ed84bf2313d7a3025678d528646 /usage_examples/onXExample_post.jpage
parent35e18b9332a909aac013697c90d8240826953caf (diff)
downloadlombok-e0cfacd3b307b1ec9f0b62b2f953f0a0e85d9d1e.tar.gz
lombok-e0cfacd3b307b1ec9f0b62b2f953f0a0e85d9d1e.tar.bz2
lombok-e0cfacd3b307b1ec9f0b62b2f953f0a0e85d9d1e.zip
Issue 192: Add documentation for onMethod=, onParam, onConstructor
still have to make a minor edit in the pre/post files
Diffstat (limited to 'usage_examples/onXExample_post.jpage')
-rw-r--r--usage_examples/onXExample_post.jpage41
1 files changed, 41 insertions, 0 deletions
diff --git a/usage_examples/onXExample_post.jpage b/usage_examples/onXExample_post.jpage
new file mode 100644
index 00000000..f71f16a3
--- /dev/null
+++ b/usage_examples/onXExample_post.jpage
@@ -0,0 +1,41 @@
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.Setter;
+
+public class OnMethodOnParamExample {
+ private int fires = 200;
+ private int firemen = 20;
+ private String fireStationName = "base";
+
+ @Deprecated
+ public int getFires() {
+ return fires;
+ }
+
+ @Deprecated
+ public void setFiremen(int firemen) {
+ this.firemen = firemen;
+ }
+
+ public void setFireStationName(@SuppressWarnings("all") int fireStationName) {
+ this.fireStationName = fireStationName;
+ }
+
+ @Override public String toString() {
+ return String.format("firestation:%s, %d firemen are fighting %d fires", fireStationName, firemen, fires);
+ }
+}
+
+class OnConstructorExample {
+ private final int radishes;
+ private int bananas;
+
+ @Deprecated
+ public OnConstructorExample(int radishes) {
+ this.radishes = radishes;
+ }
+
+ @Override public String toString() {
+ return String.format("I have %d bananas and %d radishes", bananas, radishes);
+ }
+} \ No newline at end of file