aboutsummaryrefslogtreecommitdiff
path: root/usage_examples
diff options
context:
space:
mode:
Diffstat (limited to 'usage_examples')
-rw-r--r--usage_examples/BuilderExample_post.jpage87
-rw-r--r--usage_examples/BuilderExample_pre.jpage11
-rw-r--r--usage_examples/CleanupExample_post.jpage26
-rw-r--r--usage_examples/CleanupExample_pre.jpage15
-rw-r--r--usage_examples/ConstructorExample_post.jpage28
-rw-r--r--usage_examples/ConstructorExample_pre.jpage16
-rw-r--r--usage_examples/DataExample_post.jpage119
-rw-r--r--usage_examples/DataExample_pre.jpage18
-rw-r--r--usage_examples/EqualsAndHashCodeExample_post.jpage72
-rw-r--r--usage_examples/EqualsAndHashCodeExample_pre.jpage25
-rw-r--r--usage_examples/GetterLazyExample_post.jpage26
-rw-r--r--usage_examples/GetterLazyExample_pre.jpage13
-rw-r--r--usage_examples/GetterSetterExample_post.jpage42
-rw-r--r--usage_examples/GetterSetterExample_pre.jpage26
-rw-r--r--usage_examples/LogExample_post.jpage23
-rw-r--r--usage_examples/LogExample_pre.jpage26
-rw-r--r--usage_examples/NonNullExample_post.jpage13
-rw-r--r--usage_examples/NonNullExample_pre.jpage10
-rw-r--r--usage_examples/Singular-snippetExample_post.jpage160
-rw-r--r--usage_examples/Singular-snippetExample_pre.jpage14
-rw-r--r--usage_examples/SneakyThrowsExample_post.jpage19
-rw-r--r--usage_examples/SneakyThrowsExample_pre.jpage13
-rw-r--r--usage_examples/SynchronizedExample_post.jpage23
-rw-r--r--usage_examples/SynchronizedExample_pre.jpage20
-rw-r--r--usage_examples/ToStringExample_post.jpage30
-rw-r--r--usage_examples/ToStringExample_pre.jpage24
-rw-r--r--usage_examples/ValueExample_post.jpage120
-rw-r--r--usage_examples/ValueExample_pre.jpage19
-rw-r--r--usage_examples/experimental/AccessorsExample_post.jpage20
-rw-r--r--usage_examples/experimental/AccessorsExample_pre.jpage14
-rw-r--r--usage_examples/experimental/DelegateExample_post.jpage97
-rw-r--r--usage_examples/experimental/DelegateExample_pre.jpage37
-rw-r--r--usage_examples/experimental/ExtensionMethodExample_post.jpage21
-rw-r--r--usage_examples/experimental/ExtensionMethodExample_pre.jpage24
-rw-r--r--usage_examples/experimental/FieldDefaultsExample_post.jpage12
-rw-r--r--usage_examples/experimental/FieldDefaultsExample_pre.jpage18
-rw-r--r--usage_examples/experimental/FieldNameConstantsExample_post.jpage7
-rw-r--r--usage_examples/experimental/FieldNameConstantsExample_pre.jpage9
-rw-r--r--usage_examples/experimental/HelperExample_post.jpage14
-rw-r--r--usage_examples/experimental/HelperExample_pre.jpage15
-rw-r--r--usage_examples/experimental/UtilityClassExample_post.jpage11
-rw-r--r--usage_examples/experimental/UtilityClassExample_pre.jpage10
-rw-r--r--usage_examples/experimental/WitherExample_post.jpage21
-rw-r--r--usage_examples/experimental/WitherExample_pre.jpage14
-rw-r--r--usage_examples/experimental/onXExample_post.jpage22
-rw-r--r--usage_examples/experimental/onXExample_pre.jpage17
-rw-r--r--usage_examples/experimental/varExample_post.jpage21
-rw-r--r--usage_examples/experimental/varExample_pre.jpage21
-rw-r--r--usage_examples/valExample_post.jpage21
-rw-r--r--usage_examples/valExample_pre.jpage21
50 files changed, 0 insertions, 1505 deletions
diff --git a/usage_examples/BuilderExample_post.jpage b/usage_examples/BuilderExample_post.jpage
deleted file mode 100644
index 0b64703c..00000000
--- a/usage_examples/BuilderExample_post.jpage
+++ /dev/null
@@ -1,87 +0,0 @@
-import java.util.Set;
-
-public class BuilderExample {
- private long created;
- private String name;
- private int age;
- private Set<String> occupations;
-
- BuilderExample(String name, int age, Set<String> occupations) {
- this.name = name;
- this.age = age;
- this.occupations = occupations;
- }
-
- private static long $default$created() {
- return System.currentTimeMillis();
- }
-
- public static BuilderExampleBuilder builder() {
- return new BuilderExampleBuilder();
- }
-
- public static class BuilderExampleBuilder {
- private long created;
- private boolean created$set;
- private String name;
- private int age;
- private java.util.ArrayList<String> occupations;
-
- BuilderExampleBuilder() {
- }
-
- public BuilderExampleBuilder created(long created) {
- this.created = created;
- this.created$set = true;
- return this;
- }
-
- public BuilderExampleBuilder name(String name) {
- this.name = name;
- return this;
- }
-
- public BuilderExampleBuilder age(int age) {
- this.age = age;
- return this;
- }
-
- public BuilderExampleBuilder occupation(String occupation) {
- if (this.occupations == null) {
- this.occupations = new java.util.ArrayList<String>();
- }
-
- this.occupations.add(occupation);
- return this;
- }
-
- public BuilderExampleBuilder occupations(Collection<? extends String> occupations) {
- if (this.occupations == null) {
- this.occupations = new java.util.ArrayList<String>();
- }
-
- this.occupations.addAll(occupations);
- return this;
- }
-
- public BuilderExampleBuilder clearOccupations() {
- if (this.occupations != null) {
- this.occupations.clear();
- }
-
- return this;
- }
-
- public BuilderExample build() {
- // complicated switch statement to produce a compact properly sized immutable set omitted.
- // go to https://projectlombok.org/features/Singular-snippet.html to see it.
- Set<String> occupations = ...;
- return new BuilderExample(created$set ? created : BuilderExample.$default$created(), name, age, occupations);
- }
-
- @java.lang.Override
- public String toString() {
- return "BuilderExample.BuilderExampleBuilder(created = " + this.created + ", name = " + this.name + ", age = " + this.age + ", occupations = " + this.occupations + ")";
- }
- }
-} \ No newline at end of file
diff --git a/usage_examples/BuilderExample_pre.jpage b/usage_examples/BuilderExample_pre.jpage
deleted file mode 100644
index 3b1b0df2..00000000
--- a/usage_examples/BuilderExample_pre.jpage
+++ /dev/null
@@ -1,11 +0,0 @@
-import lombok.Builder;
-import lombok.Singular;
-import java.util.Set;
-
-@Builder
-public class BuilderExample {
- @Builder.Default private long created = System.currentTimeMillis();
- private String name;
- private int age;
- @Singular private Set<String> occupations;
-}
diff --git a/usage_examples/CleanupExample_post.jpage b/usage_examples/CleanupExample_post.jpage
deleted file mode 100644
index 7e87c153..00000000
--- a/usage_examples/CleanupExample_post.jpage
+++ /dev/null
@@ -1,26 +0,0 @@
-import java.io.*;
-
-public class CleanupExample {
- public static void main(String[] args) throws IOException {
- InputStream in = new FileInputStream(args[0]);
- try {
- OutputStream out = new FileOutputStream(args[1]);
- try {
- byte[] b = new byte[10000];
- while (true) {
- int r = in.read(b);
- if (r == -1) break;
- out.write(b, 0, r);
- }
- } finally {
- if (out != null) {
- out.close();
- }
- }
- } finally {
- if (in != null) {
- in.close();
- }
- }
- }
-}
diff --git a/usage_examples/CleanupExample_pre.jpage b/usage_examples/CleanupExample_pre.jpage
deleted file mode 100644
index 9f639171..00000000
--- a/usage_examples/CleanupExample_pre.jpage
+++ /dev/null
@@ -1,15 +0,0 @@
-import lombok.Cleanup;
-import java.io.*;
-
-public class CleanupExample {
- public static void main(String[] args) throws IOException {
- @Cleanup InputStream in = new FileInputStream(args[0]);
- @Cleanup OutputStream out = new FileOutputStream(args[1]);
- byte[] b = new byte[10000];
- while (true) {
- int r = in.read(b);
- if (r == -1) break;
- out.write(b, 0, r);
- }
- }
-}
diff --git a/usage_examples/ConstructorExample_post.jpage b/usage_examples/ConstructorExample_post.jpage
deleted file mode 100644
index 8a2d5069..00000000
--- a/usage_examples/ConstructorExample_post.jpage
+++ /dev/null
@@ -1,28 +0,0 @@
-public class ConstructorExample<T> {
- private int x, y;
- @NonNull private T description;
-
- private ConstructorExample(T description) {
- if (description == null) throw new NullPointerException("description");
- this.description = description;
- }
-
- public static <T> ConstructorExample<T> of(T description) {
- return new ConstructorExample<T>(description);
- }
-
- @java.beans.ConstructorProperties({"x", "y", "description"})
- protected ConstructorExample(int x, int y, T description) {
- if (description == null) throw new NullPointerException("description");
- this.x = x;
- this.y = y;
- this.description = description;
- }
-
- public static class NoArgsExample {
- @NonNull private String field;
-
- public NoArgsExample() {
- }
- }
-}
diff --git a/usage_examples/ConstructorExample_pre.jpage b/usage_examples/ConstructorExample_pre.jpage
deleted file mode 100644
index ac0d3c28..00000000
--- a/usage_examples/ConstructorExample_pre.jpage
+++ /dev/null
@@ -1,16 +0,0 @@
-import lombok.AccessLevel;
-import lombok.RequiredArgsConstructor;
-import lombok.AllArgsConstructor;
-import lombok.NonNull;
-
-@RequiredArgsConstructor(staticName = "of")
-@AllArgsConstructor(access = AccessLevel.PROTECTED)
-public class ConstructorExample<T> {
- private int x, y;
- @NonNull private T description;
-
- @NoArgsConstructor
- public static class NoArgsExample {
- @NonNull private String field;
- }
-}
diff --git a/usage_examples/DataExample_post.jpage b/usage_examples/DataExample_post.jpage
deleted file mode 100644
index bef0a0f1..00000000
--- a/usage_examples/DataExample_post.jpage
+++ /dev/null
@@ -1,119 +0,0 @@
-import java.util.Arrays;
-
-public class DataExample {
- private final String name;
- private int age;
- private double score;
- private String[] tags;
-
- public DataExample(String name) {
- this.name = name;
- }
-
- public String getName() {
- return this.name;
- }
-
- void setAge(int age) {
- this.age = age;
- }
-
- public int getAge() {
- return this.age;
- }
-
- public void setScore(double score) {
- this.score = score;
- }
-
- public double getScore() {
- return this.score;
- }
-
- public String[] getTags() {
- return this.tags;
- }
-
- public void setTags(String[] tags) {
- this.tags = tags;
- }
-
- @Override public String toString() {
- return "DataExample(" + this.getName() + ", " + this.getAge() + ", " + this.getScore() + ", " + Arrays.deepToString(this.getTags()) + ")";
- }
-
- protected boolean canEqual(Object other) {
- return other instanceof DataExample;
- }
-
- @Override public boolean equals(Object o) {
- if (o == this) return true;
- if (!(o instanceof DataExample)) return false;
- DataExample other = (DataExample) o;
- if (!other.canEqual((Object)this)) return false;
- if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false;
- if (this.getAge() != other.getAge()) return false;
- if (Double.compare(this.getScore(), other.getScore()) != 0) return false;
- if (!Arrays.deepEquals(this.getTags(), other.getTags())) return false;
- return true;
- }
-
- @Override public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final long temp1 = Double.doubleToLongBits(this.getScore());
- result = (result*PRIME) + (this.getName() == null ? 43 : this.getName().hashCode());
- result = (result*PRIME) + this.getAge();
- result = (result*PRIME) + (int)(temp1 ^ (temp1 >>> 32));
- result = (result*PRIME) + Arrays.deepHashCode(this.getTags());
- return result;
- }
-
- public static class Exercise<T> {
- private final String name;
- private final T value;
-
- private Exercise(String name, T value) {
- this.name = name;
- this.value = value;
- }
-
- public static <T> Exercise<T> of(String name, T value) {
- return new Exercise<T>(name, value);
- }
-
- public String getName() {
- return this.name;
- }
-
- public T getValue() {
- return this.value;
- }
-
- @Override public String toString() {
- return "Exercise(name=" + this.getName() + ", value=" + this.getValue() + ")";
- }
-
- protected boolean canEqual(Object other) {
- return other instanceof Exercise;
- }
-
- @Override public boolean equals(Object o) {
- if (o == this) return true;
- if (!(o instanceof Exercise)) return false;
- Exercise<?> other = (Exercise<?>) o;
- if (!other.canEqual((Object)this)) return false;
- if (this.getName() == null ? other.getValue() != null : !this.getName().equals(other.getName())) return false;
- if (this.getValue() == null ? other.getValue() != null : !this.getValue().equals(other.getValue())) return false;
- return true;
- }
-
- @Override public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- result = (result*PRIME) + (this.getName() == null ? 43 : this.getName().hashCode());
- result = (result*PRIME) + (this.getValue() == null ? 43 : this.getValue().hashCode());
- return result;
- }
- }
-}
diff --git a/usage_examples/DataExample_pre.jpage b/usage_examples/DataExample_pre.jpage
deleted file mode 100644
index 404d3458..00000000
--- a/usage_examples/DataExample_pre.jpage
+++ /dev/null
@@ -1,18 +0,0 @@
-import lombok.AccessLevel;
-import lombok.Setter;
-import lombok.Data;
-import lombok.ToString;
-
-@Data public class DataExample {
- private final String name;
- @Setter(AccessLevel.PACKAGE) private int age;
- private double score;
- private String[] tags;
-
- @ToString(includeFieldNames=true)
- @Data(staticConstructor="of")
- public static class Exercise<T> {
- private final String name;
- private final T value;
- }
-}
diff --git a/usage_examples/EqualsAndHashCodeExample_post.jpage b/usage_examples/EqualsAndHashCodeExample_post.jpage
deleted file mode 100644
index 91e78250..00000000
--- a/usage_examples/EqualsAndHashCodeExample_post.jpage
+++ /dev/null
@@ -1,72 +0,0 @@
-import java.util.Arrays;
-
-public class EqualsAndHashCodeExample {
- private transient int transientVar = 10;
- private String name;
- private double score;
- private Shape shape = new Square(5, 10);
- private String[] tags;
- private int id;
-
- public String getName() {
- return this.name;
- }
-
- @Override public boolean equals(Object o) {
- if (o == this) return true;
- if (!(o instanceof EqualsAndHashCodeExample)) return false;
- EqualsAndHashCodeExample other = (EqualsAndHashCodeExample) o;
- if (!other.canEqual((Object)this)) return false;
- if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false;
- if (Double.compare(this.score, other.score) != 0) return false;
- if (!Arrays.deepEquals(this.tags, other.tags)) return false;
- return true;
- }
-
- @Override public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final long temp1 = Double.doubleToLongBits(this.score);
- result = (result*PRIME) + (this.name == null ? 43 : this.name.hashCode());
- result = (result*PRIME) + (int)(temp1 ^ (temp1 >>> 32));
- result = (result*PRIME) + Arrays.deepHashCode(this.tags);
- return result;
- }
-
- protected boolean canEqual(Object other) {
- return other instanceof EqualsAndHashCodeExample;
- }
-
- public static class Square extends Shape {
- private final int width, height;
-
- public Square(int width, int height) {
- this.width = width;
- this.height = height;
- }
-
- @Override public boolean equals(Object o) {
- if (o == this) return true;
- if (!(o instanceof Square)) return false;
- Square other = (Square) o;
- if (!other.canEqual((Object)this)) return false;
- if (!super.equals(o)) return false;
- if (this.width != other.width) return false;
- if (this.height != other.height) return false;
- return true;
- }
-
- @Override public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- result = (result*PRIME) + super.hashCode();
- result = (result*PRIME) + this.width;
- result = (result*PRIME) + this.height;
- return result;
- }
-
- protected boolean canEqual(Object other) {
- return other instanceof Square;
- }
- }
-}
diff --git a/usage_examples/EqualsAndHashCodeExample_pre.jpage b/usage_examples/EqualsAndHashCodeExample_pre.jpage
deleted file mode 100644
index 64faf59f..00000000
--- a/usage_examples/EqualsAndHashCodeExample_pre.jpage
+++ /dev/null
@@ -1,25 +0,0 @@
-import lombok.EqualsAndHashCode;
-
-@EqualsAndHashCode(exclude={"id", "shape"})
-public class EqualsAndHashCodeExample {
- private transient int transientVar = 10;
- private String name;
- private double score;
- private Shape shape = new Square(5, 10);
- private String[] tags;
- private int id;
-
- public String getName() {
- return this.name;
- }
-
- @EqualsAndHashCode(callSuper=true)
- public static class Square extends Shape {
- private final int width, height;
-
- public Square(int width, int height) {
- this.width = width;
- this.height = height;
- }
- }
-}
diff --git a/usage_examples/GetterLazyExample_post.jpage b/usage_examples/GetterLazyExample_post.jpage
deleted file mode 100644
index 5f34c43e..00000000
--- a/usage_examples/GetterLazyExample_post.jpage
+++ /dev/null
@@ -1,26 +0,0 @@
-public class GetterLazyExample {
- private final java.util.concurrent.AtomicReference<java.lang.Object> cached = new java.util.concurrent.AtomicReference<java.lang.Object>();
-
- public double[] getCached() {
- java.lang.Object value = this.cached.get();
- if (value == null) {
- synchronized(this.cached) {
- value = this.cached.get();
- if (value == null) {
- final double[] actualValue = expensive();
- value = actualValue == null ? this.cached : actualValue;
- this.cached.set(value);
- }
- }
- }
- return (double[])(value == this.cached ? null : value);
- }
-
- private double[] expensive() {
- double[] result = new double[1000000];
- for (int i = 0; i < result.length; i++) {
- result[i] = Math.asin(i);
- }
- return result;
- }
-}
diff --git a/usage_examples/GetterLazyExample_pre.jpage b/usage_examples/GetterLazyExample_pre.jpage
deleted file mode 100644
index ca6c9d58..00000000
--- a/usage_examples/GetterLazyExample_pre.jpage
+++ /dev/null
@@ -1,13 +0,0 @@
-import lombok.Getter;
-
-public class GetterLazyExample {
- @Getter(lazy=true) private final double[] cached = expensive();
-
- private double[] expensive() {
- double[] result = new double[1000000];
- for (int i = 0; i < result.length; i++) {
- result[i] = Math.asin(i);
- }
- return result;
- }
-}
diff --git a/usage_examples/GetterSetterExample_post.jpage b/usage_examples/GetterSetterExample_post.jpage
deleted file mode 100644
index 241a3a4e..00000000
--- a/usage_examples/GetterSetterExample_post.jpage
+++ /dev/null
@@ -1,42 +0,0 @@
-public class GetterSetterExample {
- /**
- * Age of the person. Water is wet.
- */
- private int age = 10;
-
- /**
- * Name of the person.
- */
- private String name;
-
- @Override public String toString() {
- return String.format("%s (age: %d)", name, age);
- }
-
- /**
- * Age of the person. Water is wet.
- *
- * @return The current value of this person's age. Circles are round.
- */
- public int getAge() {
- return age;
- }
-
- /**
- * Age of the person. Water is wet.
- *
- * @param age New value for this person's age. Sky is blue.
- */
- public void setAge(int age) {
- this.age = age;
- }
-
- /**
- * Changes the name of this person.
- *
- * @param name The new value.
- */
- protected void setName(String name) {
- this.name = name;
- }
-}
diff --git a/usage_examples/GetterSetterExample_pre.jpage b/usage_examples/GetterSetterExample_pre.jpage
deleted file mode 100644
index 4183aa5d..00000000
--- a/usage_examples/GetterSetterExample_pre.jpage
+++ /dev/null
@@ -1,26 +0,0 @@
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.Setter;
-
-public class GetterSetterExample {
- /**
- * Age of the person. Water is wet.
- *
- * @param age New value for this person's age. Sky is blue.
- * @return The current value of this person's age. Circles are round.
- */
- @Getter @Setter private int age = 10;
-
- /**
- * Name of the person.
- * -- SETTER --
- * Changes the name of this person.
- *
- * @param name The new value.
- */
- @Setter(AccessLevel.PROTECTED) private String name;
-
- @Override public String toString() {
- return String.format("%s (age: %d)", name, age);
- }
-}
diff --git a/usage_examples/LogExample_post.jpage b/usage_examples/LogExample_post.jpage
deleted file mode 100644
index eab3b046..00000000
--- a/usage_examples/LogExample_post.jpage
+++ /dev/null
@@ -1,23 +0,0 @@
-public class LogExample {
- private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LogExample.class.getName());
-
- public static void main(String... args) {
- log.error("Something's wrong here");
- }
-}
-
-public class LogExampleOther {
- private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogExampleOther.class);
-
- public static void main(String... args) {
- log.error("Something else is wrong here");
- }
-}
-
-public class LogExampleCategory {
- private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog("CounterLog");
-
- public static void main(String... args) {
- log.error("Calling the 'CounterLog' with a message");
- }
-}
diff --git a/usage_examples/LogExample_pre.jpage b/usage_examples/LogExample_pre.jpage
deleted file mode 100644
index ba27dd27..00000000
--- a/usage_examples/LogExample_pre.jpage
+++ /dev/null
@@ -1,26 +0,0 @@
-import lombok.extern.java.Log;
-import lombok.extern.slf4j.Slf4j;
-
-@Log
-public class LogExample {
-
- public static void main(String... args) {
- log.error("Something's wrong here");
- }
-}
-
-@Slf4j
-public class LogExampleOther {
-
- public static void main(String... args) {
- log.error("Something else is wrong here");
- }
-}
-
-@CommonsLog(topic="CounterLog")
-public class LogExampleCategory {
-
- public static void main(String... args) {
- log.error("Calling the 'CounterLog' with a message");
- }
-}
diff --git a/usage_examples/NonNullExample_post.jpage b/usage_examples/NonNullExample_post.jpage
deleted file mode 100644
index 24175e06..00000000
--- a/usage_examples/NonNullExample_post.jpage
+++ /dev/null
@@ -1,13 +0,0 @@
-import lombok.NonNull;
-
-public class NonNullExample extends Something {
- private String name;
-
- public NonNullExample(@NonNull Person person) {
- super("Hello");
- if (person == null) {
- throw new NullPointerException("person");
- }
- this.name = person.getName();
- }
-}
diff --git a/usage_examples/NonNullExample_pre.jpage b/usage_examples/NonNullExample_pre.jpage
deleted file mode 100644
index 47556ce7..00000000
--- a/usage_examples/NonNullExample_pre.jpage
+++ /dev/null
@@ -1,10 +0,0 @@
-import lombok.NonNull;
-
-public class NonNullExample extends Something {
- private String name;
-
- public NonNullExample(@NonNull Person person) {
- super("Hello");
- this.name = person.getName();
- }
-}
diff --git a/usage_examples/Singular-snippetExample_post.jpage b/usage_examples/Singular-snippetExample_post.jpage
deleted file mode 100644
index 4e2b0460..00000000
--- a/usage_examples/Singular-snippetExample_post.jpage
+++ /dev/null
@@ -1,160 +0,0 @@
-import java.util.Collection;
-import java.util.Set;
-import java.util.SortedMap;
-import com.google.common.collect.ImmutableList;
-
-public class SingularExample<T extends Number> {
- private Set<String> occupations;
- private ImmutableList<String> axes;
- private SortedMap<Integer, T> elves;
- private Collection<?> minutiae;
-
- SingularExample(Set<String> occupations, ImmutableList<String> axes, SortedMap<Integer, T> elves, Collection<?> minutiae) {
- this.occupations = occupations;
- this.axes = axes;
- this.elves = elves;
- this.minutiae = minutiae;
- }
-
- public static class SingularExampleBuilder<T extends Number> {
- private java.util.ArrayList<String> occupations;
- private com.google.common.collect.ImmutableList.Builder<String> axes;
- private java.util.ArrayList<Integer> elves$key;
- private java.util.ArrayList<T> elves$value;
- private java.util.ArrayList<java.lang.Object> minutiae;
-
- SingularExampleBuilder() {
- }
-
- public SingularExampleBuilder<T> occupation(String occupation) {
- if (this.occupations == null) {
- this.occupations = new java.util.ArrayList<String>();
- }
-
- this.occupations.add(occupation);
- return this;
- }
-
- @java.lang.SuppressWarnings("all")
- public SingularExampleBuilder<T> occupations(java.util.Collection<? extends String> occupations) {
- if (this.occupations == null) {
- this.occupations = new java.util.ArrayList<String>();
- }
-
- this.occupations.addAll(occupations);
- return this;
- }
-
- public SingularExampleBuilder<T> axis(String axis) {
- if (this.axes == null) {
- this.axes = com.google.common.collect.ImmutableList.builder();
- }
-
- this.axes.add(axis);
- return this;
- }
-
- public SingularExampleBuilder<T> axes(java.lang.Iterable<? extends String> axes) {
- if (this.axes == null) {
- this.axes = com.google.common.collect.ImmutableList.builder();
- }
-
- this.axes.addAll(axes);
- return this;
- }
-
- public SingularExampleBuilder<T> elf(Integer elfKey, T elfValue) {
- if (this.elves$key == null) {
- this.elves$key = new java.util.ArrayList<Integer>();
- this.elves$value = new java.util.ArrayList<T>();
- }
-
- this.elves$key.add(elfKey);
- this.elves$value.add(elfValue);
- return this;
- }
-
- public SingularExampleBuilder<T> elves(java.util.Map<? extends Integer, ? extends T> elves) {
- if (this.elves$key == null) {
- this.elves$key = new java.util.ArrayList<Integer>();
- this.elves$value = new java.util.ArrayList<T>();
- }
-
- for (java.util.Map.Entry<? extends Integer, ? extends T> $lombokEntry : elves.entrySet()) {
- this.elves$key.add($lombokEntry.getKey());
- this.elves$value.add($lombokEntry.getValue());
- }
- return this;
- }
-
- public SingularExampleBuilder<T> minutia(java.lang.Object minutia) {
- if (this.minutiae == null) {
- this.minutiae = new java.util.ArrayList<java.lang.Object>();
- }
-
- this.minutiae.add(minutia);
- return this;
- }
-
- public SingularExampleBuilder<T> minutiae(java.util.Collection<?> minutiae) {
- if (this.minutiae == null) {
- this.minutiae = new java.util.ArrayList<java.lang.Object>();
- }
-
- this.minutiae.addAll(minutiae);
- return this;
- }
-
- public SingularExample<T> build() {
- java.util.Set<String> occupations;
- switch (this.occupations == null ? 0 : this.occupations.size()) {
- case 0:
- occupations = java.util.Collections.emptySet();
- break;
-
- case 1:
- occupations = java.util.Collections.singleton(this.occupations.get(0));
- break;
-
- default:
- occupations = new java.util.LinkedHashSet<String>(this.occupations.size() < 1073741824 ? 1 + this.occupations.size() + (this.occupations.size() - 3) / 3 : java.lang.Integer.MAX_VALUE);
- occupations.addAll(this.occupations);
- occupations = java.util.Collections.unmodifiableSet(occupations);
-
- }
-
- com.google.common.collect.ImmutableList<String> axes = this.axes == null ? com.google.common.collect.ImmutableList.<String>of() : this.axes.build();
-
- java.util.SortedMap<Integer, T> elves = new java.util.TreeMap<Integer, T>();
- if (this.elves$key != null) for (int $i = 0; $i < (this.elves$key == null ? 0 : this.elves$key.size()); $i++) elves.put(this.elves$key.get($i), this.elves$value.get($i));
- elves = java.util.Collections.unmodifiableSortedMap(elves);
-
- java.util.Collection<java.lang.Object> minutiae;
- switch (this.minutiae == null ? 0 : this.minutiae.size()) {
- case 0:
- minutiae = java.util.Collections.emptyList();
- break;
-
- case 1:
- minutiae = java.util.Collections.singletonList(this.minutiae.get(0));
- break;
-
- default:
- minutiae = java.util.Collections.unmodifiableList(new java.util.ArrayList<java.lang.Object>(this.minutiae));
-
- }
-
- return new SingularExample<T>(occupations, axes, elves, minutiae);
- }
-
- @java.lang.Override
- public java.lang.String toString() {
- return "SingularExample.SingularExampleBuilder(occupations=" + this.occupations + ", axes=" + this.axes + ", elves$key=" + this.elves$key + ", elves$value=" + this.elves$value + ", minutiae=" + this.minutiae + ")";
- }
- }
-
- @java.lang.SuppressWarnings("all")
- public static <T extends Number> SingularExampleBuilder<T> builder() {
- return new SingularExampleBuilder<T>();
- }
-}
diff --git a/usage_examples/Singular-snippetExample_pre.jpage b/usage_examples/Singular-snippetExample_pre.jpage
deleted file mode 100644
index 65f6bbc8..00000000
--- a/usage_examples/Singular-snippetExample_pre.jpage
+++ /dev/null
@@ -1,14 +0,0 @@
-import lombok.Builder;
-import lombok.Singular;
-import java.util.Collection;
-import java.util.Set;
-import java.util.SortedMap;
-import com.google.common.collect.ImmutableList;
-
-@Builder
-public class SingularExample<T extends Number> {
- private @Singular Set<String> occupations;
- private @Singular("axis") ImmutableList<String> axes;
- private @Singular SortedMap<Integer, T> elves;
- private @Singular Collection<?> minutiae;
-}
diff --git a/usage_examples/SneakyThrowsExample_post.jpage b/usage_examples/SneakyThrowsExample_post.jpage
deleted file mode 100644
index 916d94f0..00000000
--- a/usage_examples/SneakyThrowsExample_post.jpage
+++ /dev/null
@@ -1,19 +0,0 @@
-import lombok.Lombok;
-
-public class SneakyThrowsExample implements Runnable {
- public String utf8ToString(byte[] bytes) {
- try {
- return new String(bytes, "UTF-8");
- } catch (UnsupportedEncodingException e) {
- throw Lombok.sneakyThrow(e);
- }
- }
-
- public void run() {
- try {
- throw new Throwable();
- } catch (Throwable t) {
- throw Lombok.sneakyThrow(t);
- }
- }
-}
diff --git a/usage_examples/SneakyThrowsExample_pre.jpage b/usage_examples/SneakyThrowsExample_pre.jpage
deleted file mode 100644
index be6d72d5..00000000
--- a/usage_examples/SneakyThrowsExample_pre.jpage
+++ /dev/null
@@ -1,13 +0,0 @@
-import lombok.SneakyThrows;
-
-public class SneakyThrowsExample implements Runnable {
- @SneakyThrows(UnsupportedEncodingException.class)
- public String utf8ToString(byte[] bytes) {
- return new String(bytes, "UTF-8");
- }
-
- @SneakyThrows
- public void run() {
- throw new Throwable();
- }
-}
diff --git a/usage_examples/SynchronizedExample_post.jpage b/usage_examples/SynchronizedExample_post.jpage
deleted file mode 100644
index 219ab88a..00000000
--- a/usage_examples/SynchronizedExample_post.jpage
+++ /dev/null
@@ -1,23 +0,0 @@
-public class SynchronizedExample {
- private static final Object $LOCK = new Object[0];
- private final Object $lock = new Object[0];
- private final Object readLock = new Object();
-
- public static void hello() {
- synchronized($LOCK) {
- System.out.println("world");
- }
- }
-
- public int answerToLife() {
- synchronized($lock) {
- return 42;
- }
- }
-
- public void foo() {
- synchronized(readLock) {
- System.out.println("bar");
- }
- }
-}
diff --git a/usage_examples/SynchronizedExample_pre.jpage b/usage_examples/SynchronizedExample_pre.jpage
deleted file mode 100644
index ace39f85..00000000
--- a/usage_examples/SynchronizedExample_pre.jpage
+++ /dev/null
@@ -1,20 +0,0 @@
-import lombok.Synchronized;
-
-public class SynchronizedExample {
- private final Object readLock = new Object();
-
- @Synchronized
- public static void hello() {
- System.out.println("world");
- }
-
- @Synchronized
- public int answerToLife() {
- return 42;
- }
-
- @Synchronized("readLock")
- public void foo() {
- System.out.println("bar");
- }
-}
diff --git a/usage_examples/ToStringExample_post.jpage b/usage_examples/ToStringExample_post.jpage
deleted file mode 100644
index 67e78f20..00000000
--- a/usage_examples/ToStringExample_post.jpage
+++ /dev/null
@@ -1,30 +0,0 @@
-import java.util.Arrays;
-
-public class ToStringExample {
- private static final int STATIC_VAR = 10;
- private String name;
- private Shape shape = new Square(5, 10);
- private String[] tags;
- private int id;
-
- public String getName() {
- return this.getName();
- }
-
- public static class Square extends Shape {
- private final int width, height;
-
- public Square(int width, int height) {
- this.width = width;
- this.height = height;
- }
-
- @Override public String toString() {
- return "Square(super=" + super.toString() + ", width=" + this.width + ", height=" + this.height + ")";
- }
- }
-
- @Override public String toString() {
- return "ToStringExample(" + this.getName() + ", " + this.shape + ", " + Arrays.deepToString(this.tags) + ")";
- }
-}
diff --git a/usage_examples/ToStringExample_pre.jpage b/usage_examples/ToStringExample_pre.jpage
deleted file mode 100644
index 39b25892..00000000
--- a/usage_examples/ToStringExample_pre.jpage
+++ /dev/null
@@ -1,24 +0,0 @@
-import lombok.ToString;
-
-@ToString(exclude="id")
-public class ToStringExample {
- private static final int STATIC_VAR = 10;
- private String name;
- private Shape shape = new Square(5, 10);
- private String[] tags;
- private int id;
-
- public String getName() {
- return this.name;
- }
-
- @ToString(callSuper=true, includeFieldNames=true)
- public static class Square extends Shape {
- private final int width, height;
-
- public Square(int width, int height) {
- this.width = width;
- this.height = height;
- }
- }
-}
diff --git a/usage_examples/ValueExample_post.jpage b/usage_examples/ValueExample_post.jpage
deleted file mode 100644
index 8a5d4836..00000000
--- a/usage_examples/ValueExample_post.jpage
+++ /dev/null
@@ -1,120 +0,0 @@
-import java.util.Arrays;
-
-public final class ValueExample {
- private final String name;
- private int age;
- private final double score;
- protected final String[] tags;
-
- @java.beans.ConstructorProperties({"name", "age", "score", "tags"})
- public ValueExample(String name, int age, double score, String[] tags) {
- this.name = name;
- this.age = age;
- this.score = score;
- this.tags = tags;
- }
-
- public String getName() {
- return this.name;
- }
-
- public int getAge() {
- return this.age;
- }
-
- public double getScore() {
- return this.score;
- }
-
- public String[] getTags() {
- return this.tags;
- }
-
- @java.lang.Override
- public boolean equals(Object o) {
- if (o == this) return true;
- if (!(o instanceof ValueExample)) return false;
- final ValueExample other = (ValueExample)o;
- final Object this$name = this.getName();
- final Object other$name = other.getName();
- if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
- if (this.getAge() != other.getAge()) return false;
- if (Double.compare(this.getScore(), other.getScore()) != 0) return false;
- if (!Arrays.deepEquals(this.getTags(), other.getTags())) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $name = this.getName();
- result = result * PRIME + ($name == null ? 43 : $name.hashCode());
- result = result * PRIME + this.getAge();
- final long $score = Double.doubleToLongBits(this.getScore());
- result = result * PRIME + (int)($score >>> 32 ^ $score);
- result = result * PRIME + Arrays.deepHashCode(this.getTags());
- return result;
- }
-
- @java.lang.Override
- public String toString() {
- return "ValueExample(name=" + getName() + ", age=" + getAge() + ", score=" + getScore() + ", tags=" + Arrays.deepToString(getTags()) + ")";
- }
-
- ValueExample withAge(int age) {
- return this.age == age ? this : new ValueExample(name, age, score, tags);
- }
-
- public static final class Exercise<T> {
- private final String name;
- private final T value;
-
- private Exercise(String name, T value) {
- this.name = name;
- this.value = value;
- }
-
- public static <T> Exercise<T> of(String name, T value) {
- return new Exercise<T>(name, value);
- }
-
- public String getName() {
- return this.name;
- }
-
- public T getValue() {
- return this.value;
- }
-
- @java.lang.Override
- public boolean equals(Object o) {
- if (o == this) return true;
- if (!(o instanceof ValueExample.Exercise)) return false;
- final Exercise<?> other = (Exercise<?>)o;
- final Object this$name = this.getName();
- final Object other$name = other.getName();
- if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
- final Object this$value = this.getValue();
- final Object other$value = other.getValue();
- if (this$value == null ? other$value != null : !this$value.equals(other$value)) return false;
- return true;
- }
-
- @java.lang.Override
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final Object $name = this.getName();
- result = result * PRIME + ($name == null ? 43 : $name.hashCode());
- final Object $value = this.getValue();
- result = result * PRIME + ($value == null ? 43 : $value.hashCode());
- return result;
- }
-
- @java.lang.Override
- public String toString() {
- return "ValueExample.Exercise(name=" + getName() + ", value=" + getValue() + ")";
- }
- }
-} \ No newline at end of file
diff --git a/usage_examples/ValueExample_pre.jpage b/usage_examples/ValueExample_pre.jpage
deleted file mode 100644
index d9550c25..00000000
--- a/usage_examples/ValueExample_pre.jpage
+++ /dev/null
@@ -1,19 +0,0 @@
-import lombok.AccessLevel;
-import lombok.experimental.NonFinal;
-import lombok.experimental.Value;
-import lombok.experimental.Wither;
-import lombok.ToString;
-
-@Value public class ValueExample {
- String name;
- @Wither(AccessLevel.PACKAGE) @NonFinal int age;
- double score;
- protected String[] tags;
-
- @ToString(includeFieldNames=true)
- @Value(staticConstructor="of")
- public static class Exercise<T> {
- String name;
- T value;
- }
-}
diff --git a/usage_examples/experimental/AccessorsExample_post.jpage b/usage_examples/experimental/AccessorsExample_post.jpage
deleted file mode 100644
index ae5a39db..00000000
--- a/usage_examples/experimental/AccessorsExample_post.jpage
+++ /dev/null
@@ -1,20 +0,0 @@
-public class AccessorsExample {
- private int age = 10;
-
- public int age() {
- return this.age;
- }
-
- public AccessorsExample age(final int age) {
- this.age = age;
- return this;
- }
-}
-
-class PrefixExample {
- private String fName = "Hello, World!";
-
- public String getName() {
- return this.fName;
- }
-}
diff --git a/usage_examples/experimental/AccessorsExample_pre.jpage b/usage_examples/experimental/AccessorsExample_pre.jpage
deleted file mode 100644
index f1591aba..00000000
--- a/usage_examples/experimental/AccessorsExample_pre.jpage
+++ /dev/null
@@ -1,14 +0,0 @@
-import lombok.experimental.Accessors;
-import lombok.Getter;
-import lombok.Setter;
-
-@Accessors(fluent = true)
-public class AccessorsExample {
- @Getter @Setter
- private int age = 10;
-}
-
-class PrefixExample {
- @Accessors(prefix = "f") @Getter
- private String fName = "Hello, World!";
-}
diff --git a/usage_examples/experimental/DelegateExample_post.jpage b/usage_examples/experimental/DelegateExample_post.jpage
deleted file mode 100644
index 1c5239f1..00000000
--- a/usage_examples/experimental/DelegateExample_post.jpage
+++ /dev/null
@@ -1,97 +0,0 @@
-import java.util.ArrayList;
-import java.util.Collection;
-
-public class DelegationExample {
- private interface SimpleCollection {
- boolean add(String item);
- boolean remove(Object item);
- }
-
- private final Collection<String> collection = new ArrayList<String>();
-
- @java.lang.SuppressWarnings("all")
- public boolean add(final java.lang.String item) {
- return this.collection.add(item);
- }
-
- @java.lang.SuppressWarnings("all")
- public boolean remove(final java.lang.Object item) {
- return this.collection.remove(item);
- }
-}
-
-class ExcludesDelegateExample {
- long counter = 0L;
-
- private interface Add {
- boolean add(String x);
- boolean addAll(Collection<? extends String> x);
- }
-
- private final Collection<String> collection = new ArrayList<String>();
-
- public boolean add(String item) {
- counter++;
- return collection.add(item);
- }
-
- public boolean addAll(Collection<? extends String> col) {
- counter += col.size();
- return collection.addAll(col);
- }
-
- @java.lang.SuppressWarnings("all")
- public int size() {
- return this.collection.size();
- }
-
- @java.lang.SuppressWarnings("all")
- public boolean isEmpty() {
- return this.collection.isEmpty();
- }
-
- @java.lang.SuppressWarnings("all")
- public boolean contains(final java.lang.Object arg0) {
- return this.collection.contains(arg0);
- }
-
- @java.lang.SuppressWarnings("all")
- public java.util.Iterator<java.lang.String> iterator() {
- return this.collection.iterator();
- }
-
- @java.lang.SuppressWarnings("all")
- public java.lang.Object[] toArray() {
- return this.collection.toArray();
- }
-
- @java.lang.SuppressWarnings("all")
- public <T extends .java.lang.Object>T[] toArray(final T[] arg0) {
- return this.collection.<T>toArray(arg0);
- }
-
- @java.lang.SuppressWarnings("all")
- public boolean remove(final java.lang.Object arg0) {
- return this.collection.remove(arg0);
- }
-
- @java.lang.SuppressWarnings("all")
- public boolean containsAll(final java.util.Collection<?> arg0) {
- return this.collection.containsAll(arg0);
- }
-
- @java.lang.SuppressWarnings("all")
- public boolean removeAll(final java.util.Collection<?> arg0) {
- return this.collection.removeAll(arg0);
- }
-
- @java.lang.SuppressWarnings("all")
- public boolean retainAll(final java.util.Collection<?> arg0) {
- return this.collection.retainAll(arg0);
- }
-
- @java.lang.SuppressWarnings("all")
- public void clear() {
- this.collection.clear();
- }
-}
diff --git a/usage_examples/experimental/DelegateExample_pre.jpage b/usage_examples/experimental/DelegateExample_pre.jpage
deleted file mode 100644
index 885ab3a8..00000000
--- a/usage_examples/experimental/DelegateExample_pre.jpage
+++ /dev/null
@@ -1,37 +0,0 @@
-import java.util.ArrayList;
-import java.util.Collection;
-
-import lombok.experimental.Delegate;
-
-public class DelegationExample {
- private interface SimpleCollection {
- boolean add(String item);
- boolean remove(Object item);
- }
-
- @Delegate(types=SimpleCollection.class)
- private final Collection<String> collection = new ArrayList<String>();
-}
-
-
-class ExcludesDelegateExample {
- long counter = 0L;
-
- private interface Add {
- boolean add(String x);
- boolean addAll(Collection<? extends String> x);
- }
-
- @Delegate(excludes=Add.class)
- private final Collection<String> collection = new ArrayList<String>();
-
- public boolean add(String item) {
- counter++;
- return collection.add(item);
- }
-
- public boolean addAll(Collection<? extends String> col) {
- counter += col.size();
- return collection.addAll(col);
- }
-}
diff --git a/usage_examples/experimental/ExtensionMethodExample_post.jpage b/usage_examples/experimental/ExtensionMethodExample_post.jpage
deleted file mode 100644
index de46d776..00000000
--- a/usage_examples/experimental/ExtensionMethodExample_post.jpage
+++ /dev/null
@@ -1,21 +0,0 @@
-public class ExtensionMethodExample {
- public String test() {
- int[] intArray = {5, 3, 8, 2};
- java.util.Arrays.sort(intArray);
-
- String iAmNull = null;
- return Extensions.or(iAmNull, Extensions.toTitleCase("hELlO, WORlD!"));
- }
-}
-
-class Extensions {
- public static <T> T or(T obj, T ifNull) {
- return obj != null ? obj : ifNull;
- }
-
- public static String toTitleCase(String in) {
- if (in.isEmpty()) return in;
- return "" + Character.toTitleCase(in.charAt(0)) +
- in.substring(1).toLowerCase();
- }
-}
diff --git a/usage_examples/experimental/ExtensionMethodExample_pre.jpage b/usage_examples/experimental/ExtensionMethodExample_pre.jpage
deleted file mode 100644
index b3b9f1fa..00000000
--- a/usage_examples/experimental/ExtensionMethodExample_pre.jpage
+++ /dev/null
@@ -1,24 +0,0 @@
-import lombok.experimental.ExtensionMethod;
-
-@ExtensionMethod({java.util.Arrays.class, Extensions.class})
-public class ExtensionMethodExample {
- public String test() {
- int[] intArray = {5, 3, 8, 2};
- intArray.sort();
-
- String iAmNull = null;
- return iAmNull.or("hELlO, WORlD!".toTitleCase());
- }
-}
-
-class Extensions {
- public static <T> T or(T obj, T ifNull) {
- return obj != null ? obj : ifNull;
- }
-
- public static String toTitleCase(String in) {
- if (in.isEmpty()) return in;
- return "" + Character.toTitleCase(in.charAt(0)) +
- in.substring(1).toLowerCase();
- }
-}
diff --git a/usage_examples/experimental/FieldDefaultsExample_post.jpage b/usage_examples/experimental/FieldDefaultsExample_post.jpage
deleted file mode 100644
index 95c17a4b..00000000
--- a/usage_examples/experimental/FieldDefaultsExample_post.jpage
+++ /dev/null
@@ -1,12 +0,0 @@
-public class FieldDefaultsExample {
- public final int a;
- private final int b;
- private int c;
- final int d;
-
- FieldDefaultsExample() {
- a = 0;
- b = 0;
- d = 0;
- }
-}
diff --git a/usage_examples/experimental/FieldDefaultsExample_pre.jpage b/usage_examples/experimental/FieldDefaultsExample_pre.jpage
deleted file mode 100644
index c8335832..00000000
--- a/usage_examples/experimental/FieldDefaultsExample_pre.jpage
+++ /dev/null
@@ -1,18 +0,0 @@
-import lombok.AccessLevel;
-import lombok.experimental.FieldDefaults;
-import lombok.experimental.NonFinal;
-import lombok.experimental.PackagePrivate;
-
-@FieldDefaults(makeFinal=true, level=AccessLevel.PRIVATE)
-public class FieldDefaultsExample {
- public final int a;
- int b;
- @NonFinal int c;
- @PackagePrivate int d;
-
- FieldDefaultsExample() {
- a = 0;
- b = 0;
- d = 0;
- }
-}
diff --git a/usage_examples/experimental/FieldNameConstantsExample_post.jpage b/usage_examples/experimental/FieldNameConstantsExample_post.jpage
deleted file mode 100644
index 6300ed0e..00000000
--- a/usage_examples/experimental/FieldNameConstantsExample_post.jpage
+++ /dev/null
@@ -1,7 +0,0 @@
-public class FieldNameConstantsExample {
- public static final String I_AM_A_FIELD = "iAmAField";
- static final String AND_SO_AM_I = "andSoAmI";
-
- private final String iAmAField;
- private final int andSoAmI;
-}
diff --git a/usage_examples/experimental/FieldNameConstantsExample_pre.jpage b/usage_examples/experimental/FieldNameConstantsExample_pre.jpage
deleted file mode 100644
index dc6376eb..00000000
--- a/usage_examples/experimental/FieldNameConstantsExample_pre.jpage
+++ /dev/null
@@ -1,9 +0,0 @@
-import lombok.experimental.FieldNameConstants;
-import lombok.AccessLevel;
-
-@FieldNameConstants
-public class FieldNameConstantsExample {
- private final String iAmAField;
- @FieldNameConstants(level = AccessLevel.PACKAGE)
- private final int andSoAmI;
-}
diff --git a/usage_examples/experimental/HelperExample_post.jpage b/usage_examples/experimental/HelperExample_post.jpage
deleted file mode 100644
index 04a97b9f..00000000
--- a/usage_examples/experimental/HelperExample_post.jpage
+++ /dev/null
@@ -1,14 +0,0 @@
-public class HelperExample {
- int someMethod(int arg1) {
- int localVar = 5;
-
- class Helpers {
- int helperMethod(int arg) {
- return arg + localVar;
- }
- }
- Helpers $Helpers = new Helpers();
-
- return $Helpers.helperMethod(10);
- }
-}
diff --git a/usage_examples/experimental/HelperExample_pre.jpage b/usage_examples/experimental/HelperExample_pre.jpage
deleted file mode 100644
index cd86ef3c..00000000
--- a/usage_examples/experimental/HelperExample_pre.jpage
+++ /dev/null
@@ -1,15 +0,0 @@
-import lombok.experimental.Helper;
-
-public class HelperExample {
- int someMethod(int arg1) {
- int localVar = 5;
-
- @Helper class Helpers {
- int helperMethod(int arg) {
- return arg + localVar;
- }
- }
-
- return helperMethod(10);
- }
-}
diff --git a/usage_examples/experimental/UtilityClassExample_post.jpage b/usage_examples/experimental/UtilityClassExample_post.jpage
deleted file mode 100644
index 70810230..00000000
--- a/usage_examples/experimental/UtilityClassExample_post.jpage
+++ /dev/null
@@ -1,11 +0,0 @@
-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
deleted file mode 100644
index 85731b81..00000000
--- a/usage_examples/experimental/UtilityClassExample_pre.jpage
+++ /dev/null
@@ -1,10 +0,0 @@
-import lombok.experimental.UtilityClass;
-
-@UtilityClass
-public class UtilityClassExample {
- private final int CONSTANT = 5;
-
- public void addSomething(int in) {
- return in + CONSTANT;
- }
-}
diff --git a/usage_examples/experimental/WitherExample_post.jpage b/usage_examples/experimental/WitherExample_post.jpage
deleted file mode 100644
index 3447192a..00000000
--- a/usage_examples/experimental/WitherExample_post.jpage
+++ /dev/null
@@ -1,21 +0,0 @@
-import lombok.NonNull;
-
-public class WitherExample {
- private final int age;
- private @NonNull final String name;
-
- public WitherExample(String name, int age) {
- if (name == null) throw new NullPointerException();
- this.name = name;
- this.age = age;
- }
-
- public WitherExample withAge(int age) {
- return this.age == age ? this : new WitherExample(name, age);
- }
-
- protected WitherExample withName(@NonNull String name) {
- if (name == null) throw new java.lang.NullPointerException("name");
- return this.name == name ? this : new WitherExample(name, age);
- }
-} \ No newline at end of file
diff --git a/usage_examples/experimental/WitherExample_pre.jpage b/usage_examples/experimental/WitherExample_pre.jpage
deleted file mode 100644
index 5db799fc..00000000
--- a/usage_examples/experimental/WitherExample_pre.jpage
+++ /dev/null
@@ -1,14 +0,0 @@
-import lombok.AccessLevel;
-import lombok.NonNull;
-import lombok.experimental.Wither;
-
-public class WitherExample {
- @Wither private final int age;
- @Wither(AccessLevel.PROTECTED) @NonNull private final String name;
-
- public WitherExample(String name, int age) {
- if (name == null) throw new NullPointerException();
- this.name = name;
- this.age = age;
- }
-}
diff --git a/usage_examples/experimental/onXExample_post.jpage b/usage_examples/experimental/onXExample_post.jpage
deleted file mode 100644
index 1be94f2a..00000000
--- a/usage_examples/experimental/onXExample_post.jpage
+++ /dev/null
@@ -1,22 +0,0 @@
-import javax.inject.Inject;
-import javax.persistence.Id;
-import javax.persistence.Column;
-import javax.validation.constraints.Max;
-
-public class OnXExample {
- private long unid;
-
- @Inject
- public OnXExample(long unid) {
- this.unid = unid;
- }
-
- @Id @Column(name="unique-id")
- public long getUnid() {
- return unid;
- }
-
- public void setUnid(@Max(10000) long unid) {
- this.unid = unid;
- }
-}
diff --git a/usage_examples/experimental/onXExample_pre.jpage b/usage_examples/experimental/onXExample_pre.jpage
deleted file mode 100644
index e54371ae..00000000
--- a/usage_examples/experimental/onXExample_pre.jpage
+++ /dev/null
@@ -1,17 +0,0 @@
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.Setter;
-
-import javax.inject.Inject;
-import javax.persistence.Id;
-import javax.persistence.Column;
-import javax.validation.constraints.Max;
-
-@AllArgsConstructor(onConstructor=@__(@Inject))
-public class OnXExample {
-// @Getter(onMethod=@__({@Id, @Column(name="unique-id")})) //JDK7
-// @Setter(onParam=@__(@Max(10000))) //JDK7
- @Getter(onMethod_={@Id, @Column(name="unique-id")}) //JDK8
- @Setter(onParam_=@Max(10000)) //JDK8
- private long unid;
-}
diff --git a/usage_examples/experimental/varExample_post.jpage b/usage_examples/experimental/varExample_post.jpage
deleted file mode 100644
index d0a7c124..00000000
--- a/usage_examples/experimental/varExample_post.jpage
+++ /dev/null
@@ -1,21 +0,0 @@
-import java.util.ArrayList;
-import lombok.var;
-
-public class VarExample {
- public String example() {
- ArrayList<String> example = new ArrayList<String>();
- example.add("Hello, World!");
- final String foo = example.get(0);
- return foo.toLowerCase();
- }
-
- public void example2() {
- ArrayList<String> list = new ArrayList<String>();
- list.add("zero");
- list.add("one");
- list.add("two");
- for(int i = 0; i < list.size(); ++i) {
- System.out.printf("%d: %s\n", i, list.get(i));
- }
- }
-}
diff --git a/usage_examples/experimental/varExample_pre.jpage b/usage_examples/experimental/varExample_pre.jpage
deleted file mode 100644
index e58c4c0d..00000000
--- a/usage_examples/experimental/varExample_pre.jpage
+++ /dev/null
@@ -1,21 +0,0 @@
-import java.util.ArrayList;
-import lombok.var;
-
-public class VarExample {
- public String example() {
- var example = new ArrayList<String>();
- example.add("Hello, World!");
- final var foo = example.get(0);
- return foo.toLowerCase();
- }
-
- public void example2() {
- var list = new ArrayList<String>();
- list.add("zero");
- list.add("one");
- list.add("two");
- for(var i = 0; i < list.size(); ++i) {
- System.out.printf("%d: %s\n", i, list.get(i));
- }
- }
-}
diff --git a/usage_examples/valExample_post.jpage b/usage_examples/valExample_post.jpage
deleted file mode 100644
index fa2e852e..00000000
--- a/usage_examples/valExample_post.jpage
+++ /dev/null
@@ -1,21 +0,0 @@
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-public class ValExample {
- public String example() {
- final ArrayList<String> example = new ArrayList<String>();
- example.add("Hello, World!");
- final String foo = example.get(0);
- return foo.toLowerCase();
- }
-
- public void example2() {
- final HashMap<Integer, String> map = new HashMap<Integer, String>();
- map.put(0, "zero");
- map.put(5, "five");
- for (final Map.Entry<Integer, String> entry : map.entrySet()) {
- System.out.printf("%d: %s\n", entry.getKey(), entry.getValue());
- }
- }
-}
diff --git a/usage_examples/valExample_pre.jpage b/usage_examples/valExample_pre.jpage
deleted file mode 100644
index a621640f..00000000
--- a/usage_examples/valExample_pre.jpage
+++ /dev/null
@@ -1,21 +0,0 @@
-import java.util.ArrayList;
-import java.util.HashMap;
-import lombok.val;
-
-public class ValExample {
- public String example() {
- val example = new ArrayList<String>();
- example.add("Hello, World!");
- val foo = example.get(0);
- return foo.toLowerCase();
- }
-
- public void example2() {
- val map = new HashMap<Integer, String>();
- map.put(0, "zero");
- map.put(5, "five");
- for (val entry : map.entrySet()) {
- System.out.printf("%d: %s\n", entry.getKey(), entry.getValue());
- }
- }
-}