mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 18:15:55 +00:00
[Feature] staticConstructor should use already defined private constructor if available
This commit is contained in:
1 parent
3496a3e963
commit
d3ae4d9948
6 files changed
+135
-12
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import lombok.Value;
|
||||
@Value(staticConstructor = "of")
|
||||
public class ValueStaticConstructorOf {
|
||||
|
||||
String name;
|
||||
Double price;
|
||||
|
||||
private ValueStaticConstructorOf(String name, Double price) {
|
||||
this.name = name;
|
||||
this.price = price;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user