diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-07-11 11:34:29 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-07-11 11:34:29 +0200 |
commit | 98382c6640798846efcc11113116cb46fb820595 (patch) | |
tree | 435ee0dad34995b5d6bb1ae53fd4e6f3207caf93 | |
parent | f84f3a1bc8407160b82580300d2a58fd8c66aaa1 (diff) | |
download | lombok-98382c6640798846efcc11113116cb46fb820595.tar.gz lombok-98382c6640798846efcc11113116cb46fb820595.tar.bz2 lombok-98382c6640798846efcc11113116cb46fb820595.zip |
Added examples with pre and post lombok conversion for the website.
-rw-r--r-- | usage_examples/GetterSetterExample_post.jpage | 20 | ||||
-rw-r--r-- | usage_examples/GetterSetterExample_pre.jpage | 12 | ||||
-rw-r--r-- | website/features/GetterSetterExample.png | bin | 0 -> 76859 bytes |
3 files changed, 32 insertions, 0 deletions
diff --git a/usage_examples/GetterSetterExample_post.jpage b/usage_examples/GetterSetterExample_post.jpage new file mode 100644 index 00000000..b0921b86 --- /dev/null +++ b/usage_examples/GetterSetterExample_post.jpage @@ -0,0 +1,20 @@ +public class GetterSetterExample { + private int age = 10; + private String name; + + @Override public String toString() { + return String.format("%s (age: %d)", age, name); + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + protected void setName(String name) { + this.name = name; + } +} diff --git a/usage_examples/GetterSetterExample_pre.jpage b/usage_examples/GetterSetterExample_pre.jpage new file mode 100644 index 00000000..0da1d2e2 --- /dev/null +++ b/usage_examples/GetterSetterExample_pre.jpage @@ -0,0 +1,12 @@ +import lombok.AccessLevel; +import lombok.Getter; +import lombok.Setter; + +public class GetterSetterExample { + private @Getter @Setter int age = 10; + private @Setter(AccessLevel.PROTECTED) String name; + + @Override public String toString() { + return String.format("%s (age: %d)", age, name); + } +} diff --git a/website/features/GetterSetterExample.png b/website/features/GetterSetterExample.png Binary files differnew file mode 100644 index 00000000..785a5984 --- /dev/null +++ b/website/features/GetterSetterExample.png |