aboutsummaryrefslogtreecommitdiff
path: root/usage_examples
diff options
context:
space:
mode:
Diffstat (limited to 'usage_examples')
-rw-r--r--usage_examples/onXExample_post.jpage42
-rw-r--r--usage_examples/onXExample_pre.jpage24
2 files changed, 0 insertions, 66 deletions
diff --git a/usage_examples/onXExample_post.jpage b/usage_examples/onXExample_post.jpage
deleted file mode 100644
index 85e3c58f..00000000
--- a/usage_examples/onXExample_post.jpage
+++ /dev/null
@@ -1,42 +0,0 @@
-import com.google.inject.Inject;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import lombok.Setter;
-import org.hibernate.validator.Min;
-
-public class OnMethodOnParamExample {
- private int bananas;
- private int radishes;
-
- @Deprecated
- public int getBananas() {
- return bananas;
- }
-
- @Min(10)
- public int setRadishes(int radishes) {
- this.radishes = radishes;
- }
-
- @Override public String toString() {
- return String.format("I have %d bananas and %d beautiful radishes", bananas, radishes);
- }
-}
-
-class OnConstructorExample {
- private final Fireman fireman;
- private int fires = 10;
-
- @Inject
- public OnConstructorExample(Fireman fireman) {
- this.fireman = fireman;
- }
-
- public void setFires(@SuppressWarnings("all") int fires) {
- this.fires = fires;
- }
-
- @Override public String toString() {
- return String.format("Fireman: %s has %d fires", fireman, fires);
- }
-} \ No newline at end of file
diff --git a/usage_examples/onXExample_pre.jpage b/usage_examples/onXExample_pre.jpage
deleted file mode 100644
index 1bab3835..00000000
--- a/usage_examples/onXExample_pre.jpage
+++ /dev/null
@@ -1,24 +0,0 @@
-import com.google.inject.Inject;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import lombok.Setter;
-import org.hibernate.validator.Min;
-
-public class OnMethodOnParamExample {
- @Getter(onMethod=@Deprecated) private int bananas;
- @Setter(onMethod=@Min(10)) private int radishes;
-
- @Override public String toString() {
- return String.format("I have %d bananas and %d beautiful radishes", bananas, radishes);
- }
-}
-
-@RequiredArgsConstructor(onConstructor=@Inject)
-class OnConstructorExample {
- private final Fireman fireman;
- @Setter(onParam=@SuppressWarnings("all")) private int fires = 10;
-
- @Override public String toString() {
- return String.format("Fireman: %s has %d fires", fireman, fires);
- }
-} \ No newline at end of file