aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/experimental
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2017-06-12 23:39:36 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2017-06-13 00:15:32 +0200
commit5edb6ce5e10d40572a6a760902a415264c9a485e (patch)
treebbcc72273795b3c68d2784eaedbfdf74f56c679f /src/core/lombok/experimental
parente0a91d25896b9d67f0cf3f1a5bb94c40e1ecfc94 (diff)
downloadlombok-5edb6ce5e10d40572a6a760902a415264c9a485e.tar.gz
lombok-5edb6ce5e10d40572a6a760902a415264c9a485e.tar.bz2
lombok-5edb6ce5e10d40572a6a760902a415264c9a485e.zip
Javadoc now builds without warnings. All links to external javadoc replaced with straight up links to avoid the <javadoc> target from trying to download a bunch of index pages.
Diffstat (limited to 'src/core/lombok/experimental')
-rw-r--r--src/core/lombok/experimental/Accessors.java14
-rw-r--r--src/core/lombok/experimental/Builder.java15
-rw-r--r--src/core/lombok/experimental/Delegate.java4
-rw-r--r--src/core/lombok/experimental/ExtensionMethod.java4
-rw-r--r--src/core/lombok/experimental/Value.java2
-rw-r--r--src/core/lombok/experimental/Wither.java22
6 files changed, 45 insertions, 16 deletions
diff --git a/src/core/lombok/experimental/Accessors.java b/src/core/lombok/experimental/Accessors.java
index 07c92159..dc9ae4b0 100644
--- a/src/core/lombok/experimental/Accessors.java
+++ b/src/core/lombok/experimental/Accessors.java
@@ -38,15 +38,19 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.SOURCE)
public @interface Accessors {
/**
- * If true, accessors will be named after the field and not include a <code>get</code> or <code>set</code>
- * prefix. If true and <code>chain</code> is omitted, <code>chain</code> defaults to <code>true</code>.
+ * If true, accessors will be named after the field and not include a {@code get} or {@code set}
+ * prefix. If true and {@code chain} is omitted, {@code chain} defaults to {@code true}.
* <strong>default: false</strong>
+ *
+ * @return Whether or not to make fluent methods (named {@code fieldName()}, not for example {@code setFieldName}).
*/
boolean fluent() default false;
/**
- * If true, setters return <code>this</code> instead of <code>void</code>.
- * <strong>default: false</strong>, unless <code>fluent=true</code>, then <strong>default: true</code>
+ * If true, setters return {@code this} instead of {@code void}.
+ * <strong>default: false</strong>, unless {@code fluent=true}, then <strong>default: true</strong>
+ *
+ * @return Whether or not setters should return themselves (chaining) or {@code void} (no chaining).
*/
boolean chain() default false;
@@ -55,6 +59,8 @@ public @interface Accessors {
* Note that a prefix only counts if the next character is NOT a lowercase character or the last
* letter of the prefix is not a letter (for instance an underscore). If multiple fields
* all turn into the same name when the prefix is stripped, an error will be generated.
+ *
+ * @return If you are in the habit of prefixing your fields (for example, you name them {@code fFieldName}, specify such prefixes here).
*/
String[] prefix() default {};
}
diff --git a/src/core/lombok/experimental/Builder.java b/src/core/lombok/experimental/Builder.java
index b5c14216..7b364bff 100644
--- a/src/core/lombok/experimental/Builder.java
+++ b/src/core/lombok/experimental/Builder.java
@@ -110,15 +110,20 @@ import java.lang.annotation.Target;
@Retention(SOURCE)
@Deprecated
public @interface Builder {
- /** Name of the method that creates a new builder instance. Default: {@code builder}. */
+ /** @return Name of the method that creates a new builder instance. Default: {@code builder}. */
String builderMethodName() default "builder";
- /** Name of the method in the builder class that creates an instance of your {@code @Builder}-annotated class. */
+ /** @return Name of the method in the builder class that creates an instance of your {@code @Builder}-annotated class. */
String buildMethodName() default "build";
- /** Name of the builder class.
+ /**
+ * Name of the builder class.
+ *
* Default for {@code @Builder} on types and constructors: {@code (TypeName)Builder}.
+ * <p>
* Default for {@code @Builder} on methods: {@code (ReturnTypeName)Builder}.
+ *
+ * @return Name of the builder class that will be generated (or if it already exists, will be filled with builder elements).
*/
String builderClassName() default "";
@@ -127,6 +132,8 @@ public @interface Builder {
* to {@code false} to name the setter method for field {@code someField}: {@code setSomeField}.
* <p>
* <strong>Default: true</strong>
+ *
+ * @return Whether to generate fluent methods (just {@code fieldName()} instead of {@code setFieldName()}).
*/
boolean fluent() default true;
@@ -135,6 +142,8 @@ public @interface Builder {
* calls to set methods. Set this to {@code false} to have these 'set' methods return {@code void} instead.
* <p>
* <strong>Default: true</strong>
+ *
+ * @return Whether to generate chaining methods (each build call returns itself instead of returning {@code void}).
*/
boolean chain() default true;
}
diff --git a/src/core/lombok/experimental/Delegate.java b/src/core/lombok/experimental/Delegate.java
index 3bf4419f..cc844526 100644
--- a/src/core/lombok/experimental/Delegate.java
+++ b/src/core/lombok/experimental/Delegate.java
@@ -52,6 +52,8 @@ public @interface Delegate {
* type listed here is used only to determine which delegate methods to generate.
*
* NB: All methods in {@code Object}, as well as {@code canEqual(Object other)} will never be delegated.
+ *
+ * @return For each method (not already in {@code java.lang.Object}) in these types, generate a delegate method.
*/
Class<?>[] types() default {};
@@ -59,6 +61,8 @@ public @interface Delegate {
* Each method in any of the types listed here (include supertypes) will <em>not</em> be delegated.
*
* NB: All methods in {@code Object}, as well as {@code canEqual(Object other)} will never be delegated.
+ *
+ * @return For each method (not already in {@code java.lang.Object}) in these types, skip generating a delegate method (overrides {@code types()}).
*/
Class<?>[] excludes() default {};
}
diff --git a/src/core/lombok/experimental/ExtensionMethod.java b/src/core/lombok/experimental/ExtensionMethod.java
index cdd0cf59..af38f6ed 100644
--- a/src/core/lombok/experimental/ExtensionMethod.java
+++ b/src/core/lombok/experimental/ExtensionMethod.java
@@ -60,12 +60,14 @@ import java.lang.annotation.*;
@Target(TYPE)
@Retention(SOURCE)
public @interface ExtensionMethod {
- /** All types whose static methods will be exposed as extension methods. */
+ /** @return All types whose static methods will be exposed as extension methods. */
Class<?>[] value();
/**
* If {@code true}, an applicable extension method is used (if found) even if the method call already was compilable (this is the default).
* If {@code false}, an extension method is only used if the method call is not also defined by the type itself.
+ *
+ * @return Whether or not to override already existing methods with the extension.
*/
boolean suppressBaseMethods() default true;
}
diff --git a/src/core/lombok/experimental/Value.java b/src/core/lombok/experimental/Value.java
index 9776681a..06dbee13 100644
--- a/src/core/lombok/experimental/Value.java
+++ b/src/core/lombok/experimental/Value.java
@@ -55,6 +55,8 @@ public @interface Value {
* </pre>
*
* Default: No static constructor, instead the normal constructor is public.
+ *
+ * @return Name of static 'constructor' method to generate (blank = generate a normal constructor).
*/
String staticConstructor() default "";
}
diff --git a/src/core/lombok/experimental/Wither.java b/src/core/lombok/experimental/Wither.java
index 5ef50076..3df546d0 100644
--- a/src/core/lombok/experimental/Wither.java
+++ b/src/core/lombok/experimental/Wither.java
@@ -56,26 +56,32 @@ import lombok.AccessLevel;
public @interface Wither {
/**
* If you want your wither to be non-public, you can specify an alternate access level here.
+ *
+ * @return The method will be generated with this access modifier.
*/
AccessLevel value() default AccessLevel.PUBLIC;
/**
* Any annotations listed here are put on the generated method.
- * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
- * up to JDK7:<br />
- * {@code @Wither(onMethod=@__({@AnnotationsGoHere}))}<br />
- * from JDK8:<br />
+ * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br>
+ * up to JDK7:<br>
+ * {@code @Wither(onMethod=@__({@AnnotationsGoHere}))}<br>
+ * from JDK8:<br>
* {@code @Wither(onMethod_={@AnnotationsGohere})} // note the underscore after {@code onMethod}.
+ *
+ * @return List of annotations to apply to the generated method.
*/
AnyAnnotation[] onMethod() default {};
/**
* Any annotations listed here are put on the generated method's parameter.
- * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
- * up to JDK7:<br />
- * {@code @Wither(onParam=@__({@AnnotationsGoHere}))}<br />
- * from JDK8:<br />
+ * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br>
+ * up to JDK7:<br>
+ * {@code @Wither(onParam=@__({@AnnotationsGoHere}))}<br>
+ * from JDK8:<br>
* {@code @Wither(onParam_={@AnnotationsGohere})} // note the underscore after {@code onParam}.
+ *
+ * @return List of annotations to apply to the generated parameter in the method.
*/
AnyAnnotation[] onParam() default {};