diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-02-02 04:47:21 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-02-02 04:52:20 +0100 |
commit | d8da2b9438056e945ecc38d98fed413444c847b3 (patch) | |
tree | 6d421923faaaf8566a7f827f3a803513c96c602b /usage_examples | |
parent | 46ce592dff458a0561fed900c0659bccb1755a1a (diff) | |
download | lombok-d8da2b9438056e945ecc38d98fed413444c847b3.tar.gz lombok-d8da2b9438056e945ecc38d98fed413444c847b3.tar.bz2 lombok-d8da2b9438056e945ecc38d98fed413444c847b3.zip |
added impl for @UtilityClass.
Diffstat (limited to 'usage_examples')
-rw-r--r-- | usage_examples/experimental/UtilityClassExample_post.jpage | 11 | ||||
-rw-r--r-- | usage_examples/experimental/UtilityClassExample_pre.jpage | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/usage_examples/experimental/UtilityClassExample_post.jpage b/usage_examples/experimental/UtilityClassExample_post.jpage new file mode 100644 index 00000000..70810230 --- /dev/null +++ b/usage_examples/experimental/UtilityClassExample_post.jpage @@ -0,0 +1,11 @@ +public final class UtilityClassExample { + private static final int CONSTANT = 5; + + private UtilityClassExample() { + throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); + } + + public static void addSomething(int in) { + return in + CONSTANT; + } +} diff --git a/usage_examples/experimental/UtilityClassExample_pre.jpage b/usage_examples/experimental/UtilityClassExample_pre.jpage new file mode 100644 index 00000000..85731b81 --- /dev/null +++ b/usage_examples/experimental/UtilityClassExample_pre.jpage @@ -0,0 +1,10 @@ +import lombok.experimental.UtilityClass; + +@UtilityClass +public class UtilityClassExample { + private final int CONSTANT = 5; + + public void addSomething(int in) { + return in + CONSTANT; + } +} |