aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2010-07-19 23:40:59 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2010-07-19 23:40:59 +0200
commit8c3b34e8512a35c81f9d7e762246472d29cd9dd8 (patch)
treedd855aebd2f8a462410498274e7220b899c3491e /src/core
parent067ecf7118abbd36199f6819713c371419ccf0eb (diff)
downloadlombok-8c3b34e8512a35c81f9d7e762246472d29cd9dd8.tar.gz
lombok-8c3b34e8512a35c81f9d7e762246472d29cd9dd8.tar.bz2
lombok-8c3b34e8512a35c81f9d7e762246472d29cd9dd8.zip
Added javadoc to the annotation parameters for the @Constructor annotations,
and also added the suppressConstructorProperties flag.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/AllArgsConstructor.java21
-rw-r--r--src/core/lombok/NoArgsConstructor.java21
-rw-r--r--src/core/lombok/RequiredArgsConstructor.java21
3 files changed, 63 insertions, 0 deletions
diff --git a/src/core/lombok/AllArgsConstructor.java b/src/core/lombok/AllArgsConstructor.java
index 605dc0f2..8b3c57bc 100644
--- a/src/core/lombok/AllArgsConstructor.java
+++ b/src/core/lombok/AllArgsConstructor.java
@@ -33,6 +33,27 @@ import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface AllArgsConstructor {
+ /**
+ * If set, the generated constructor will be private, and an additional static 'constructor'
+ * is generated with the same argument list that wraps the real constructor.
+ *
+ * Such a static 'constructor' is primarily useful as it infers type arguments.
+ */
String staticName() default "";
+
+ /**
+ * Sets the access level of the constructor. By default, generated constructors are {@code public}.
+ */
AccessLevel access() default lombok.AccessLevel.PUBLIC;
+
+ /**
+ * Constructors are generated with the {@link java.beans.ConstructorProperties} annotation.
+ * However, this annotation is new in 1.6 which means those compiling for 1.5 will need
+ * to set this value to true.
+ *
+ * @deprecated Java 1.5 has already been end-of-lifed. As java 1.5 loses ground this
+ * method will eventually be removed.
+ */
+ @Deprecated
+ boolean suppressConstructorProperties() default false;
}
diff --git a/src/core/lombok/NoArgsConstructor.java b/src/core/lombok/NoArgsConstructor.java
index 4d0424ec..392fef8b 100644
--- a/src/core/lombok/NoArgsConstructor.java
+++ b/src/core/lombok/NoArgsConstructor.java
@@ -36,6 +36,27 @@ import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface NoArgsConstructor {
+ /**
+ * If set, the generated constructor will be private, and an additional static 'constructor'
+ * is generated with the same argument list that wraps the real constructor.
+ *
+ * Such a static 'constructor' is primarily useful as it infers type arguments.
+ */
String staticName() default "";
+
+ /**
+ * Sets the access level of the constructor. By default, generated constructors are {@code public}.
+ */
AccessLevel access() default lombok.AccessLevel.PUBLIC;
+
+ /**
+ * Constructors are generated with the {@link java.beans.ConstructorProperties} annotation.
+ * However, this annotation is new in 1.6 which means those compiling for 1.5 will need
+ * to set this value to true.
+ *
+ * @deprecated Java 1.5 has already been end-of-lifed. As java 1.5 loses ground this
+ * method will eventually be removed.
+ */
+ @Deprecated
+ boolean suppressConstructorProperties() default false;
}
diff --git a/src/core/lombok/RequiredArgsConstructor.java b/src/core/lombok/RequiredArgsConstructor.java
index c2b2605c..de45cd37 100644
--- a/src/core/lombok/RequiredArgsConstructor.java
+++ b/src/core/lombok/RequiredArgsConstructor.java
@@ -33,6 +33,27 @@ import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface RequiredArgsConstructor {
+ /**
+ * If set, the generated constructor will be private, and an additional static 'constructor'
+ * is generated with the same argument list that wraps the real constructor.
+ *
+ * Such a static 'constructor' is primarily useful as it infers type arguments.
+ */
String staticName() default "";
+
+ /**
+ * Sets the access level of the constructor. By default, generated constructors are {@code public}.
+ */
AccessLevel access() default lombok.AccessLevel.PUBLIC;
+
+ /**
+ * Constructors are generated with the {@link java.beans.ConstructorProperties} annotation.
+ * However, this annotation is new in 1.6 which means those compiling for 1.5 will need
+ * to set this value to true.
+ *
+ * @deprecated Java 1.5 has already been end-of-lifed. As java 1.5 loses ground this
+ * method will eventually be removed.
+ */
+ @Deprecated
+ boolean suppressConstructorProperties() default false;
}