mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 08:17:18 +00:00
Added javadoc to the annotation parameters for the @Constructor annotations,
and also added the suppressConstructorProperties flag.
This commit is contained in:
1 parent
067ecf7118
commit
8c3b34e851
3 files changed
+63
No files matched your search
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user