aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/experimental
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-11-17 19:12:01 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-11-17 19:12:01 +0100
commit58851b4c6e96a51d1ac298c7ed85efac6ffe8335 (patch)
treeb0ca24a4b8d5c04d70ada3bebb2308f3c74160b3 /src/core/lombok/experimental
parente95bb83e06510af7e68fc3eb38163522d6f75bce (diff)
downloadlombok-58851b4c6e96a51d1ac298c7ed85efac6ffe8335.tar.gz
lombok-58851b4c6e96a51d1ac298c7ed85efac6ffe8335.tar.bz2
lombok-58851b4c6e96a51d1ac298c7ed85efac6ffe8335.zip
Updated the javadoc of each and every feature annotation that lombok has:
* Removed most documentation and instead put in a link to the much more up to date and extensive documentation at http://projectlombok.org/features * Getting ahead of ourselves a little, added notes on onConstructor/onParam/onMethod which we are about to add in the next few commits. * Updated copyrights to 2012.
Diffstat (limited to 'src/core/lombok/experimental')
-rw-r--r--src/core/lombok/experimental/Accessors.java3
-rw-r--r--src/core/lombok/experimental/ExtensionMethod.java3
-rw-r--r--src/core/lombok/experimental/FieldDefaults.java5
-rw-r--r--src/core/lombok/experimental/Value.java31
-rw-r--r--src/core/lombok/experimental/Wither.java7
5 files changed, 22 insertions, 27 deletions
diff --git a/src/core/lombok/experimental/Accessors.java b/src/core/lombok/experimental/Accessors.java
index b925e746..2748bfa9 100644
--- a/src/core/lombok/experimental/Accessors.java
+++ b/src/core/lombok/experimental/Accessors.java
@@ -28,6 +28,9 @@ import java.lang.annotation.Target;
/**
* A container for settings for the generation of getters and setters.
+ * <p>
+ * Complete documentation is found at <a href="http://projectlombok.org/features/experimental/Accessors.html">the project lombok features page for &#64;Accessors</a>.
+ * <p>
* Using this annotation does nothing by itself; an annotation that makes lombok generate getters and setters,
* such as {@link lombok.Setter} or {@link lombok.Data} is also required.
*/
diff --git a/src/core/lombok/experimental/ExtensionMethod.java b/src/core/lombok/experimental/ExtensionMethod.java
index 74787fac..44f28d04 100644
--- a/src/core/lombok/experimental/ExtensionMethod.java
+++ b/src/core/lombok/experimental/ExtensionMethod.java
@@ -31,6 +31,9 @@ import java.lang.annotation.*;
* otherwise modifying the original type. Extension methods are a special kind of static method, but they are called as
* if they were instance methods on the extended type.
* <p>
+ * Complete documentation is found at <a href="http://projectlombok.org/features/experimental/ExtensionMethod.html">the project lombok features page for &#64;ExtensionMethod</a>.
+ * <p>
+ * <p>
* Before:
*
* <pre>
diff --git a/src/core/lombok/experimental/FieldDefaults.java b/src/core/lombok/experimental/FieldDefaults.java
index 5bbf92dc..8a3fb534 100644
--- a/src/core/lombok/experimental/FieldDefaults.java
+++ b/src/core/lombok/experimental/FieldDefaults.java
@@ -30,12 +30,13 @@ import lombok.AccessLevel;
/**
* Adds modifiers to each field in the type with this annotation.
+ * <p>
+ * Complete documentation is found at <a href="http://projectlombok.org/features/experimental/FieldDefaults.html">the project lombok features page for &#64;FieldDefaults</a>.
+ * <p>
* If {@code makeFinal} is {@code true}, then each field that is not annotated with {@code @NonFinal} will have the {@code final} modifier added.
* <p>
* If {@code level} is set, then each field that is package private (i.e. no access modifier) and does not have the {@code @PackagePrivate} annotation will
* have the appropriate access level modifier added.
- * <p>
- * The only fields that are skipped are those that start with a '$'; everything else, including static, volatile, and transient fields, are modified.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
diff --git a/src/core/lombok/experimental/Value.java b/src/core/lombok/experimental/Value.java
index 70ac1ba7..6c07d2fc 100644
--- a/src/core/lombok/experimental/Value.java
+++ b/src/core/lombok/experimental/Value.java
@@ -28,30 +28,17 @@ import java.lang.annotation.Target;
/**
* Generates a lot of code which fits with a class that is a representation of an immutable entity.
- * Specifically, it generates:<ul>
- * <li>Getters for all fields
- * <li>toString method
- * <li>hashCode and equals implementations that check all non-transient fields.
- * <li>Generates withers for all fields (except final fields that are initialized in the field declaration itself)
- * <li>Generates a constructor for each argument
- * <li>Adds {@code private} and {@code final} to each field.
- * <li>Makes the class itself final.
- * </ul>
- *
- * In other words, {@code @Value} is a shorthand for:<br />
- * {@code final @Getter @Wither @FieldDefaults(makeFinal=true,level=AccessLevel.PRIVATE) @EqualsAndHashCode @ToString @AllArgsConstructor}.
- * <p>
- * If any method to be generated already exists (in name and parameter count - the return type or parameter types are not relevant), then
- * that method will not be generated by the Value annotation.
* <p>
- * The generated constructor will have 1 parameter for each field. The generated toString will print all fields,
- * while the generated hashCode and equals take into account all non-transient fields.<br>
- * Static fields are skipped (no getter or setter, and they are not included in toString, equals, hashCode, or the constructor).
+ * Equivalent to {@code @Getter @Wither @FieldDefaults(makeFinal=true, level=AccessLevel.PRIVATE) @RequiredArgsConstructor @ToString @EqualsAndHashCode}.
* <p>
- * {@code toString}, {@code equals}, and {@code hashCode} use the deepX variants in the
- * {@code java.util.Arrays} utility class. Therefore, if your class has arrays that contain themselves,
- * these methods will just loop endlessly until the inevitable {@code StackOverflowError}. This behaviour
- * is no different from {@code java.util.ArrayList}, though.
+ * Complete documentation is found at <a href="http://projectlombok.org/features/experimental/Value.html">the project lombok features page for &#64;Value</a>.
+ *
+ * @see lombok.Getter
+ * @see Wither
+ * @see lombok.RequiredArgsConstructor
+ * @see lombok.ToString
+ * @see lombok.EqualsAndHashCode
+ * @see lombok.Data
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
diff --git a/src/core/lombok/experimental/Wither.java b/src/core/lombok/experimental/Wither.java
index ec2f5496..58be660a 100644
--- a/src/core/lombok/experimental/Wither.java
+++ b/src/core/lombok/experimental/Wither.java
@@ -31,6 +31,10 @@ import lombok.AccessLevel;
/**
* Put on any field to make lombok build a 'wither' - a withX method which produces a clone of this object (except for 1 field which gets a new value).
* <p>
+ * Complete documentation is found at <a href="http://projectlombok.org/features/experimental/Wither.html">the project lombok features page for &#64;Wither</a>.
+ * <p>
+ * Even though it is not listed, this annotation also has the {@code onParam} and {@code onMethod} parameter. See the full documentation for more details.
+ * <p>
* Example:
* <pre>
* private &#64;Wither final int foo;
@@ -43,9 +47,6 @@ import lombok.AccessLevel;
* return this.foo == foo ? this : new SELF_TYPE(otherField1, otherField2, foo);
* }
* </pre>
- *
- * If any method named {@code withFoo} (case insensitive) exists, regardless of return type or parameters,
- * no method is generated, and instead a compiler warning is emitted.
* <p>
* This annotation can also be applied to a class, in which case it'll be as if all non-static fields that don't already have
* a {@code Wither} annotation have the annotation.