@Target(value=TYPE) @Retention(value=SOURCE) public @interface RequiredArgsConstructor
@NonNull
.
Complete documentation is found at the project lombok features page for @Constructor.
Even though it is not listed, this annotation also has the onConstructor
parameter. See the full documentation for more details.
NoArgsConstructor
,
AllArgsConstructor
Modifier and Type | Optional Element and Description |
---|---|
AccessLevel |
access
Sets the access level of the constructor.
|
RequiredArgsConstructor.AnyAnnotation[] |
onConstructor
Any annotations listed here are put on the generated constructor.
|
String |
staticName
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.
|
boolean |
suppressConstructorProperties
Deprecated.
THIS FEATURE WILL BE REMOVED after March 31st 2015. Use configuration key
ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES instead. |
public abstract String staticName
public abstract RequiredArgsConstructor.AnyAnnotation[] onConstructor
@RequiredArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))
public abstract AccessLevel access
public
.@Deprecated public abstract boolean suppressConstructorProperties
ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES
instead.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.Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.