From 9d8c4e4099bef9b7854cc5d77bc996c3b3bf0e41 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 6 Oct 2015 00:25:32 +0200 Subject: New feature: FieldDefaults can now be configured to apply to _every_ file, regardless of annotations. --- .../resource/before/FieldDefaultsViaConfig.java | 16 ++++++++++++++++ ...FieldDefaultsViaConfigAndRequiredArgsConstructor.java | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 test/transform/resource/before/FieldDefaultsViaConfig.java create mode 100644 test/transform/resource/before/FieldDefaultsViaConfigAndRequiredArgsConstructor.java (limited to 'test/transform/resource/before') diff --git a/test/transform/resource/before/FieldDefaultsViaConfig.java b/test/transform/resource/before/FieldDefaultsViaConfig.java new file mode 100644 index 00000000..61f6daca --- /dev/null +++ b/test/transform/resource/before/FieldDefaultsViaConfig.java @@ -0,0 +1,16 @@ +//CONF: lombok.fieldDefaults.defaultFinal = true +//CONF: lombok.fieldDefaults.defaultPrivate = true +class FieldDefaultsViaConfig1 { + int x; + @lombok.experimental.NonFinal int y; + + FieldDefaultsViaConfig1(int x) { + this.x = x; + } +} + +@lombok.experimental.FieldDefaults(level = lombok.AccessLevel.PROTECTED) +class FieldDefaultsViaConfig2 { + @lombok.experimental.PackagePrivate int x = 2; + int y = 0; +} diff --git a/test/transform/resource/before/FieldDefaultsViaConfigAndRequiredArgsConstructor.java b/test/transform/resource/before/FieldDefaultsViaConfigAndRequiredArgsConstructor.java new file mode 100644 index 00000000..8c0607d7 --- /dev/null +++ b/test/transform/resource/before/FieldDefaultsViaConfigAndRequiredArgsConstructor.java @@ -0,0 +1,5 @@ +//CONF: lombok.fieldDefaults.defaultFinal = true +@lombok.RequiredArgsConstructor +class FieldDefaultsViaConfigAndRequiredArgsConstructor { + int x; +} -- cgit