Files
openide/plugins/lombok/testData/usage/FindUsageWitherRecord.java
Henri Viik 2504ec6d32 IDEA-305079 show usages for record fields using lombok @Builder and @With #2252
GitOrigin-RevId: fae916295f1a3cc40d759bf10a995446aa43a7ca
2022-11-27 21:18:03 +00:00

21 lines
606 B
Java

// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
import lombok.Value;
import lombok.experimental.Wither;
@Wither
@Value
public record FindUsageWitherRecord(
int foo,
String b<caret>ar
) {
public static void main(String[] args) {
FindUsageWitherRecord findUsageWitherRecord = new FindUsageWitherRecord(1, "bar");
findUsageWitherRecord
.withBar("myBar")
.withFoo(1981);
System.out.println("Bar is: " + findUsageWitherRecord.bar());
System.out.println("Foo is: " + findUsageWitherRecord.foo());
}
}