aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/SuperBuilderBasicToBuilder.java
diff options
context:
space:
mode:
authorJan Rieke <it@janrieke.de>2018-09-11 20:37:16 +0200
committerJan Rieke <it@janrieke.de>2018-09-11 20:44:19 +0200
commita2b884c71194c780d37ccbd84561abd6a0f63741 (patch)
tree53c91b1c713c8db0523999bb28592ef8f40d7e08 /test/transform/resource/before/SuperBuilderBasicToBuilder.java
parentda59d2d6375afcfcf6cb43288adba61cb99a49e8 (diff)
downloadlombok-a2b884c71194c780d37ccbd84561abd6a0f63741.tar.gz
lombok-a2b884c71194c780d37ccbd84561abd6a0f63741.tar.bz2
lombok-a2b884c71194c780d37ccbd84561abd6a0f63741.zip
SuperBuilder: fixed ObtainVia
Diffstat (limited to 'test/transform/resource/before/SuperBuilderBasicToBuilder.java')
-rw-r--r--test/transform/resource/before/SuperBuilderBasicToBuilder.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/transform/resource/before/SuperBuilderBasicToBuilder.java b/test/transform/resource/before/SuperBuilderBasicToBuilder.java
index bc3578f5..4dfac613 100644
--- a/test/transform/resource/before/SuperBuilderBasicToBuilder.java
+++ b/test/transform/resource/before/SuperBuilderBasicToBuilder.java
@@ -4,7 +4,21 @@ public class SuperBuilderBasicToBuilder {
@lombok.experimental.SuperBuilder(toBuilder=true)
public static class Parent {
int field1;
+ @lombok.Builder.ObtainVia(field="field1")
+ int obtainViaField;
+ @lombok.Builder.ObtainVia(method="method")
+ int obtainViaMethod;
+ @lombok.Builder.ObtainVia(method = "staticMethod", isStatic = true)
+ String obtainViaStaticMethod;
@lombok.Singular List<String> items;
+
+ int method() {
+ return 2;
+ }
+
+ private static String staticMethod(Parent instance) {
+ return "staticMethod";
+ }
}
@lombok.experimental.SuperBuilder(toBuilder=true)