diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/AllArgsConstructor.java | 21 | ||||
-rw-r--r-- | src/core/lombok/NoArgsConstructor.java | 21 | ||||
-rw-r--r-- | src/core/lombok/RequiredArgsConstructor.java | 21 |
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; } |