@Target(TYPE)
@Retention(SOURCE)
public @interface Value
Equivalent to @Getter @FieldDefaults(makeFinal=true, level=AccessLevel.PRIVATE) @AllArgsConstructor @ToString @EqualsAndHashCode
.
Complete documentation is found at the project lombok features page for @Value.
Getter
,
FieldDefaults
,
AllArgsConstructor
,
ToString
,
EqualsAndHashCode
,
Data
Modifier and Type | Optional Element | Description |
---|---|---|
java.lang.String |
staticConstructor |
If you specify a static constructor name, then the generated constructor will be private, and
instead a static factory method is created that other classes can use to create instances.
|
java.lang.String staticConstructor
public @Value(staticConstructor = "of") class Point { final int x, y; }Default: No static constructor, instead the normal constructor is public.
Copyright © 2009-2018 The Project Lombok Authors, licensed under the MIT licence.