From 94d9755be4843620e1191dc62ae3fc539856aa45 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Tue, 7 Feb 2017 14:51:58 +0100 Subject: trivial --- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 77f615b5..135b5c77 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -30,8 +30,6 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import org.eclipse.jdt.internal.corext.refactoring.SearchResultGroup; - import lombok.core.AgentLauncher; import lombok.patcher.Filter; import lombok.patcher.Hook; -- cgit From ca2966f735416b62b1906edb22e68bad3963dc5e Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Tue, 7 Feb 2017 14:56:47 +0100 Subject: Display changelog in installer --- build.xml | 10 +- .../src/lombok/website/CompileChangelog.java | 36 +++-- buildScripts/website.ant.xml | 13 ++ doc/changelog.markdown | 4 +- src/installer/lombok/installer/InstallerGUI.java | 164 +++++++++++++++++---- 5 files changed, 182 insertions(+), 45 deletions(-) (limited to 'src') diff --git a/build.xml b/build.xml index f20973cf..654c23ea 100644 --- a/build.xml +++ b/build.xml @@ -232,7 +232,13 @@ lombok.launch.AnnotationProcessorHider$ClaimingProcessor lombok.launch.AnnotationProcessorHider$AstModificationNotifier - + + + + + + + @@ -240,7 +246,7 @@ lombok.launch.AnnotationProcessorHider$ClaimingProcessor ${releaseTimestamp} - + diff --git a/buildScripts/src/lombok/website/CompileChangelog.java b/buildScripts/src/lombok/website/CompileChangelog.java index 60b70aa3..276842be 100644 --- a/buildScripts/src/lombok/website/CompileChangelog.java +++ b/buildScripts/src/lombok/website/CompileChangelog.java @@ -1,18 +1,20 @@ package lombok.website; -import com.petebevin.markdown.MarkdownProcessor; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.regex.Matcher; import java.util.regex.Pattern; +import com.petebevin.markdown.MarkdownProcessor; + public class CompileChangelog { public static void main(String[] args) { String fileIn = args[0]; String fileOut = args[1]; boolean edge = args.length > 3 && "-edge".equals(args[2]); - String version = edge ? args[3] : null; + boolean latest = args.length > 3 && "-latest".equals(args[2]); + String version = args.length > 3 ? args[3] : null; try { FileInputStream in = new FileInputStream(fileIn); @@ -27,7 +29,14 @@ public class CompileChangelog { in.close(); String markdown = new String(out.toByteArray(), "UTF-8"); - String result = edge ? buildEdge(markdown, version) : build(markdown); + String result; + if (edge) { + result = buildEdge(sectionByVersion(markdown, version)); + } else if (latest) { + result = buildLatest(sectionByVersion(markdown, version)); + } else { + result = build(markdown); + } FileOutputStream file = new FileOutputStream(fileOut); file.write(result.getBytes("UTF-8")); @@ -43,9 +52,19 @@ public class CompileChangelog { return new MarkdownProcessor().markdown(markdown); } - private static final Pattern LAST_CHANGELOG = Pattern.compile( - "^.*### v$", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); - private static String buildEdge(String markdown, String version) { + private static String buildEdge(String section) { + String latest = section != null ? section : "* No changelog records for this edge release."; + return new MarkdownProcessor().markdown(latest); + } + + private static String buildLatest(String section) { + String latest = section != null ? section : "* No changelog records for this release."; + String noIssueLinks = latest.replaceAll("\\[[^]]*[Ii]ssue[^]]*\\]\\([^)]*\\)", ""); + String noLinks = noIssueLinks.replaceAll("\\[([^]]*)\\]\\([^)]*\\)", "$1"); + return new MarkdownProcessor().markdown(noLinks); + } + + private static String sectionByVersion(String markdown, String version) { if (version.toUpperCase().endsWith("-HEAD") || version.toUpperCase().endsWith("-EDGE")) { version = version.substring(0, version.length() - 5); } @@ -53,7 +72,6 @@ public class CompileChangelog { Pattern p = Pattern.compile( "(?is-m)^.*###\\s*v" + version + ".*?\n(.*?)(?:###\\s*v.*)?$"); Matcher m = p.matcher(markdown); - String subMarkdown = m.matches() ? m.group(1) : "* No changelog records for this edge release."; - return new MarkdownProcessor().markdown(subMarkdown); + return m.matches() ? m.group(1) : null; } -} +} \ No newline at end of file diff --git a/buildScripts/website.ant.xml b/buildScripts/website.ant.xml index 19b995d3..c1c780ae 100644 --- a/buildScripts/website.ant.xml +++ b/buildScripts/website.ant.xml @@ -243,6 +243,19 @@ such as converting the changelog into HTML, and creating javadoc. + + + + + + + + + + + + + diff --git a/doc/changelog.markdown b/doc/changelog.markdown index f29da540..cc038fa9 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -4,8 +4,8 @@ Lombok Changelog ### v1.16.13 "Edgy Guinea Pig" * v1.16.12 is the latest stable release of Project Lombok. * FEATURE: Generated classes, methods and fields are now also annotated with `@lombok.Generated` [Issue #1014](https://github.com/rzwitserloot/lombok/issues/1014) -* PLATFORM: Lombok can now be used together with other annotation processors that are looking for lombok-generated methods, but only if lombok is the first annotation processor executed. The most commonly used annotation processor affected by this change is [MapStruct](http://mapstruct.org/); we've worked with the mapstruct team specifically to allow any order. Other annotation processors might follow the framework we've built to make this possible; point the authors of any such processor to us and we'll get it sorted. [MapStruct issue #510](https://github.com/mapstruct/mapstruct/issues/510) [Lombok issue #973](https://github.com/rzwitserloot/lombok/issues/973). -* PLATFORM: Eclipse: Refactor script 'rename field' when lombok has also generated getters and/or setters for this field is nicer now [Issue #210](https://github.com/rzwitserloot/lombok/issues/210). +* PLATFORM: Lombok can now be used together with other annotation processors that are looking for lombok-generated methods, but only if lombok is the first annotation processor executed. The most commonly used annotation processor affected by this change is [MapStruct](http://mapstruct.org/); we've worked with the mapstruct team specifically to allow any order. Other annotation processors might follow the framework we've built to make this possible; point the authors of any such processor to us and we'll get it sorted [MapStruct issue #510](https://github.com/mapstruct/mapstruct/issues/510) [Lombok issue #973](https://github.com/rzwitserloot/lombok/issues/973) +* PLATFORM: Eclipse: Refactor script 'rename field' when lombok has also generated getters and/or setters for this field is nicer now [Issue #210](https://github.com/rzwitserloot/lombok/issues/210) ### v1.16.12 (December 5th, 2016) * FEATURE: `var` is the mutable sister of `val`. For now experimental, and opt-in using `ALLOW` in the flagUsage configuration key. Thanks for the contribution, Bulgakov Alexander. diff --git a/src/installer/lombok/installer/InstallerGUI.java b/src/installer/lombok/installer/InstallerGUI.java index ebdf2035..7a94d595 100644 --- a/src/installer/lombok/installer/InstallerGUI.java +++ b/src/installer/lombok/installer/InstallerGUI.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2016 The Project Lombok Authors. + * Copyright (C) 2009-2017 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -39,6 +39,8 @@ import java.awt.event.ActionListener; import java.awt.font.TextAttribute; import java.io.File; import java.io.FilenameFilter; +import java.io.InputStream; +import java.io.InputStreamReader; import java.net.URI; import java.util.ArrayList; import java.util.Collections; @@ -65,6 +67,8 @@ import javax.swing.JScrollPane; import javax.swing.Scrollable; import javax.swing.SwingUtilities; import javax.swing.filechooser.FileFilter; +import javax.swing.plaf.basic.BasicHTML; +import javax.swing.text.View; import lombok.core.Version; import lombok.installer.OsUtils.OS; @@ -85,6 +89,7 @@ public class InstallerGUI { private Component ideArea; private Component uninstallArea; private Component howIWorkArea; + private Component successArea; private Box uninstallBox; private JHyperLink uninstallButton; @@ -113,6 +118,8 @@ public class InstallerGUI { uninstallArea.setVisible(false); howIWorkArea = buildHowIWorkArea(); howIWorkArea.setVisible(false); + successArea = buildSuccessArea(); + successArea.setVisible(false); buildChrome(appWindow.getContentPane()); appWindow.pack(); } catch (Throwable t) { @@ -153,6 +160,7 @@ public class InstallerGUI { howIWorkArea.setVisible(false); javacArea.setVisible(true); ideArea.setVisible(true); + successArea.setVisible(false); appWindow.pack(); } }); @@ -160,9 +168,76 @@ public class InstallerGUI { constraints.gridy = 2; container.add(buttonBar, constraints); + container.setPreferredSize(new Dimension(462, 415)); return container; } + private void showSuccess(String installSpecific) { + successExplanation.setText(SUCCESS_EXPLANATION.replace("%%%", installSpecific)); + howIWorkArea.setVisible(false); + javacArea.setVisible(false); + ideArea.setVisible(false); + successArea.setVisible(true); + appWindow.pack(); + } + + private JLabel successExplanation; + + private Component buildSuccessArea() { + JPanel container = new JPanel(); + + container.setLayout(new GridBagLayout()); + GridBagConstraints constraints = new GridBagConstraints(); + constraints.anchor = GridBagConstraints.WEST; + + container.add(new JLabel(SUCCESS_TITLE), constraints); + + constraints.gridy = 1; + constraints.insets = new Insets(8, 0, 0, 16); + container.add(successExplanation = new JLabel(SUCCESS_EXPLANATION), constraints); + + constraints.gridy++; + constraints.fill = GridBagConstraints.BOTH; + + JLabel notes = new JLabel(); + notes.setText(readChangeLog()); + + JScrollPane scroller = new JScrollPane(notes); + container.add(scroller, constraints); + scroller.setPreferredSize(new Dimension(380, 240)); + + View view = (View) notes.getClientProperty(BasicHTML.propertyKey); + view.setSize(380, 0.0f); + float w = view.getPreferredSpan(View.X_AXIS); + float h = view.getPreferredSpan(View.Y_AXIS); + notes.setSize((int) w, (int) h); + + container.setPreferredSize(new Dimension(462, 415)); + return container; + } + + private String readChangeLog() { + InputStream in = Installer.class.getResourceAsStream("/latestchanges.html"); + try { + char[] buff = new char[8192]; + StringBuilder contents = new StringBuilder(); + InputStreamReader reader = new InputStreamReader(in, "UTF-8"); + while (true) { + int read = reader.read(buff); + if (read == -1) break; + contents.append(buff, 0, read); + } + return "" + contents + ""; + } catch (Exception e) { + return "No Changelog available"; + } + finally { + try { + in.close(); + } catch (Exception ignore){ /**/} + } + } + private Component buildUninstallArea() { JPanel container = new JPanel(); @@ -210,6 +285,7 @@ public class InstallerGUI { constraints.gridy = 4; container.add(buttonBar, constraints); + container.setPreferredSize(new Dimension(462, 415)); return container; } @@ -232,6 +308,7 @@ public class InstallerGUI { constraints.gridy = 2; container.add(example, constraints); + container.setPreferredSize(new Dimension(462, 105)); return container; } @@ -419,7 +496,7 @@ public class InstallerGUI { uninstallPlaceholder.setVisible(false); container.add(uninstallPlaceholder, constraints); - + container.setPreferredSize(new Dimension(462, 296)); return container; } @@ -427,6 +504,7 @@ public class InstallerGUI { javacArea.setVisible(false); ideArea.setVisible(false); howIWorkArea.setVisible(true); + successArea.setVisible(false); appWindow.pack(); } @@ -453,6 +531,7 @@ public class InstallerGUI { spinner.setOpaque(true); spinner.setLayout(new FlowLayout()); spinner.add(new JLabel(new ImageIcon(Installer.class.getResource("loading.gif")))); + final Container appWindowContent = appWindow.getContentPane(); appWindow.setContentPane(spinner); final AtomicInteger successes = new AtomicInteger(); @@ -500,20 +579,13 @@ public class InstallerGUI { try { SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { + appWindow.setContentPane(appWindowContent); + appWindow.pack(); StringBuilder installSpecific = new StringBuilder(); for (String installSpecificMessage : installSpecificMessages) { installSpecific.append("
").append(installSpecificMessage); } - JOptionPane.showMessageDialog(appWindow, - "Lombok has been installed on the selected IDE installations.
" + - "Don't forget to add lombok.jar to your projects, and restart your IDE!" + installSpecific.toString() + "", - "Install successful", - JOptionPane.INFORMATION_MESSAGE); - appWindow.setVisible(false); - synchronized (exitMarker) { - exitMarker.set(0); - exitMarker.notifyAll(); - } + showSuccess(installSpecific.toString()); } }); } catch (Exception e) { @@ -711,6 +783,8 @@ public class InstallerGUI { appWindowContainer.add(howIWorkArea, constraints); + appWindowContainer.add(successArea, constraints); + constraints.gridy++; constraints.gridwidth = 2; constraints.gridx = 0; @@ -719,9 +793,33 @@ public class InstallerGUI { constraints.ipadx = 0; constraints.ipady = 0; constraints.fill = GridBagConstraints.HORIZONTAL; - constraints.anchor = GridBagConstraints.SOUTHEAST; + constraints.anchor = GridBagConstraints.SOUTHWEST; constraints.insets = new Insets(0, 16, 8, 8); + + appWindow.add(buildButtonBar(), constraints); + } + + private Box buildButtonBar() { Box buttonBar = Box.createHorizontalBox(); + + JHyperLink aboutLink = new JHyperLink(Installer.ABOUT_LOMBOK_URL.toString()); + aboutLink.addActionListener(openBrowser(aboutLink, Installer.ABOUT_LOMBOK_URL)); + buttonBar.add(aboutLink); + + buttonBar.add(Box.createRigidArea(new Dimension(16, 1))); + + JLabel versionLabel = new JLabel(); + versionLabel.setText("v" + Version.getVersion()); + + buttonBar.add(versionLabel); + buttonBar.add(Box.createRigidArea(new Dimension(16, 1))); + + JHyperLink changelogLink = new JHyperLink("View full changelog"); + changelogLink.addActionListener(openBrowser(changelogLink, Installer.ABOUT_LOMBOK_URL.resolve("/changelog.html"))); + buttonBar.add(changelogLink); + + buttonBar.add(Box.createHorizontalGlue()); + JButton quitButton = new JButton("Quit Installer"); quitButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -729,14 +827,18 @@ public class InstallerGUI { System.exit(0); } }); - final JHyperLink hyperlink = new JHyperLink(Installer.ABOUT_LOMBOK_URL.toString()); - hyperlink.addActionListener(new ActionListener() { + buttonBar.add(quitButton); + return buttonBar; + } + + private ActionListener openBrowser(final JHyperLink hyperlink, final URI location) { + return new ActionListener() { @Override public void actionPerformed(ActionEvent event) { hyperlink.setForeground(new Color(85, 145, 90)); try { //java.awt.Desktop doesn't exist in 1.5. Object desktop = Class.forName("java.awt.Desktop").getMethod("getDesktop").invoke(null); - Class.forName("java.awt.Desktop").getMethod("browse", URI.class).invoke(desktop, Installer.ABOUT_LOMBOK_URL); + Class.forName("java.awt.Desktop").getMethod("browse", URI.class).invoke(desktop, location); } catch (Exception e) { Runtime rt = Runtime.getRuntime(); try { @@ -746,34 +848,27 @@ public class InstallerGUI { cmd[0] = "cmd.exe"; cmd[1] = "/C"; cmd[2] = "start"; - cmd[3] = Installer.ABOUT_LOMBOK_URL.toString(); + cmd[3] = location.toString(); rt.exec(cmd); break; case MAC_OS_X: - rt.exec("open " + Installer.ABOUT_LOMBOK_URL.toString()); + rt.exec("open " + location.toString()); break; default: case UNIX: - rt.exec("firefox " + Installer.ABOUT_LOMBOK_URL.toString()); + rt.exec("firefox " + location.toString()); break; } } catch (Exception e2) { JOptionPane.showMessageDialog(appWindow, "Well, this is embarrassing. I don't know how to open a webbrowser.\n" + - "I guess you'll have to open it. Browse to:\n" + Installer.ABOUT_LOMBOK_URL + + "I guess you'll have to open it. Browse to:\n" + location + " for more information about Lombok.", "I'm embarrassed", JOptionPane.INFORMATION_MESSAGE); } } } - }); - buttonBar.add(hyperlink); - buttonBar.add(Box.createRigidArea(new Dimension(16, 1))); - buttonBar.add(new JLabel("v" + Version.getVersion() + "")); - - buttonBar.add(Box.createHorizontalGlue()); - buttonBar.add(quitButton); - appWindow.add(buttonBar, constraints); + }; } /** @@ -791,7 +886,7 @@ public class InstallerGUI { } private static final String IDE_TITLE = - "IDEs"; + "IDEs "; private static final String IDE_EXPLANATION = "Lombok can update your Eclipse or eclipse-based IDE to fully support all Lombok features.
" + @@ -801,7 +896,7 @@ public class InstallerGUI { "Scanning your drives for IDE installations..."; private static final String JAVAC_TITLE = - "Javac       (and tools that invoke javac such as ant and maven)"; + "Javac       (and tools that invoke javac such as ant and maven)"; private static final String JAVAC_EXPLANATION = "Lombok works 'out of the box' with javac.
Just make sure the lombok.jar is in your classpath when you compile."; @@ -810,13 +905,13 @@ public class InstallerGUI { "Example: javac -cp lombok.jar MyCode.java"; private static final String UNINSTALL_TITLE = - "Uninstall"; + "Uninstall "; private static final String UNINSTALL_EXPLANATION = "Uninstall Lombok from the following IDE Installations?"; private static final String HOW_I_WORK_TITLE = - "What this installer does"; + "What this installer does "; private static final String HOW_I_WORK_EXPLANATION = "

Eclipse

    " + @@ -826,6 +921,11 @@ public class InstallerGUI { "On Mac OS X, eclipse.ini is hidden in
    " + "Eclipse.app/Contents/MacOS so that's where I place the jar files."; + private static final String SUCCESS_TITLE = "Install successful "; + private static final String SUCCESS_EXPLANATION = "Lombok has been installed on the selected IDE installations.
    " + + "Don't forget to add lombok.jar to your projects, and exit and start your IDE!%%%"; + + private static class JHyperLink extends JButton { private static final long serialVersionUID = 1L; -- cgit From b42fef8edc8b3d5458c74c8b049c0cbb842b1ca1 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 9 Feb 2017 22:46:21 +0100 Subject: A shot-in-the-dark fix for issue #1293 which is not reproducible: Occasional duplicate class def errors in eclipse. --- src/launch/lombok/launch/ShadowClassLoader.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/launch/lombok/launch/ShadowClassLoader.java b/src/launch/lombok/launch/ShadowClassLoader.java index 37c479ee..2bcf46b5 100644 --- a/src/launch/lombok/launch/ShadowClassLoader.java +++ b/src/launch/lombok/launch/ShadowClassLoader.java @@ -451,7 +451,12 @@ class ShadowClassLoader extends ClassLoader { Class alreadyDefined = highlanderMap.get(name); if (alreadyDefined != null) return alreadyDefined; } - throw e; + try { + c = this.findLoadedClass(name); + } catch (LinkageError e2) { + throw e; + } + if (c == null) throw e; } if (highlanders.contains(name)) { -- cgit From 70f77f928ac7a6edf3ef91a41399c9a79561c871 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Thu, 9 Feb 2017 22:45:45 +0100 Subject: [i1014] Only add lombok.Generated if it is explicitly turned on --- doc/changelog.markdown | 2 +- src/core/lombok/ConfigurationKeys.java | 14 ++-- src/core/lombok/core/handlers/HandlerUtil.java | 4 +- .../eclipse/handlers/EclipseHandlerUtil.java | 4 +- .../lombok/javac/handlers/JavacHandlerUtil.java | 4 +- .../resource/after-delombok/Accessors.java | 18 +---- .../after-delombok/AccessorsConfiguration.java | 6 +- .../after-delombok/BuilderChainAndFluent.java | 10 +-- .../resource/after-delombok/BuilderComplex.java | 15 +---- .../after-delombok/BuilderInstanceMethod.java | 13 ---- .../resource/after-delombok/BuilderSimple.java | 10 --- .../BuilderSingularGuavaListsSets.java | 28 +------- .../after-delombok/BuilderSingularGuavaMaps.java | 20 +----- .../after-delombok/BuilderSingularLists.java | 18 ----- .../after-delombok/BuilderSingularNoAuto.java | 20 +----- .../BuilderSingularRedirectToGuava.java | 20 +----- .../after-delombok/BuilderSingularSets.java | 24 +------ .../BuilderSingularWithPrefixes.java | 12 +--- .../resource/after-delombok/BuilderValueData.java | 21 ------ .../after-delombok/BuilderWithAccessors.java | 16 +---- .../BuilderWithExistingBuilderClass.java | 10 +-- .../after-delombok/BuilderWithToBuilder.java | 37 ----------- .../after-delombok/BuilderWithTolerate.java | 9 +-- .../after-delombok/ClassNamedAfterGetter.java | 1 - .../after-delombok/CommentsInterspersed.java | 1 - .../ConflictingStaticConstructorNames.java | 7 +- .../resource/after-delombok/Constructors.java | 13 ---- .../after-delombok/ConstructorsConfiguration.java | 2 - .../after-delombok/ConstructorsWithAccessors.java | 1 - .../resource/after-delombok/DataConfiguration.java | 6 -- .../resource/after-delombok/DataExtended.java | 9 +-- .../resource/after-delombok/DataIgnore.java | 8 +-- .../resource/after-delombok/DataOnEnum.java | 5 +- .../resource/after-delombok/DataOnLocalClass.java | 23 +------ .../resource/after-delombok/DataPlain.java | 40 +----------- .../resource/after-delombok/DataWithGetter.java | 12 +--- .../after-delombok/DataWithGetterNone.java | 9 +-- .../resource/after-delombok/DelegateOnGetter.java | 5 +- .../after-delombok/DelegateOnGetterNone.java | 4 +- .../resource/after-delombok/DelegateOnMethods.java | 3 +- .../after-delombok/DelegateTypesAndExcludes.java | 4 +- .../after-delombok/DelegateWithDeprecated.java | 5 +- .../after-delombok/DelegateWithVarargs.java | 4 -- .../resource/after-delombok/EncodingUsAscii.java | 3 +- .../resource/after-delombok/EncodingUtf8.java | 3 +- .../resource/after-delombok/EqualsAndHashCode.java | 13 +--- .../EqualsAndHashCodeConfigKeys1.java | 6 -- .../EqualsAndHashCodeConfigKeys2.java | 6 -- .../EqualsAndHashCodeWithExistingMethods.java | 4 +- .../EqualsAndHashCodeWithOnParam.java | 5 +- .../after-delombok/EqualsAndHashcodeOfExclude.java | 6 +- .../after-delombok/ExtensionMethodPlain.java | 2 +- .../resource/after-delombok/FieldDefaults.java | 2 +- .../resource/after-delombok/FieldDefaultsNoop.java | 2 +- .../after-delombok/FieldDefaultsViaConfig.java | 2 +- ...efaultsViaConfigAndRequiredArgsConstructor.java | 3 +- .../after-delombok/GenerateSuppressFBWarnings.java | 3 +- .../after-delombok/GeneratedGlobalOff.java | 7 -- .../after-delombok/GeneratedGlobalOffJavaxOn.java | 8 --- .../after-delombok/GeneratedGlobalOffLombokOn.java | 8 --- .../resource/after-delombok/GeneratedJavaxOff.java | 3 +- .../after-delombok/GeneratedJavaxOnLombokOn.java | 9 +++ .../after-delombok/GeneratedLombokOff.java | 8 --- .../resource/after-delombok/GeneratedOff.java | 7 ++ .../after-delombok/GeneratedOffJavaxOn.java | 8 +++ .../after-delombok/GeneratedOffLombokOn.java | 8 +++ .../resource/after-delombok/GetterAccessLevel.java | 11 +--- .../after-delombok/GetterAlreadyExists.java | 12 +--- .../resource/after-delombok/GetterBoolean.java | 6 +- .../resource/after-delombok/GetterDeprecated.java | 4 +- .../resource/after-delombok/GetterEnum.java | 5 +- .../resource/after-delombok/GetterLazy.java | 1 - .../resource/after-delombok/GetterLazyBoolean.java | 6 -- .../after-delombok/GetterLazyEahcToString.java | 8 +-- .../resource/after-delombok/GetterLazyInvalid.java | 3 +- .../resource/after-delombok/GetterLazyNative.java | 9 --- .../after-delombok/GetterLazyTransient.java | 2 - .../resource/after-delombok/GetterNone.java | 3 +- .../resource/after-delombok/GetterOnClass.java | 10 +-- .../resource/after-delombok/GetterOnMethod.java | 3 - .../after-delombok/GetterOnMethodErrors.java | 3 +- .../after-delombok/GetterOnMethodErrors2.java | 8 --- .../resource/after-delombok/GetterOnStatic.java | 2 - .../resource/after-delombok/GetterPlain.java | 4 +- .../after-delombok/GetterSetterJavadoc.java | 15 ----- .../resource/after-delombok/GetterWithDollar.java | 5 +- .../resource/after-delombok/InjectField.java | 8 +-- .../resource/after-delombok/LoggerCommons.java | 5 +- .../resource/after-delombok/LoggerConfig.java | 3 +- .../resource/after-delombok/LoggerJBossLog.java | 6 +- .../resource/after-delombok/LoggerJul.java | 5 +- .../resource/after-delombok/LoggerLog4j.java | 5 +- .../resource/after-delombok/LoggerLog4j2.java | 5 +- .../resource/after-delombok/LoggerSlf4j.java | 6 +- .../after-delombok/LoggerSlf4jAlreadyExists.java | 2 +- .../resource/after-delombok/LoggerSlf4jTypes.java | 5 +- .../after-delombok/LoggerSlf4jWithPackage.java | 2 - .../resource/after-delombok/LoggerXSlf4j.java | 5 +- .../resource/after-delombok/MixGetterVal.java | 3 +- .../resource/after-delombok/MultiFieldGetter.java | 6 +- .../after-delombok/NoArgsConstructorForce.java | 3 +- .../after-delombok/NonNullOnParameterAbstract.java | 2 +- .../resource/after-delombok/NonNullPlain.java | 7 -- .../NonNullWithAlternateException.java | 3 +- .../after-delombok/NonNullWithSneakyThrows.java | 2 +- .../resource/after-delombok/SetterAccessLevel.java | 7 +- .../after-delombok/SetterAlreadyExists.java | 4 +- .../resource/after-delombok/SetterDeprecated.java | 4 +- .../resource/after-delombok/SetterOnClass.java | 10 +-- .../after-delombok/SetterOnMethodOnParam.java | 3 - .../resource/after-delombok/SetterOnStatic.java | 2 - .../resource/after-delombok/SetterPlain.java | 4 +- .../resource/after-delombok/SetterWithDollar.java | 5 +- .../after-delombok/SimpleTypeResolution.java | 1 - .../after-delombok/SneakyThrowsMultiple.java | 2 +- .../resource/after-delombok/SneakyThrowsPlain.java | 2 +- .../after-delombok/SneakyThrowsSingle.java | 2 +- .../resource/after-delombok/SynchronizedName.java | 2 +- .../SynchronizedNameNoSuchField.java | 2 +- .../SynchronizedNameStaticToInstanceRef.java | 2 +- .../resource/after-delombok/SynchronizedPlain.java | 4 +- .../after-delombok/ToStringConfiguration.java | 7 +- .../resource/after-delombok/ToStringInner.java | 6 +- .../resource/after-delombok/ToStringPlain.java | 4 +- .../resource/after-delombok/Tolerate.java | 5 -- .../after-delombok/TrickyTypeResolution.java | 1 - .../resource/after-delombok/UtilityClass.java | 6 +- .../after-delombok/UtilityClassErrors.java | 2 +- .../resource/after-delombok/ValComplex.java | 2 +- .../resource/after-delombok/ValDefault.java | 2 +- .../resource/after-delombok/ValErrors.java | 2 +- .../resource/after-delombok/ValFinal.java | 2 +- .../resource/after-delombok/ValInBasicFor.java | 2 +- .../resource/after-delombok/ValInFor.java | 2 +- .../after-delombok/ValInMultiDeclaration.java | 2 +- .../resource/after-delombok/ValLambda.java | 2 +- .../resource/after-delombok/ValLessSimple.java | 2 +- test/transform/resource/after-delombok/ValLub.java | 2 +- .../resource/after-delombok/ValNullInit.java | 2 +- .../resource/after-delombok/ValRawType.java | 2 +- .../resource/after-delombok/ValWeirdTypes.java | 2 +- .../resource/after-delombok/ValWithLabel.java | 2 +- .../resource/after-delombok/ValueCallSuper.java | 5 -- .../resource/after-delombok/ValueExperimental.java | 10 +-- .../ValueExperimentalStarImport.java | 6 +- .../resource/after-delombok/ValuePlain.java | 19 ------ .../resource/after-delombok/ValueStaticField.java | 6 +- .../resource/after-delombok/VarComplex.java | 2 +- .../resource/after-delombok/VarInFor.java | 2 +- .../resource/after-delombok/VarInForOld.java | 2 +- .../resource/after-delombok/VarModifier.java | 2 +- .../resource/after-delombok/VarNullInit.java | 2 +- .../after-delombok/WithInnerAnnotation.java | 2 +- .../resource/after-delombok/WitherAccessLevel.java | 7 +- .../after-delombok/WitherAlreadyExists.java | 4 +- .../WitherAndAllArgsConstructor.java | 5 +- .../resource/after-delombok/WitherDeprecated.java | 4 +- .../resource/after-delombok/WitherOnClass.java | 6 -- .../resource/after-delombok/WitherPlain.java | 2 - .../after-delombok/WitherWithAbstract.java | 3 +- .../after-delombok/WitherWithGenerics.java | 3 - test/transform/resource/after-ecj/Accessors.java | 32 ++++----- .../resource/after-ecj/AccessorsConfiguration.java | 8 +-- .../resource/after-ecj/BuilderChainAndFluent.java | 16 ++--- .../resource/after-ecj/BuilderComplex.java | 26 ++++---- .../resource/after-ecj/BuilderInstanceMethod.java | 26 ++++---- .../resource/after-ecj/BuilderSimple.java | 20 +++--- .../after-ecj/BuilderSingularGuavaListsSets.java | 52 +++++++-------- .../after-ecj/BuilderSingularGuavaMaps.java | 36 +++++----- .../resource/after-ecj/BuilderSingularLists.java | 36 +++++----- .../resource/after-ecj/BuilderSingularMaps.java | 52 +++++++-------- .../resource/after-ecj/BuilderSingularNoAuto.java | 36 +++++----- .../after-ecj/BuilderSingularRedirectToGuava.java | 36 +++++----- .../resource/after-ecj/BuilderSingularSets.java | 44 ++++++------- .../after-ecj/BuilderSingularWithPrefixes.java | 20 +++--- .../resource/after-ecj/BuilderValueData.java | 42 ++++++------ .../resource/after-ecj/BuilderWithAccessors.java | 28 ++++---- .../after-ecj/BuilderWithExistingBuilderClass.java | 16 ++--- .../resource/after-ecj/BuilderWithToBuilder.java | 74 ++++++++++----------- .../resource/after-ecj/BuilderWithTolerate.java | 14 ++-- .../resource/after-ecj/ClassNamedAfterGetter.java | 2 +- .../resource/after-ecj/CommentsInterspersed.java | 2 +- .../ConflictingStaticConstructorNames.java | 10 +-- .../transform/resource/after-ecj/Constructors.java | 26 ++++---- .../after-ecj/ConstructorsConfiguration.java | 4 +- .../after-ecj/ConstructorsWithAccessors.java | 2 +- .../resource/after-ecj/DataConfiguration.java | 12 ++-- .../transform/resource/after-ecj/DataExtended.java | 14 ++-- test/transform/resource/after-ecj/DataIgnore.java | 12 ++-- test/transform/resource/after-ecj/DataOnEnum.java | 6 +- .../resource/after-ecj/DataOnLocalClass.java | 42 ++++++------ test/transform/resource/after-ecj/DataPlain.java | 76 +++++++++++----------- .../resource/after-ecj/DataWithGetter.java | 20 +++--- .../resource/after-ecj/DataWithGetterNone.java | 14 ++-- .../resource/after-ecj/DelegateOnGetter.java | 6 +- .../resource/after-ecj/DelegateOnGetterNone.java | 4 +- .../resource/after-ecj/DelegateOnMethods.java | 2 +- .../after-ecj/DelegateTypesAndExcludes.java | 4 +- .../resource/after-ecj/DelegateWithDeprecated.java | 6 +- .../resource/after-ecj/DelegateWithVarargs.java | 8 +-- .../resource/after-ecj/EqualsAndHashCode.java | 22 +++---- .../after-ecj/EqualsAndHashCodeConfigKeys1.java | 12 ++-- .../after-ecj/EqualsAndHashCodeConfigKeys2.java | 12 ++-- .../EqualsAndHashCodeWithExistingMethods.java | 4 +- .../after-ecj/EqualsAndHashCodeWithOnParam.java | 6 +- .../after-ecj/EqualsAndHashcodeOfExclude.java | 8 +-- ...efaultsViaConfigAndRequiredArgsConstructor.java | 2 +- .../after-ecj/GenerateSuppressFBWarnings.java | 2 +- .../resource/after-ecj/GeneratedGlobalOff.java | 9 --- .../after-ecj/GeneratedGlobalOffJavaxOn.java | 9 --- .../after-ecj/GeneratedGlobalOffLombokOn.java | 9 --- .../resource/after-ecj/GeneratedJavaxOff.java | 2 +- .../after-ecj/GeneratedJavaxOnLombokOn.java | 9 +++ .../resource/after-ecj/GeneratedLombokOff.java | 9 --- .../transform/resource/after-ecj/GeneratedOff.java | 9 +++ .../resource/after-ecj/GeneratedOffJavaxOn.java | 9 +++ .../resource/after-ecj/GeneratedOffLombokOn.java | 9 +++ .../resource/after-ecj/GetterAccessLevel.java | 18 ++--- .../resource/after-ecj/GetterAlreadyExists.java | 20 +++--- .../resource/after-ecj/GetterBoolean.java | 8 +-- .../resource/after-ecj/GetterDeprecated.java | 4 +- test/transform/resource/after-ecj/GetterEnum.java | 6 +- test/transform/resource/after-ecj/GetterLazy.java | 2 +- .../resource/after-ecj/GetterLazyBoolean.java | 12 ++-- .../resource/after-ecj/GetterLazyEahcToString.java | 12 ++-- .../resource/after-ecj/GetterLazyInvalid.java | 2 +- .../resource/after-ecj/GetterLazyNative.java | 18 ++--- .../resource/after-ecj/GetterLazyTransient.java | 4 +- test/transform/resource/after-ecj/GetterNone.java | 2 +- .../resource/after-ecj/GetterOnClass.java | 16 ++--- .../resource/after-ecj/GetterOnMethod.java | 6 +- .../resource/after-ecj/GetterOnMethodErrors.java | 2 +- .../resource/after-ecj/GetterOnMethodErrors2.java | 16 ++--- .../resource/after-ecj/GetterOnStatic.java | 4 +- test/transform/resource/after-ecj/GetterPlain.java | 4 +- .../resource/after-ecj/GetterSetterJavadoc.java | 30 ++++----- .../resource/after-ecj/GetterWithDollar.java | 6 +- .../transform/resource/after-ecj/MixGetterVal.java | 2 +- .../resource/after-ecj/MultiFieldGetter.java | 8 +-- .../resource/after-ecj/NoArgsConstructorForce.java | 2 +- .../transform/resource/after-ecj/NonNullPlain.java | 14 ++-- .../after-ecj/NonNullWithAlternateException.java | 2 +- .../resource/after-ecj/SetterAccessLevel.java | 10 +-- .../resource/after-ecj/SetterAlreadyExists.java | 4 +- .../resource/after-ecj/SetterDeprecated.java | 4 +- .../resource/after-ecj/SetterOnClass.java | 16 ++--- .../resource/after-ecj/SetterOnMethod.java | 12 ++-- .../resource/after-ecj/SetterOnMethodOnParam.java | 6 +- .../resource/after-ecj/SetterOnParam.java | 12 ++-- .../after-ecj/SetterOnParamAndOnMethod.java | 2 +- .../resource/after-ecj/SetterOnStatic.java | 4 +- test/transform/resource/after-ecj/SetterPlain.java | 4 +- .../resource/after-ecj/SetterWithDollar.java | 6 +- .../resource/after-ecj/SimpleTypeResolution.java | 2 +- .../resource/after-ecj/ToStringConfiguration.java | 10 +-- .../resource/after-ecj/ToStringInner.java | 8 +-- .../resource/after-ecj/ToStringPlain.java | 4 +- test/transform/resource/after-ecj/Tolerate.java | 10 +-- .../resource/after-ecj/TrickyTypeResolution.java | 2 +- .../transform/resource/after-ecj/UtilityClass.java | 8 +-- .../resource/after-ecj/ValueCallSuper.java | 10 +-- .../resource/after-ecj/ValueExperimental.java | 16 ++--- .../after-ecj/ValueExperimentalStarImport.java | 8 +-- test/transform/resource/after-ecj/ValuePlain.java | 38 +++++------ .../resource/after-ecj/ValueStaticField.java | 8 +-- .../resource/after-ecj/WitherAccessLevel.java | 10 +-- .../resource/after-ecj/WitherAlreadyExists.java | 4 +- .../after-ecj/WitherAndAllArgsConstructor.java | 6 +- .../resource/after-ecj/WitherDeprecated.java | 4 +- .../resource/after-ecj/WitherOnClass.java | 12 ++-- test/transform/resource/after-ecj/WitherPlain.java | 4 +- .../resource/after-ecj/WitherWithAbstract.java | 2 +- .../resource/after-ecj/WitherWithGenerics.java | 6 +- .../resource/before/GeneratedGlobalOff.java | 5 -- .../resource/before/GeneratedGlobalOffJavaxOn.java | 6 -- .../before/GeneratedGlobalOffLombokOn.java | 6 -- .../resource/before/GeneratedJavaxOnLombokOn.java | 6 ++ .../resource/before/GeneratedLombokOff.java | 5 -- test/transform/resource/before/GeneratedOff.java | 5 ++ .../resource/before/GeneratedOffJavaxOn.java | 6 ++ .../resource/before/GeneratedOffLombokOn.java | 6 ++ .../messages-idempotent/NonNullPlain.java.messages | 4 +- 282 files changed, 934 insertions(+), 1648 deletions(-) delete mode 100644 test/transform/resource/after-delombok/GeneratedGlobalOff.java delete mode 100644 test/transform/resource/after-delombok/GeneratedGlobalOffJavaxOn.java delete mode 100644 test/transform/resource/after-delombok/GeneratedGlobalOffLombokOn.java create mode 100644 test/transform/resource/after-delombok/GeneratedJavaxOnLombokOn.java delete mode 100644 test/transform/resource/after-delombok/GeneratedLombokOff.java create mode 100644 test/transform/resource/after-delombok/GeneratedOff.java create mode 100644 test/transform/resource/after-delombok/GeneratedOffJavaxOn.java create mode 100644 test/transform/resource/after-delombok/GeneratedOffLombokOn.java delete mode 100644 test/transform/resource/after-ecj/GeneratedGlobalOff.java delete mode 100644 test/transform/resource/after-ecj/GeneratedGlobalOffJavaxOn.java delete mode 100644 test/transform/resource/after-ecj/GeneratedGlobalOffLombokOn.java create mode 100644 test/transform/resource/after-ecj/GeneratedJavaxOnLombokOn.java delete mode 100644 test/transform/resource/after-ecj/GeneratedLombokOff.java create mode 100644 test/transform/resource/after-ecj/GeneratedOff.java create mode 100644 test/transform/resource/after-ecj/GeneratedOffJavaxOn.java create mode 100644 test/transform/resource/after-ecj/GeneratedOffLombokOn.java delete mode 100644 test/transform/resource/before/GeneratedGlobalOff.java delete mode 100644 test/transform/resource/before/GeneratedGlobalOffJavaxOn.java delete mode 100644 test/transform/resource/before/GeneratedGlobalOffLombokOn.java create mode 100644 test/transform/resource/before/GeneratedJavaxOnLombokOn.java delete mode 100644 test/transform/resource/before/GeneratedLombokOff.java create mode 100644 test/transform/resource/before/GeneratedOff.java create mode 100644 test/transform/resource/before/GeneratedOffJavaxOn.java create mode 100644 test/transform/resource/before/GeneratedOffLombokOn.java (limited to 'src') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index cc038fa9..bad185fa 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -3,7 +3,7 @@ Lombok Changelog ### v1.16.13 "Edgy Guinea Pig" * v1.16.12 is the latest stable release of Project Lombok. -* FEATURE: Generated classes, methods and fields are now also annotated with `@lombok.Generated` [Issue #1014](https://github.com/rzwitserloot/lombok/issues/1014) +* FEATURE: Generated classes, methods and fields can now also annotated with `@lombok.Generated` [Issue #1014](https://github.com/rzwitserloot/lombok/issues/1014)
    * PLATFORM: Lombok can now be used together with other annotation processors that are looking for lombok-generated methods, but only if lombok is the first annotation processor executed. The most commonly used annotation processor affected by this change is [MapStruct](http://mapstruct.org/); we've worked with the mapstruct team specifically to allow any order. Other annotation processors might follow the framework we've built to make this possible; point the authors of any such processor to us and we'll get it sorted [MapStruct issue #510](https://github.com/mapstruct/mapstruct/issues/510) [Lombok issue #973](https://github.com/rzwitserloot/lombok/issues/973) * PLATFORM: Eclipse: Refactor script 'rename field' when lombok has also generated getters and/or setters for this field is nicer now [Issue #210](https://github.com/rzwitserloot/lombok/issues/210) diff --git a/src/core/lombok/ConfigurationKeys.java b/src/core/lombok/ConfigurationKeys.java index ff17ca09..f0e070e2 100644 --- a/src/core/lombok/ConfigurationKeys.java +++ b/src/core/lombok/ConfigurationKeys.java @@ -41,30 +41,28 @@ public class ConfigurationKeys { /** * lombok configuration: {@code lombok.addGeneratedAnnotation} = {@code true} | {@code false}. * - * If unset or {@code true}, lombok generates various annotations to mark generated code like {@code @javax.annotation.Generated("lombok")} and {@code @lombok.Generated}. + * If unset or {@code true}, lombok generates {@code @javax.annotation.Generated("lombok")} on all fields, methods, and types that are generated, unless {@code lombok.addJavaxGeneratedAnnotation} is set. * * @see ConfigurationKeys#ADD_JAVAX_GENERATED_ANNOTATIONS * @see ConfigurationKeys#ADD_LOMBOK_GENERATED_ANNOTATIONS + * @deprecated Since version 1.16.14, use {@link #ADD_JAVAX_GENERATED_ANNOTATIONS} instead. */ - public static final ConfigurationKey ADD_GENERATED_ANNOTATIONS = new ConfigurationKey("lombok.addGeneratedAnnotation", "Generate @javax.annotation.Generated on all generated code (default: true).") {}; + @Deprecated + public static final ConfigurationKey ADD_GENERATED_ANNOTATIONS = new ConfigurationKey("lombok.addGeneratedAnnotation", "Generate @javax.annotation.Generated on all generated code (default: true). Deprecated, use 'lombok.addJavaxGeneratedAnnotation' instead.") {}; /** * lombok configuration: {@code lombok.addJavaxGeneratedAnnotation} = {@code true} | {@code false}. * * If unset or {@code true}, lombok generates {@code @javax.annotation.Generated("lombok")} on all fields, methods, and types that are generated, unless {@code lombok.addGeneratedAnnotation} is set to {@code false}. - * - * @see ConfigurationKeys#ADD_GENERATED_ANNOTATIONS */ public static final ConfigurationKey ADD_JAVAX_GENERATED_ANNOTATIONS = new ConfigurationKey("lombok.addJavaxGeneratedAnnotation", "Generate @javax.annotation.Generated on all generated code (default: follow lombok.addGeneratedAnnotation).") {}; /** * lombok configuration: {@code lombok.addLombokGeneratedAnnotation} = {@code true} | {@code false}. * - * If unset or {@code true}, lombok generates {@code @lombok.Generated} on all fields, methods, and types that are generated, unless {@code lombok.addGeneratedAnnotation} is set to {@code false}. - * - * @see ConfigurationKeys#ADD_GENERATED_ANNOTATIONS + * If {@code true}, lombok generates {@code @lombok.Generated} on all fields, methods, and types that are generated. */ - public static final ConfigurationKey ADD_LOMBOK_GENERATED_ANNOTATIONS = new ConfigurationKey("lombok.addLombokGeneratedAnnotation", "Generate @lombok.Generated on all generated code (default: follow lombok.addGeneratedAnnotation).") {}; + public static final ConfigurationKey ADD_LOMBOK_GENERATED_ANNOTATIONS = new ConfigurationKey("lombok.addLombokGeneratedAnnotation", "Generate @lombok.Generated on all generated code (default: false).") {}; /** * lombok configuration: {@code lombok.extern.findbugs.addSuppressFBWarnings} = {@code true} | {@code false}. diff --git a/src/core/lombok/core/handlers/HandlerUtil.java b/src/core/lombok/core/handlers/HandlerUtil.java index a05578d4..7e6d6d66 100644 --- a/src/core/lombok/core/handlers/HandlerUtil.java +++ b/src/core/lombok/core/handlers/HandlerUtil.java @@ -109,8 +109,8 @@ public class HandlerUtil { } } - public static boolean shouldAddGenerated(LombokNode node, ConfigurationKey key) { - Boolean add = node.getAst().readConfiguration(key); + public static boolean shouldAddGenerated(LombokNode node) { + Boolean add = node.getAst().readConfiguration(ConfigurationKeys.ADD_JAVAX_GENERATED_ANNOTATIONS); if (add != null) return add; return !Boolean.FALSE.equals(node.getAst().readConfiguration(ConfigurationKeys.ADD_GENERATED_ANNOTATIONS)); } diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java index f822e095..ab4ca27b 100644 --- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java +++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java @@ -1345,10 +1345,10 @@ public class EclipseHandlerUtil { public static Annotation[] addGenerated(EclipseNode node, ASTNode source, Annotation[] originalAnnotationArray) { Annotation[] result = originalAnnotationArray; - if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_JAVAX_GENERATED_ANNOTATIONS)) { + if (HandlerUtil.shouldAddGenerated(node)) { result = addAnnotation(source, result, JAVAX_ANNOTATION_GENERATED, new StringLiteral(LOMBOK, 0, 0, 0)); } - if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS)) { + if (Boolean.TRUE.equals(node.getAst().readConfiguration(ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS))) { result = addAnnotation(source, result, LOMBOK_GENERATED, null); } return result; diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index 0b4e839d..af8289a3 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -1025,10 +1025,10 @@ public class JavacHandlerUtil { public static void addGenerated(JCModifiers mods, JavacNode node, int pos, JCTree source, Context context) { if (!LombokOptionsFactory.getDelombokOptions(context).getFormatPreferences().generateGenerated()) return; - if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_JAVAX_GENERATED_ANNOTATIONS)) { + if (HandlerUtil.shouldAddGenerated(node)) { addAnnotation(mods, node, pos, source, context, "javax.annotation.Generated", node.getTreeMaker().Literal("lombok")); } - if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS)) { + if (Boolean.TRUE.equals(node.getAst().readConfiguration(ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS))) { addAnnotation(mods, node, pos, source, context, "lombok.Generated", null); } } diff --git a/test/transform/resource/after-delombok/Accessors.java b/test/transform/resource/after-delombok/Accessors.java index 8dee33ad..426b3863 100644 --- a/test/transform/resource/after-delombok/Accessors.java +++ b/test/transform/resource/after-delombok/Accessors.java @@ -2,13 +2,11 @@ class AccessorsFluent { private String fieldName = ""; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String fieldName() { return this.fieldName; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public AccessorsFluent fieldName(final String fieldName) { this.fieldName = fieldName; return this; @@ -19,19 +17,16 @@ class AccessorsFluentOnClass { private String otherFieldWithOverride = ""; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String fieldName() { return this.fieldName; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getOtherFieldWithOverride() { return this.otherFieldWithOverride; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public AccessorsFluentOnClass fieldName(final String fieldName) { this.fieldName = fieldName; return this; @@ -41,7 +36,6 @@ class AccessorsChain { private boolean isRunning; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public AccessorsChain setRunning(final boolean isRunning) { this.isRunning = isRunning; return this; @@ -52,7 +46,6 @@ class AccessorsPrefix { private String fActualField; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setActualField(final String fActualField) { this.fActualField = fActualField; } @@ -62,13 +55,11 @@ class AccessorsPrefix2 { private String fActualField; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setFieldName(final String fieldName) { this.fieldName = fieldName; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setActualField(final String fActualField) { this.fActualField = fActualField; } @@ -81,14 +72,12 @@ class AccessorsPrefix3 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "AccessorsPrefix3(fName=" + this.getName() + ")"; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof AccessorsPrefix3)) return false; @@ -101,14 +90,12 @@ class AccessorsPrefix3 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof AccessorsPrefix3; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -121,7 +108,6 @@ class AccessorsFluentGenerics { private String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public AccessorsFluentGenerics name(final String name) { this.name = name; return this; @@ -131,7 +117,6 @@ class AccessorsFluentNoChaining { private String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void name(final String name) { this.name = name; } @@ -140,8 +125,7 @@ class AccessorsFluentStatic { private static String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static void name(final String name) { AccessorsFluentStatic.name = name; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/AccessorsConfiguration.java b/test/transform/resource/after-delombok/AccessorsConfiguration.java index f98b7939..0094c55c 100644 --- a/test/transform/resource/after-delombok/AccessorsConfiguration.java +++ b/test/transform/resource/after-delombok/AccessorsConfiguration.java @@ -2,13 +2,11 @@ class AccessorsConfiguration { private String m_FieldName = ""; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String fieldName() { return this.m_FieldName; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void fieldName(final String m_FieldName) { this.m_FieldName = m_FieldName; } @@ -17,7 +15,6 @@ class AccessorsConfiguration2 { private String m_FieldName = ""; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setM_FieldName(final String m_FieldName) { this.m_FieldName = m_FieldName; } @@ -26,9 +23,8 @@ class AccessorsConfiguration3 { private String fFieldName = ""; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public AccessorsConfiguration3 setFieldName(final String fFieldName) { this.fFieldName = fFieldName; return this; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderChainAndFluent.java b/test/transform/resource/after-delombok/BuilderChainAndFluent.java index 7a1f487e..2475a998 100644 --- a/test/transform/resource/after-delombok/BuilderChainAndFluent.java +++ b/test/transform/resource/after-delombok/BuilderChainAndFluent.java @@ -2,47 +2,39 @@ class BuilderChainAndFluent { private final int yes; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderChainAndFluent(final int yes) { this.yes = yes; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderChainAndFluentBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int yes; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderChainAndFluentBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setYes(final int yes) { this.yes = yes; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderChainAndFluent build() { return new BuilderChainAndFluent(yes); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderChainAndFluent.BuilderChainAndFluentBuilder(yes=" + this.yes + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderChainAndFluentBuilder builder() { return new BuilderChainAndFluentBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderComplex.java b/test/transform/resource/after-delombok/BuilderComplex.java index 15d4e25c..937628f9 100644 --- a/test/transform/resource/after-delombok/BuilderComplex.java +++ b/test/transform/resource/after-delombok/BuilderComplex.java @@ -4,75 +4,62 @@ class BuilderComplex { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class VoidBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private T number; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int arg2; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private String arg3; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private BuilderComplex selfRef; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated VoidBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public VoidBuilder number(final T number) { this.number = number; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public VoidBuilder arg2(final int arg2) { this.arg2 = arg2; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public VoidBuilder arg3(final String arg3) { this.arg3 = arg3; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public VoidBuilder selfRef(final BuilderComplex selfRef) { this.selfRef = selfRef; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void execute() { BuilderComplex.testVoidWithGenerics(number, arg2, arg3, selfRef); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderComplex.VoidBuilder(number=" + this.number + ", arg2=" + this.arg2 + ", arg3=" + this.arg3 + ", selfRef=" + this.selfRef + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static VoidBuilder builder() { return new VoidBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderInstanceMethod.java b/test/transform/resource/after-delombok/BuilderInstanceMethod.java index 668977ab..61e237d0 100644 --- a/test/transform/resource/after-delombok/BuilderInstanceMethod.java +++ b/test/transform/resource/after-delombok/BuilderInstanceMethod.java @@ -5,74 +5,61 @@ class BuilderInstanceMethod { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public class StringBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int show; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int yes; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private List also; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int $andMe; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated StringBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public StringBuilder show(final int show) { this.show = show; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public StringBuilder yes(final int yes) { this.yes = yes; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public StringBuilder also(final List also) { this.also = also; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public StringBuilder $andMe(final int $andMe) { this.$andMe = $andMe; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String build() { return BuilderInstanceMethod.this.create(show, yes, also, $andMe); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderInstanceMethod.StringBuilder(show=" + this.show + ", yes=" + this.yes + ", also=" + this.also + ", $andMe=" + this.$andMe + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public StringBuilder builder() { return new StringBuilder(); } diff --git a/test/transform/resource/after-delombok/BuilderSimple.java b/test/transform/resource/after-delombok/BuilderSimple.java index ecf74aa3..a12ad047 100644 --- a/test/transform/resource/after-delombok/BuilderSimple.java +++ b/test/transform/resource/after-delombok/BuilderSimple.java @@ -6,59 +6,49 @@ class BuilderSimple { private int $butNotMe; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSimple(final int yes, final List also) { this.yes = yes; this.also = also; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderSimpleBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int yes; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private List also; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSimpleBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSimpleBuilder yes(final int yes) { this.yes = yes; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSimpleBuilder also(final List also) { this.also = also; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSimple build() { return new BuilderSimple(yes, also); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderSimple.BuilderSimpleBuilder(yes=" + this.yes + ", also=" + this.also + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderSimpleBuilder builder() { return new BuilderSimpleBuilder(); } diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java index 851fc3db..08becf6b 100644 --- a/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java +++ b/test/transform/resource/after-delombok/BuilderSingularGuavaListsSets.java @@ -12,7 +12,6 @@ class BuilderSingularGuavaListsSets { private ImmutableTable users; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularGuavaListsSets(final ImmutableList cards, final ImmutableCollection frogs, final ImmutableSet rawSet, final ImmutableSortedSet passes, final ImmutableTable users) { this.cards = cards; this.frogs = frogs; @@ -22,36 +21,28 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderSingularGuavaListsSetsBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableList.Builder cards; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableList.Builder frogs; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableSet.Builder rawSet; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableSortedSet.Builder passes; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableTable.Builder users; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularGuavaListsSetsBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder card(final T card) { if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); this.cards.add(card); @@ -59,7 +50,6 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder cards(final java.lang.Iterable cards) { if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder(); this.cards.addAll(cards); @@ -67,14 +57,12 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder clearCards() { this.cards = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder frog(final Number frog) { if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); this.frogs.add(frog); @@ -82,7 +70,6 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder frogs(final java.lang.Iterable frogs) { if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder(); this.frogs.addAll(frogs); @@ -90,14 +77,12 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder clearFrogs() { this.frogs = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Object rawSet) { if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); this.rawSet.add(rawSet); @@ -105,7 +90,6 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder rawSet(final java.lang.Iterable rawSet) { if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder(); this.rawSet.addAll(rawSet); @@ -113,14 +97,12 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder clearRawSet() { this.rawSet = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder pass(final String pass) { if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); this.passes.add(pass); @@ -128,7 +110,6 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder passes(final java.lang.Iterable passes) { if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); this.passes.addAll(passes); @@ -136,14 +117,12 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder clearPasses() { this.passes = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder user(final Number rowKey, final Number columnKey, final String value) { if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder(); this.users.put(rowKey, columnKey, value); @@ -151,7 +130,6 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder users(final com.google.common.collect.Table users) { if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder(); this.users.putAll(users); @@ -159,14 +137,12 @@ class BuilderSingularGuavaListsSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSetsBuilder clearUsers() { this.users = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaListsSets build() { com.google.common.collect.ImmutableList cards = this.cards == null ? com.google.common.collect.ImmutableList.of() : this.cards.build(); com.google.common.collect.ImmutableCollection frogs = this.frogs == null ? com.google.common.collect.ImmutableList.of() : this.frogs.build(); @@ -178,15 +154,13 @@ class BuilderSingularGuavaListsSets { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder(cards=" + this.cards + ", frogs=" + this.frogs + ", rawSet=" + this.rawSet + ", passes=" + this.passes + ", users=" + this.users + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderSingularGuavaListsSetsBuilder builder() { return new BuilderSingularGuavaListsSetsBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java b/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java index 22a4a750..d6c38790 100644 --- a/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java +++ b/test/transform/resource/after-delombok/BuilderSingularGuavaMaps.java @@ -8,7 +8,6 @@ class BuilderSingularGuavaMaps { private ImmutableBiMap rawMap; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularGuavaMaps(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { this.battleaxes = battleaxes; this.vertices = vertices; @@ -16,28 +15,22 @@ class BuilderSingularGuavaMaps { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderSingularGuavaMapsBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableMap.Builder battleaxes; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableSortedMap.Builder vertices; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableBiMap.Builder rawMap; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularGuavaMapsBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMapsBuilder battleaxe(final K key, final V value) { if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.put(key, value); @@ -45,7 +38,6 @@ class BuilderSingularGuavaMaps { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMapsBuilder battleaxes(final java.util.Map battleaxes) { if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.putAll(battleaxes); @@ -53,14 +45,12 @@ class BuilderSingularGuavaMaps { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMapsBuilder clearBattleaxes() { this.battleaxes = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMapsBuilder vertex(final Integer key, final V value) { if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.put(key, value); @@ -68,7 +58,6 @@ class BuilderSingularGuavaMaps { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMapsBuilder vertices(final java.util.Map vertices) { if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.putAll(vertices); @@ -76,14 +65,12 @@ class BuilderSingularGuavaMaps { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMapsBuilder clearVertices() { this.vertices = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMapsBuilder rawMap(final java.lang.Object key, final java.lang.Object value) { if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.put(key, value); @@ -91,7 +78,6 @@ class BuilderSingularGuavaMaps { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMapsBuilder rawMap(final java.util.Map rawMap) { if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.putAll(rawMap); @@ -99,14 +85,12 @@ class BuilderSingularGuavaMaps { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMapsBuilder clearRawMap() { this.rawMap = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularGuavaMaps build() { com.google.common.collect.ImmutableMap battleaxes = this.battleaxes == null ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build(); com.google.common.collect.ImmutableSortedMap vertices = this.vertices == null ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build(); @@ -116,15 +100,13 @@ class BuilderSingularGuavaMaps { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder(battleaxes=" + this.battleaxes + ", vertices=" + this.vertices + ", rawMap=" + this.rawMap + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderSingularGuavaMapsBuilder builder() { return new BuilderSingularGuavaMapsBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderSingularLists.java b/test/transform/resource/after-delombok/BuilderSingularLists.java index 03b6ced7..9b409404 100644 --- a/test/transform/resource/after-delombok/BuilderSingularLists.java +++ b/test/transform/resource/after-delombok/BuilderSingularLists.java @@ -7,7 +7,6 @@ class BuilderSingularLists { private List rawList; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularLists(final List children, final Collection scarves, final List rawList) { this.children = children; this.scarves = scarves; @@ -15,28 +14,22 @@ class BuilderSingularLists { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderSingularListsBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList children; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList scarves; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList rawList; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularListsBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularListsBuilder child(final T child) { if (this.children == null) this.children = new java.util.ArrayList(); this.children.add(child); @@ -44,7 +37,6 @@ class BuilderSingularLists { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularListsBuilder children(final java.util.Collection children) { if (this.children == null) this.children = new java.util.ArrayList(); this.children.addAll(children); @@ -52,14 +44,12 @@ class BuilderSingularLists { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularListsBuilder clearChildren() { if (this.children != null) this.children.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularListsBuilder scarf(final Number scarf) { if (this.scarves == null) this.scarves = new java.util.ArrayList(); this.scarves.add(scarf); @@ -67,7 +57,6 @@ class BuilderSingularLists { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularListsBuilder scarves(final java.util.Collection scarves) { if (this.scarves == null) this.scarves = new java.util.ArrayList(); this.scarves.addAll(scarves); @@ -75,14 +64,12 @@ class BuilderSingularLists { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularListsBuilder clearScarves() { if (this.scarves != null) this.scarves.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularListsBuilder rawList(final java.lang.Object rawList) { if (this.rawList == null) this.rawList = new java.util.ArrayList(); this.rawList.add(rawList); @@ -90,7 +77,6 @@ class BuilderSingularLists { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularListsBuilder rawList(final java.util.Collection rawList) { if (this.rawList == null) this.rawList = new java.util.ArrayList(); this.rawList.addAll(rawList); @@ -98,14 +84,12 @@ class BuilderSingularLists { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularListsBuilder clearRawList() { if (this.rawList != null) this.rawList.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularLists build() { java.util.List children; switch (this.children == null ? 0 : this.children.size()) { @@ -145,14 +129,12 @@ class BuilderSingularLists { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderSingularLists.BuilderSingularListsBuilder(children=" + this.children + ", scarves=" + this.scarves + ", rawList=" + this.rawList + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderSingularListsBuilder builder() { return new BuilderSingularListsBuilder(); } diff --git a/test/transform/resource/after-delombok/BuilderSingularNoAuto.java b/test/transform/resource/after-delombok/BuilderSingularNoAuto.java index 7e9e1680..71ec0c7a 100644 --- a/test/transform/resource/after-delombok/BuilderSingularNoAuto.java +++ b/test/transform/resource/after-delombok/BuilderSingularNoAuto.java @@ -5,7 +5,6 @@ class BuilderSingularNoAuto { private List items; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularNoAuto(final List things, final List widgets, final List items) { this.things = things; this.widgets = widgets; @@ -13,28 +12,22 @@ class BuilderSingularNoAuto { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderSingularNoAutoBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList things; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList widgets; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList items; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularNoAutoBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAutoBuilder things(final String things) { if (this.things == null) this.things = new java.util.ArrayList(); this.things.add(things); @@ -42,7 +35,6 @@ class BuilderSingularNoAuto { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAutoBuilder things(final java.util.Collection things) { if (this.things == null) this.things = new java.util.ArrayList(); this.things.addAll(things); @@ -50,14 +42,12 @@ class BuilderSingularNoAuto { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAutoBuilder clearThings() { if (this.things != null) this.things.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAutoBuilder widget(final String widget) { if (this.widgets == null) this.widgets = new java.util.ArrayList(); this.widgets.add(widget); @@ -65,7 +55,6 @@ class BuilderSingularNoAuto { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAutoBuilder widgets(final java.util.Collection widgets) { if (this.widgets == null) this.widgets = new java.util.ArrayList(); this.widgets.addAll(widgets); @@ -73,14 +62,12 @@ class BuilderSingularNoAuto { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAutoBuilder clearWidgets() { if (this.widgets != null) this.widgets.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAutoBuilder items(final String items) { if (this.items == null) this.items = new java.util.ArrayList(); this.items.add(items); @@ -88,7 +75,6 @@ class BuilderSingularNoAuto { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAutoBuilder items(final java.util.Collection items) { if (this.items == null) this.items = new java.util.ArrayList(); this.items.addAll(items); @@ -96,14 +82,12 @@ class BuilderSingularNoAuto { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAutoBuilder clearItems() { if (this.items != null) this.items.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularNoAuto build() { java.util.List things; switch (this.things == null ? 0 : this.things.size()) { @@ -143,15 +127,13 @@ class BuilderSingularNoAuto { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderSingularNoAuto.BuilderSingularNoAutoBuilder(things=" + this.things + ", widgets=" + this.widgets + ", items=" + this.items + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderSingularNoAutoBuilder builder() { return new BuilderSingularNoAutoBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java b/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java index e9228db6..ff194b47 100644 --- a/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java +++ b/test/transform/resource/after-delombok/BuilderSingularRedirectToGuava.java @@ -7,7 +7,6 @@ class BuilderSingularRedirectToGuava { private Collection> doohickeys; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularRedirectToGuava(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { this.dangerMice = dangerMice; this.things = things; @@ -15,28 +14,22 @@ class BuilderSingularRedirectToGuava { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderSingularRedirectToGuavaBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableSet.Builder dangerMice; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableSortedMap.Builder things; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private com.google.common.collect.ImmutableList.Builder> doohickeys; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularRedirectToGuavaBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuavaBuilder dangerMouse(final String dangerMouse) { if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.add(dangerMouse); @@ -44,7 +37,6 @@ class BuilderSingularRedirectToGuava { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable dangerMice) { if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.addAll(dangerMice); @@ -52,14 +44,12 @@ class BuilderSingularRedirectToGuava { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuavaBuilder clearDangerMice() { this.dangerMice = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuavaBuilder thing(final Integer key, final Number value) { if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.put(key, value); @@ -67,7 +57,6 @@ class BuilderSingularRedirectToGuava { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuavaBuilder things(final java.util.Map things) { if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.putAll(things); @@ -75,14 +64,12 @@ class BuilderSingularRedirectToGuava { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuavaBuilder clearThings() { this.things = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuavaBuilder doohickey(final Class doohickey) { if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.add(doohickey); @@ -90,7 +77,6 @@ class BuilderSingularRedirectToGuava { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable> doohickeys) { if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.addAll(doohickeys); @@ -98,14 +84,12 @@ class BuilderSingularRedirectToGuava { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuavaBuilder clearDoohickeys() { this.doohickeys = null; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularRedirectToGuava build() { java.util.Set dangerMice = this.dangerMice == null ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build(); java.util.NavigableMap things = this.things == null ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build(); @@ -115,15 +99,13 @@ class BuilderSingularRedirectToGuava { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder(dangerMice=" + this.dangerMice + ", things=" + this.things + ", doohickeys=" + this.doohickeys + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderSingularRedirectToGuavaBuilder builder() { return new BuilderSingularRedirectToGuavaBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderSingularSets.java b/test/transform/resource/after-delombok/BuilderSingularSets.java index 4c4e64e1..2461d2fd 100644 --- a/test/transform/resource/after-delombok/BuilderSingularSets.java +++ b/test/transform/resource/after-delombok/BuilderSingularSets.java @@ -8,7 +8,6 @@ class BuilderSingularSets { private Set stringSet; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularSets(final Set dangerMice, final SortedSet octopodes, final Set rawSet, final Set stringSet) { this.dangerMice = dangerMice; this.octopodes = octopodes; @@ -17,32 +16,25 @@ class BuilderSingularSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderSingularSetsBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList dangerMice; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList octopodes; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList rawSet; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList stringSet; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularSetsBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder dangerMouse(final T dangerMouse) { if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); this.dangerMice.add(dangerMouse); @@ -50,7 +42,6 @@ class BuilderSingularSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder dangerMice(final java.util.Collection dangerMice) { if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList(); this.dangerMice.addAll(dangerMice); @@ -58,14 +49,12 @@ class BuilderSingularSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder clearDangerMice() { if (this.dangerMice != null) this.dangerMice.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder octopus(final Number octopus) { if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); this.octopodes.add(octopus); @@ -73,7 +62,6 @@ class BuilderSingularSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder octopodes(final java.util.Collection octopodes) { if (this.octopodes == null) this.octopodes = new java.util.ArrayList(); this.octopodes.addAll(octopodes); @@ -81,14 +69,12 @@ class BuilderSingularSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder clearOctopodes() { if (this.octopodes != null) this.octopodes.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder rawSet(final java.lang.Object rawSet) { if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); this.rawSet.add(rawSet); @@ -96,7 +82,6 @@ class BuilderSingularSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder rawSet(final java.util.Collection rawSet) { if (this.rawSet == null) this.rawSet = new java.util.ArrayList(); this.rawSet.addAll(rawSet); @@ -104,14 +89,12 @@ class BuilderSingularSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder clearRawSet() { if (this.rawSet != null) this.rawSet.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder stringSet(final String stringSet) { if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); this.stringSet.add(stringSet); @@ -119,7 +102,6 @@ class BuilderSingularSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder stringSet(final java.util.Collection stringSet) { if (this.stringSet == null) this.stringSet = new java.util.ArrayList(); this.stringSet.addAll(stringSet); @@ -127,14 +109,12 @@ class BuilderSingularSets { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSetsBuilder clearStringSet() { if (this.stringSet != null) this.stringSet.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularSets build() { java.util.Set dangerMice; switch (this.dangerMice == null ? 0 : this.dangerMice.size()) { @@ -183,15 +163,13 @@ class BuilderSingularSets { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderSingularSets.BuilderSingularSetsBuilder(dangerMice=" + this.dangerMice + ", octopodes=" + this.octopodes + ", rawSet=" + this.rawSet + ", stringSet=" + this.stringSet + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderSingularSetsBuilder builder() { return new BuilderSingularSetsBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java b/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java index 37d05704..a6bd2f88 100644 --- a/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java +++ b/test/transform/resource/after-delombok/BuilderSingularWithPrefixes.java @@ -2,26 +2,21 @@ class BuilderSingularWithPrefixes { private java.util.List _elems; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularWithPrefixes(final java.util.List elems) { this._elems = elems; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderSingularWithPrefixesBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList elems; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderSingularWithPrefixesBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularWithPrefixesBuilder elem(final String elem) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.add(elem); @@ -29,7 +24,6 @@ class BuilderSingularWithPrefixes { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularWithPrefixesBuilder elems(final java.util.Collection elems) { if (this.elems == null) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); @@ -37,14 +31,12 @@ class BuilderSingularWithPrefixes { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularWithPrefixesBuilder clearElems() { if (this.elems != null) this.elems.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderSingularWithPrefixes build() { java.util.List elems; switch (this.elems == null ? 0 : this.elems.size()) { @@ -62,15 +54,13 @@ class BuilderSingularWithPrefixes { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder(elems=" + this.elems + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderSingularWithPrefixesBuilder builder() { return new BuilderSingularWithPrefixesBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderValueData.java b/test/transform/resource/after-delombok/BuilderValueData.java index c8690f2a..d08c6149 100644 --- a/test/transform/resource/after-delombok/BuilderValueData.java +++ b/test/transform/resource/after-delombok/BuilderValueData.java @@ -3,48 +3,40 @@ final class BuilderAndValue { private final int zero = 0; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderAndValue() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderAndValueBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderAndValueBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderAndValue build() { return new BuilderAndValue(); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderAndValue.BuilderAndValueBuilder()"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderAndValueBuilder builder() { return new BuilderAndValueBuilder(); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getZero() { return this.zero; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof BuilderAndValue)) return false; @@ -55,7 +47,6 @@ final class BuilderAndValue { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -65,7 +56,6 @@ final class BuilderAndValue { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderAndValue(zero=" + this.getZero() + ")"; } @@ -75,48 +65,40 @@ class BuilderAndData { private final int zero = 0; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderAndData() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderAndDataBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderAndDataBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderAndData build() { return new BuilderAndData(); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderAndData.BuilderAndDataBuilder()"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderAndDataBuilder builder() { return new BuilderAndDataBuilder(); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getZero() { return this.zero; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof BuilderAndData)) return false; @@ -127,14 +109,12 @@ class BuilderAndData { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof BuilderAndData; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -144,7 +124,6 @@ class BuilderAndData { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderAndData(zero=" + this.getZero() + ")"; } diff --git a/test/transform/resource/after-delombok/BuilderWithAccessors.java b/test/transform/resource/after-delombok/BuilderWithAccessors.java index e5504c8c..db3cc3d8 100644 --- a/test/transform/resource/after-delombok/BuilderWithAccessors.java +++ b/test/transform/resource/after-delombok/BuilderWithAccessors.java @@ -5,7 +5,6 @@ class BuilderWithAccessors { private int __bar; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderWithAccessors(final int plower, final int upper, final int foo, final int _bar) { this.plower = plower; this.pUpper = upper; @@ -14,75 +13,62 @@ class BuilderWithAccessors { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderWithAccessorsBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int plower; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int upper; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int foo; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int _bar; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderWithAccessorsBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithAccessorsBuilder plower(final int plower) { this.plower = plower; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithAccessorsBuilder upper(final int upper) { this.upper = upper; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithAccessorsBuilder foo(final int foo) { this.foo = foo; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithAccessorsBuilder _bar(final int _bar) { this._bar = _bar; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithAccessors build() { return new BuilderWithAccessors(plower, upper, foo, _bar); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderWithAccessors.BuilderWithAccessorsBuilder(plower=" + this.plower + ", upper=" + this.upper + ", foo=" + this.foo + ", _bar=" + this._bar + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderWithAccessorsBuilder builder() { return new BuilderWithAccessorsBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderWithExistingBuilderClass.java b/test/transform/resource/after-delombok/BuilderWithExistingBuilderClass.java index e6b09e6f..03692529 100644 --- a/test/transform/resource/after-delombok/BuilderWithExistingBuilderClass.java +++ b/test/transform/resource/after-delombok/BuilderWithExistingBuilderClass.java @@ -5,52 +5,44 @@ class BuilderWithExistingBuilderClass { public static class BuilderWithExistingBuilderClassBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private boolean arg2; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private String arg3; private Z arg1; public void arg2(boolean arg) { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderWithExistingBuilderClassBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithExistingBuilderClassBuilder arg1(final Z arg1) { this.arg1 = arg1; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithExistingBuilderClassBuilder arg3(final String arg3) { this.arg3 = arg3; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithExistingBuilderClass build() { return BuilderWithExistingBuilderClass.staticMethod(arg1, arg2, arg3); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder(arg1=" + this.arg1 + ", arg2=" + this.arg2 + ", arg3=" + this.arg3 + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderWithExistingBuilderClassBuilder builder() { return new BuilderWithExistingBuilderClassBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/BuilderWithToBuilder.java b/test/transform/resource/after-delombok/BuilderWithToBuilder.java index 052cdee8..7dfb046a 100644 --- a/test/transform/resource/after-delombok/BuilderWithToBuilder.java +++ b/test/transform/resource/after-delombok/BuilderWithToBuilder.java @@ -9,7 +9,6 @@ class BuilderWithToBuilder { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderWithToBuilder(final String one, final String two, final T foo, final List bars) { this.mOne = one; this.mTwo = two; @@ -18,53 +17,43 @@ class BuilderWithToBuilder { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class BuilderWithToBuilderBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private String one; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private String two; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private T foo; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private java.util.ArrayList bars; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithToBuilderBuilder one(final String one) { this.one = one; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithToBuilderBuilder two(final String two) { this.two = two; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithToBuilderBuilder foo(final T foo) { this.foo = foo; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithToBuilderBuilder bar(final T bar) { if (this.bars == null) this.bars = new java.util.ArrayList(); this.bars.add(bar); @@ -72,7 +61,6 @@ class BuilderWithToBuilder { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithToBuilderBuilder bars(final java.util.Collection bars) { if (this.bars == null) this.bars = new java.util.ArrayList(); this.bars.addAll(bars); @@ -80,14 +68,12 @@ class BuilderWithToBuilder { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithToBuilderBuilder clearBars() { if (this.bars != null) this.bars.clear(); return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithToBuilder build() { java.util.List bars; switch (this.bars == null ? 0 : this.bars.size()) { @@ -105,20 +91,17 @@ class BuilderWithToBuilder { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderWithToBuilder.BuilderWithToBuilderBuilder(one=" + this.one + ", two=" + this.two + ", foo=" + this.foo + ", bars=" + this.bars + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderWithToBuilderBuilder builder() { return new BuilderWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithToBuilderBuilder toBuilder() { return new BuilderWithToBuilderBuilder().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)).bars(this.bars); } @@ -133,58 +116,48 @@ class ConstructorWithToBuilder { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class ConstructorWithToBuilderBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private String mOne; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private T bar; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated ConstructorWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ConstructorWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ConstructorWithToBuilderBuilder bar(final T bar) { this.bar = bar; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ConstructorWithToBuilder build() { return new ConstructorWithToBuilder(mOne, bar); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(mOne=" + this.mOne + ", bar=" + this.bar + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static ConstructorWithToBuilderBuilder builder() { return new ConstructorWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ConstructorWithToBuilderBuilder toBuilder() { return new ConstructorWithToBuilderBuilder().mOne(this.mOne).bar(this.foo); } @@ -201,58 +174,48 @@ class StaticWithToBuilder { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static class StaticWithToBuilderBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private String mOne; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private Z bar; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated StaticWithToBuilderBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public StaticWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public StaticWithToBuilderBuilder bar(final Z bar) { this.bar = bar; return this; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public StaticWithToBuilder build() { return StaticWithToBuilder.test(mOne, bar); } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "StaticWithToBuilder.StaticWithToBuilderBuilder(mOne=" + this.mOne + ", bar=" + this.bar + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static StaticWithToBuilderBuilder builder() { return new StaticWithToBuilderBuilder(); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public StaticWithToBuilderBuilder toBuilder() { return new StaticWithToBuilderBuilder().mOne(this.mOne).bar(this.foo); } diff --git a/test/transform/resource/after-delombok/BuilderWithTolerate.java b/test/transform/resource/after-delombok/BuilderWithTolerate.java index decb05d3..5eff9120 100644 --- a/test/transform/resource/after-delombok/BuilderWithTolerate.java +++ b/test/transform/resource/after-delombok/BuilderWithTolerate.java @@ -12,7 +12,6 @@ public class BuilderWithTolerate { public static class BuilderWithTolerateBuilder { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private int value; @Tolerate @@ -22,13 +21,11 @@ public class BuilderWithTolerate { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderWithTolerateBuilder() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithTolerateBuilder value(final int value) { this.value = value; return this; @@ -36,7 +33,6 @@ public class BuilderWithTolerate { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public BuilderWithTolerate build() { return new BuilderWithTolerate(value); } @@ -44,7 +40,6 @@ public class BuilderWithTolerate { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "BuilderWithTolerate.BuilderWithTolerateBuilder(value=" + this.value + ")"; } @@ -52,15 +47,13 @@ public class BuilderWithTolerate { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated BuilderWithTolerate(final int value) { this.value = value; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static BuilderWithTolerateBuilder builder() { return new BuilderWithTolerateBuilder(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ClassNamedAfterGetter.java b/test/transform/resource/after-delombok/ClassNamedAfterGetter.java index 5db0e37a..793ec097 100644 --- a/test/transform/resource/after-delombok/ClassNamedAfterGetter.java +++ b/test/transform/resource/after-delombok/ClassNamedAfterGetter.java @@ -2,7 +2,6 @@ class GetFoo { private int foo; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getFoo() { return this.foo; } diff --git a/test/transform/resource/after-delombok/CommentsInterspersed.java b/test/transform/resource/after-delombok/CommentsInterspersed.java index 33712fea..a1da2c3d 100644 --- a/test/transform/resource/after-delombok/CommentsInterspersed.java +++ b/test/transform/resource/after-delombok/CommentsInterspersed.java @@ -13,7 +13,6 @@ public class CommentsInterspersed { }-*/ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getTest() { return this.test; } diff --git a/test/transform/resource/after-delombok/ConflictingStaticConstructorNames.java b/test/transform/resource/after-delombok/ConflictingStaticConstructorNames.java index d8883be1..22a66c95 100644 --- a/test/transform/resource/after-delombok/ConflictingStaticConstructorNames.java +++ b/test/transform/resource/after-delombok/ConflictingStaticConstructorNames.java @@ -2,7 +2,6 @@ class ConflictingStaticConstructorNames { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof ConflictingStaticConstructorNames)) return false; @@ -12,14 +11,12 @@ class ConflictingStaticConstructorNames { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof ConflictingStaticConstructorNames; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -27,13 +24,11 @@ class ConflictingStaticConstructorNames { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ConflictingStaticConstructorNames()"; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ConflictingStaticConstructorNames() { } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/Constructors.java b/test/transform/resource/after-delombok/Constructors.java index e3bb85ab..c138a00c 100644 --- a/test/transform/resource/after-delombok/Constructors.java +++ b/test/transform/resource/after-delombok/Constructors.java @@ -4,7 +4,6 @@ class RequiredArgsConstructor1 { @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public RequiredArgsConstructor1(final int x) { this.x = x; } @@ -15,7 +14,6 @@ class RequiredArgsConstructorAccess { @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected RequiredArgsConstructorAccess(final int x) { this.x = x; } @@ -25,13 +23,11 @@ class RequiredArgsConstructorStaticName { String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private RequiredArgsConstructorStaticName(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static RequiredArgsConstructorStaticName staticname(final int x) { return new RequiredArgsConstructorStaticName(x); } @@ -43,7 +39,6 @@ class RequiredArgsConstructorWithAnnotations { @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public RequiredArgsConstructorWithAnnotations(final int x) { this.x = x; } @@ -54,7 +49,6 @@ class AllArgsConstructor1 { @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public AllArgsConstructor1(final int x, final String name) { this.x = x; this.name = name; @@ -65,7 +59,6 @@ class NoArgsConstructor1 { String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public NoArgsConstructor1() { } } @@ -74,13 +67,11 @@ class RequiredArgsConstructorStaticNameGenerics { String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private RequiredArgsConstructorStaticNameGenerics(final T x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static RequiredArgsConstructorStaticNameGenerics of(final T x) { return new RequiredArgsConstructorStaticNameGenerics(x); } @@ -90,13 +81,11 @@ class RequiredArgsConstructorStaticNameGenerics2 { String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private RequiredArgsConstructorStaticNameGenerics2(final Class x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static RequiredArgsConstructorStaticNameGenerics2 of(final Class x) { return new RequiredArgsConstructorStaticNameGenerics2(x); } @@ -105,7 +94,6 @@ class AllArgsConstructorPackageAccess { final String x; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated AllArgsConstructorPackageAccess(final String x) { this.x = x; } @@ -120,7 +108,6 @@ class NoArgsConstructor2 { byte z; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public NoArgsConstructor2() { this.x = 0; this.y = 0.0; diff --git a/test/transform/resource/after-delombok/ConstructorsConfiguration.java b/test/transform/resource/after-delombok/ConstructorsConfiguration.java index 3c472c46..effc51b8 100644 --- a/test/transform/resource/after-delombok/ConstructorsConfiguration.java +++ b/test/transform/resource/after-delombok/ConstructorsConfiguration.java @@ -2,7 +2,6 @@ class ConstructorsConfiguration { int x; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ConstructorsConfiguration(final int x) { this.x = x; } @@ -12,7 +11,6 @@ class ConstructorsConfigurationExplicit { @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ConstructorsConfigurationExplicit(final int x) { this.x = x; } diff --git a/test/transform/resource/after-delombok/ConstructorsWithAccessors.java b/test/transform/resource/after-delombok/ConstructorsWithAccessors.java index b83c4cec..43c0ea66 100644 --- a/test/transform/resource/after-delombok/ConstructorsWithAccessors.java +++ b/test/transform/resource/after-delombok/ConstructorsWithAccessors.java @@ -7,7 +7,6 @@ class ConstructorsWithAccessors { @java.beans.ConstructorProperties({"plower", "upper", "huh", "_huh2"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ConstructorsWithAccessors(final int plower, final int upper, final int huh, final int _huh2) { this.plower = plower; this.pUpper = upper; diff --git a/test/transform/resource/after-delombok/DataConfiguration.java b/test/transform/resource/after-delombok/DataConfiguration.java index c4accfcc..aadb35b6 100644 --- a/test/transform/resource/after-delombok/DataConfiguration.java +++ b/test/transform/resource/after-delombok/DataConfiguration.java @@ -2,20 +2,17 @@ class DataConfiguration { final int x; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public DataConfiguration(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DataConfiguration)) return false; @@ -26,14 +23,12 @@ class DataConfiguration { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof DataConfiguration; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -43,7 +38,6 @@ class DataConfiguration { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "DataConfiguration(x=" + this.getX() + ")"; } diff --git a/test/transform/resource/after-delombok/DataExtended.java b/test/transform/resource/after-delombok/DataExtended.java index 27c0b44d..04f0da0b 100644 --- a/test/transform/resource/after-delombok/DataExtended.java +++ b/test/transform/resource/after-delombok/DataExtended.java @@ -2,25 +2,21 @@ class DataExtended { int x; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public DataExtended() { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setX(final int x) { this.x = x; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DataExtended)) return false; @@ -31,14 +27,12 @@ class DataExtended { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof DataExtended; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -48,8 +42,7 @@ class DataExtended { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "DataExtended(x=" + this.x + ")"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DataIgnore.java b/test/transform/resource/after-delombok/DataIgnore.java index 761ce42b..dca235d3 100644 --- a/test/transform/resource/after-delombok/DataIgnore.java +++ b/test/transform/resource/after-delombok/DataIgnore.java @@ -4,20 +4,17 @@ class DataIgnore { @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public DataIgnore(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DataIgnore)) return false; @@ -28,14 +25,12 @@ class DataIgnore { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof DataIgnore; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -45,8 +40,7 @@ class DataIgnore { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "DataIgnore(x=" + this.getX() + ")"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DataOnEnum.java b/test/transform/resource/after-delombok/DataOnEnum.java index 214bae0d..5316c022 100644 --- a/test/transform/resource/after-delombok/DataOnEnum.java +++ b/test/transform/resource/after-delombok/DataOnEnum.java @@ -3,21 +3,18 @@ public enum DataOnEnum { private final String someField; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getSomeField() { return this.someField; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "DataOnEnum(someField=" + this.getSomeField() + ")"; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private DataOnEnum(final String someField) { this.someField = someField; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DataOnLocalClass.java b/test/transform/resource/after-delombok/DataOnLocalClass.java index 4ac77e5c..90ae7649 100644 --- a/test/transform/resource/after-delombok/DataOnLocalClass.java +++ b/test/transform/resource/after-delombok/DataOnLocalClass.java @@ -5,32 +5,27 @@ class DataOnLocalClass1 { String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Local(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getName() { return this.name; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setName(final String name) { this.name = name; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Local)) return false; @@ -44,14 +39,12 @@ class DataOnLocalClass1 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof Local; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -63,7 +56,6 @@ class DataOnLocalClass1 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Local(x=" + this.getX() + ", name=" + this.getName() + ")"; } @@ -79,7 +71,6 @@ class DataOnLocalClass2 { String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public InnerLocal(@lombok.NonNull final String name) { if (name == null) { throw new java.lang.NullPointerException("name"); @@ -89,13 +80,11 @@ class DataOnLocalClass2 { @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getName() { return this.name; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setName(@lombok.NonNull final String name) { if (name == null) { throw new java.lang.NullPointerException("name"); @@ -105,7 +94,6 @@ class DataOnLocalClass2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Local.InnerLocal)) return false; @@ -118,14 +106,12 @@ class DataOnLocalClass2 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof Local.InnerLocal; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -136,27 +122,23 @@ class DataOnLocalClass2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Local.InnerLocal(name=" + this.getName() + ")"; } } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Local(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Local)) return false; @@ -167,14 +149,12 @@ class DataOnLocalClass2 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof Local; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -184,10 +164,9 @@ class DataOnLocalClass2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Local(x=" + this.getX() + ")"; } } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DataPlain.java b/test/transform/resource/after-delombok/DataPlain.java index 994bdc1f..6d109653 100644 --- a/test/transform/resource/after-delombok/DataPlain.java +++ b/test/transform/resource/after-delombok/DataPlain.java @@ -4,32 +4,27 @@ class Data1 { @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Data1(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getName() { return this.name; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setName(final String name) { this.name = name; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Data1)) return false; @@ -43,14 +38,12 @@ class Data1 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof Data1; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -62,7 +55,6 @@ class Data1 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Data1(x=" + this.getX() + ", name=" + this.getName() + ")"; } @@ -73,32 +65,27 @@ class Data2 { @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Data2(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getName() { return this.name; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setName(final String name) { this.name = name; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Data2)) return false; @@ -112,14 +99,12 @@ class Data2 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof Data2; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -131,7 +116,6 @@ class Data2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Data2(x=" + this.getX() + ", name=" + this.getName() + ")"; } @@ -142,32 +126,27 @@ final class Data3 { @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Data3(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getName() { return this.name; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setName(final String name) { this.name = name; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Data3)) return false; @@ -181,7 +160,6 @@ final class Data3 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -193,7 +171,6 @@ final class Data3 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Data3(x=" + this.getX() + ", name=" + this.getName() + ")"; } @@ -204,27 +181,23 @@ final class Data4 extends java.util.Timer { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setX(final int x) { this.x = x; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Data4(x=" + this.getX() + ")"; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Data4)) return false; @@ -236,14 +209,12 @@ final class Data4 extends java.util.Timer { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof Data4; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -255,13 +226,11 @@ final class Data4 extends java.util.Timer { class Data5 { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Data5() { } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Data5)) return false; @@ -271,14 +240,12 @@ class Data5 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof Data5; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -286,7 +253,6 @@ class Data5 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Data5()"; } @@ -294,13 +260,11 @@ class Data5 { final class Data6 { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Data6() { } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Data6)) return false; @@ -309,7 +273,6 @@ final class Data6 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -317,8 +280,7 @@ final class Data6 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Data6()"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DataWithGetter.java b/test/transform/resource/after-delombok/DataWithGetter.java index c93cc10c..85e698df 100644 --- a/test/transform/resource/after-delombok/DataWithGetter.java +++ b/test/transform/resource/after-delombok/DataWithGetter.java @@ -5,26 +5,22 @@ class DataWithGetter { @java.beans.ConstructorProperties({"z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public DataWithGetter(final String z) { this.z = z; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setX(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setY(final int y) { this.y = y; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DataWithGetter)) return false; @@ -39,14 +35,12 @@ class DataWithGetter { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof DataWithGetter; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -59,26 +53,22 @@ class DataWithGetter { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "DataWithGetter(x=" + this.getX() + ", y=" + this.getY() + ", z=" + this.getZ() + ")"; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getY() { return this.y; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getZ() { return this.z; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DataWithGetterNone.java b/test/transform/resource/after-delombok/DataWithGetterNone.java index dfd30639..8be06247 100644 --- a/test/transform/resource/after-delombok/DataWithGetterNone.java +++ b/test/transform/resource/after-delombok/DataWithGetterNone.java @@ -5,26 +5,22 @@ class DataWithGetterNone { @java.beans.ConstructorProperties({"z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public DataWithGetterNone(final String z) { this.z = z; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setX(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setY(final int y) { this.y = y; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DataWithGetterNone)) return false; @@ -39,14 +35,12 @@ class DataWithGetterNone { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof DataWithGetterNone; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -59,8 +53,7 @@ class DataWithGetterNone { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "DataWithGetterNone(x=" + this.x + ", y=" + this.y + ", z=" + this.z + ")"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DelegateOnGetter.java b/test/transform/resource/after-delombok/DelegateOnGetter.java index ae1ce320..8cb72788 100644 --- a/test/transform/resource/after-delombok/DelegateOnGetter.java +++ b/test/transform/resource/after-delombok/DelegateOnGetter.java @@ -6,7 +6,6 @@ class DelegateOnGetter { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Bar getBar() { java.lang.Object value = this.bar.get(); if (value == null) { @@ -29,14 +28,12 @@ class DelegateOnGetter { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setList(final java.util.ArrayList list) { this.getBar().setList(list); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getInt() { return this.getBar().getInt(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DelegateOnGetterNone.java b/test/transform/resource/after-delombok/DelegateOnGetterNone.java index ee0b1ab8..49215748 100644 --- a/test/transform/resource/after-delombok/DelegateOnGetterNone.java +++ b/test/transform/resource/after-delombok/DelegateOnGetterNone.java @@ -6,14 +6,12 @@ class DelegateOnGetterNone { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setList(final java.util.ArrayList list) { this.bar.setList(list); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getInt() { return this.bar.getInt(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DelegateOnMethods.java b/test/transform/resource/after-delombok/DelegateOnMethods.java index db8621bc..8028b48a 100644 --- a/test/transform/resource/after-delombok/DelegateOnMethods.java +++ b/test/transform/resource/after-delombok/DelegateOnMethods.java @@ -9,8 +9,7 @@ abstract class DelegateOnMethods { @javax.annotation.Generated("lombok") - @lombok.Generated public void bar(final java.util.ArrayList list) { this.getBar().bar(list); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DelegateTypesAndExcludes.java b/test/transform/resource/after-delombok/DelegateTypesAndExcludes.java index 135b351d..bc19b276 100644 --- a/test/transform/resource/after-delombok/DelegateTypesAndExcludes.java +++ b/test/transform/resource/after-delombok/DelegateTypesAndExcludes.java @@ -27,7 +27,6 @@ class DelegatePlain { @javax.annotation.Generated("lombok") - @lombok.Generated public void bar(final java.util.ArrayList list) { this.bar.bar(list); } @@ -36,8 +35,7 @@ class DelegatePlain { @javax.annotation.Generated("lombok") - @lombok.Generated public void foo() { this.foo.foo(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DelegateWithDeprecated.java b/test/transform/resource/after-delombok/DelegateWithDeprecated.java index 0f46f341..0bc89859 100644 --- a/test/transform/resource/after-delombok/DelegateWithDeprecated.java +++ b/test/transform/resource/after-delombok/DelegateWithDeprecated.java @@ -12,21 +12,18 @@ class DelegateWithDeprecated { @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void deprecatedAnnotation() { this.bar.deprecatedAnnotation(); } @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void deprecatedComment() { this.bar.deprecatedComment(); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void notDeprecated() { this.bar.notDeprecated(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/DelegateWithVarargs.java b/test/transform/resource/after-delombok/DelegateWithVarargs.java index 91d7d466..1d240524 100644 --- a/test/transform/resource/after-delombok/DelegateWithVarargs.java +++ b/test/transform/resource/after-delombok/DelegateWithVarargs.java @@ -8,25 +8,21 @@ class DelegateWithVarargs { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void justOneParameter(final int... varargs) { this.bar.justOneParameter(varargs); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void multipleParameters(final java.lang.String first, final int... varargs) { this.bar.multipleParameters(first, varargs); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void array(final int[] array) { this.bar.array(array); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void arrayVarargs(final int[]... arrayVarargs) { this.bar.arrayVarargs(arrayVarargs); } diff --git a/test/transform/resource/after-delombok/EncodingUsAscii.java b/test/transform/resource/after-delombok/EncodingUsAscii.java index 0134f22d..965d70b5 100644 --- a/test/transform/resource/after-delombok/EncodingUsAscii.java +++ b/test/transform/resource/after-delombok/EncodingUsAscii.java @@ -4,8 +4,7 @@ class EncodingUsAscii { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "EncodingUsAscii(foo\u0e51\u0e51=" + this.foo\u0e51\u0e51 + ")"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/EncodingUtf8.java b/test/transform/resource/after-delombok/EncodingUtf8.java index d57f1a0a..4cc5c89d 100644 --- a/test/transform/resource/after-delombok/EncodingUtf8.java +++ b/test/transform/resource/after-delombok/EncodingUtf8.java @@ -3,8 +3,7 @@ class EncodingUtf8 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "EncodingUtf8(foo๑๑=" + this.foo๑๑ + ")"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/EqualsAndHashCode.java b/test/transform/resource/after-delombok/EqualsAndHashCode.java index 858913b1..67e07d7f 100644 --- a/test/transform/resource/after-delombok/EqualsAndHashCode.java +++ b/test/transform/resource/after-delombok/EqualsAndHashCode.java @@ -7,7 +7,6 @@ class EqualsAndHashCode { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCode)) return false; @@ -26,14 +25,12 @@ class EqualsAndHashCode { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof EqualsAndHashCode; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -56,7 +53,6 @@ final class EqualsAndHashCode2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCode2)) return false; @@ -71,7 +67,6 @@ final class EqualsAndHashCode2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -89,7 +84,6 @@ final class EqualsAndHashCode3 extends EqualsAndHashCode { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCode3)) return false; @@ -99,14 +93,12 @@ final class EqualsAndHashCode3 extends EqualsAndHashCode { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof EqualsAndHashCode3; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -116,7 +108,6 @@ class EqualsAndHashCode4 extends EqualsAndHashCode { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCode4)) return false; @@ -127,18 +118,16 @@ class EqualsAndHashCode4 extends EqualsAndHashCode { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof EqualsAndHashCode4; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; result = result * PRIME + super.hashCode(); return result; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeConfigKeys1.java b/test/transform/resource/after-delombok/EqualsAndHashCodeConfigKeys1.java index 97da983e..449a1b2e 100644 --- a/test/transform/resource/after-delombok/EqualsAndHashCodeConfigKeys1.java +++ b/test/transform/resource/after-delombok/EqualsAndHashCodeConfigKeys1.java @@ -2,7 +2,6 @@ class EqualsAndHashCodeConfigKeys1Parent { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCodeConfigKeys1Parent)) return false; @@ -12,14 +11,12 @@ class EqualsAndHashCodeConfigKeys1Parent { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof EqualsAndHashCodeConfigKeys1Parent; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -30,7 +27,6 @@ class EqualsAndHashCodeConfigKeys1 extends EqualsAndHashCodeConfigKeys1Parent { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCodeConfigKeys1)) return false; @@ -41,14 +37,12 @@ class EqualsAndHashCodeConfigKeys1 extends EqualsAndHashCodeConfigKeys1Parent { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof EqualsAndHashCodeConfigKeys1; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeConfigKeys2.java b/test/transform/resource/after-delombok/EqualsAndHashCodeConfigKeys2.java index e823b7d5..43c271fa 100644 --- a/test/transform/resource/after-delombok/EqualsAndHashCodeConfigKeys2.java +++ b/test/transform/resource/after-delombok/EqualsAndHashCodeConfigKeys2.java @@ -2,7 +2,6 @@ class EqualsAndHashCodeConfigKeys2Parent { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCodeConfigKeys2Parent)) return false; @@ -12,14 +11,12 @@ class EqualsAndHashCodeConfigKeys2Parent { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof EqualsAndHashCodeConfigKeys2Parent; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -30,7 +27,6 @@ class EqualsAndHashCodeConfigKeys2 extends EqualsAndHashCodeConfigKeys2Parent { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCodeConfigKeys2)) return false; @@ -42,14 +38,12 @@ class EqualsAndHashCodeConfigKeys2 extends EqualsAndHashCodeConfigKeys2Parent { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof EqualsAndHashCodeConfigKeys2; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java b/test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java index 026a74ad..d9e4a913 100644 --- a/test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java +++ b/test/transform/resource/after-delombok/EqualsAndHashCodeWithExistingMethods.java @@ -18,7 +18,6 @@ final class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithE @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCodeWithExistingMethods3)) return false; @@ -31,7 +30,6 @@ final class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithE @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -39,4 +37,4 @@ final class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithE result = result * PRIME + this.x; return result; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeWithOnParam.java b/test/transform/resource/after-delombok/EqualsAndHashCodeWithOnParam.java index 679ca99d..3bf4b661 100644 --- a/test/transform/resource/after-delombok/EqualsAndHashCodeWithOnParam.java +++ b/test/transform/resource/after-delombok/EqualsAndHashCodeWithOnParam.java @@ -10,7 +10,6 @@ class EqualsAndHashCodeWithOnParam { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(@Nullable final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCodeWithOnParam)) return false; @@ -29,14 +28,12 @@ class EqualsAndHashCodeWithOnParam { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(@Nullable final java.lang.Object other) { return other instanceof EqualsAndHashCodeWithOnParam; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -49,4 +46,4 @@ class EqualsAndHashCodeWithOnParam { result = result * PRIME + ($b == null ? 43 : $b.hashCode()); return result; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/EqualsAndHashcodeOfExclude.java b/test/transform/resource/after-delombok/EqualsAndHashcodeOfExclude.java index 471ee60c..8b9888e9 100644 --- a/test/transform/resource/after-delombok/EqualsAndHashcodeOfExclude.java +++ b/test/transform/resource/after-delombok/EqualsAndHashcodeOfExclude.java @@ -4,7 +4,6 @@ final class EqualsAndHashCodeOf { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCodeOf)) return false; @@ -15,7 +14,6 @@ final class EqualsAndHashCodeOf { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -29,7 +27,6 @@ final class EqualsAndHashCodeExclude { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof EqualsAndHashCodeExclude)) return false; @@ -40,11 +37,10 @@ final class EqualsAndHashCodeExclude { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; result = result * PRIME + this.x; return result; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ExtensionMethodPlain.java b/test/transform/resource/after-delombok/ExtensionMethodPlain.java index 707a0258..4a3cc347 100644 --- a/test/transform/resource/after-delombok/ExtensionMethodPlain.java +++ b/test/transform/resource/after-delombok/ExtensionMethodPlain.java @@ -14,4 +14,4 @@ class ExtensionMethodPlain { return "" + Character.toTitleCase(in.charAt(0)) + in.substring(1).toLowerCase(); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/FieldDefaults.java b/test/transform/resource/after-delombok/FieldDefaults.java index 6f866a9a..19fb9d39 100644 --- a/test/transform/resource/after-delombok/FieldDefaults.java +++ b/test/transform/resource/after-delombok/FieldDefaults.java @@ -10,4 +10,4 @@ class FieldDefaults2 { static int STATIC = 3; int x; private int y; -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/FieldDefaultsNoop.java b/test/transform/resource/after-delombok/FieldDefaultsNoop.java index 275fa0e7..59c377ed 100644 --- a/test/transform/resource/after-delombok/FieldDefaultsNoop.java +++ b/test/transform/resource/after-delombok/FieldDefaultsNoop.java @@ -1,2 +1,2 @@ class FieldDefaultsNoop { -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/FieldDefaultsViaConfig.java b/test/transform/resource/after-delombok/FieldDefaultsViaConfig.java index 096769b6..96191005 100644 --- a/test/transform/resource/after-delombok/FieldDefaultsViaConfig.java +++ b/test/transform/resource/after-delombok/FieldDefaultsViaConfig.java @@ -8,4 +8,4 @@ class FieldDefaultsViaConfig1 { class FieldDefaultsViaConfig2 { final int x = 2; protected final int y = 0; -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/FieldDefaultsViaConfigAndRequiredArgsConstructor.java b/test/transform/resource/after-delombok/FieldDefaultsViaConfigAndRequiredArgsConstructor.java index 37626fb5..f92f0890 100644 --- a/test/transform/resource/after-delombok/FieldDefaultsViaConfigAndRequiredArgsConstructor.java +++ b/test/transform/resource/after-delombok/FieldDefaultsViaConfigAndRequiredArgsConstructor.java @@ -3,8 +3,7 @@ class FieldDefaultsViaConfigAndRequiredArgsConstructor { @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public FieldDefaultsViaConfigAndRequiredArgsConstructor(final int x) { this.x = x; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GenerateSuppressFBWarnings.java b/test/transform/resource/after-delombok/GenerateSuppressFBWarnings.java index 5ebd47f1..046f850c 100644 --- a/test/transform/resource/after-delombok/GenerateSuppressFBWarnings.java +++ b/test/transform/resource/after-delombok/GenerateSuppressFBWarnings.java @@ -3,8 +3,7 @@ class GenerateSuppressFBWarnings { @java.lang.SuppressWarnings("all") @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(justification = "generated code") @javax.annotation.Generated("lombok") - @lombok.Generated public int getY() { return this.y; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GeneratedGlobalOff.java b/test/transform/resource/after-delombok/GeneratedGlobalOff.java deleted file mode 100644 index 6557b715..00000000 --- a/test/transform/resource/after-delombok/GeneratedGlobalOff.java +++ /dev/null @@ -1,7 +0,0 @@ -class GeneratedGlobalOff { - int x; - @java.lang.SuppressWarnings("all") - public int getX() { - return this.x; - } -} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/GeneratedGlobalOffJavaxOn.java b/test/transform/resource/after-delombok/GeneratedGlobalOffJavaxOn.java deleted file mode 100644 index de034fe3..00000000 --- a/test/transform/resource/after-delombok/GeneratedGlobalOffJavaxOn.java +++ /dev/null @@ -1,8 +0,0 @@ -class GeneratedGlobalOffJavaxOn { - int x; - @java.lang.SuppressWarnings("all") - @javax.annotation.Generated("lombok") - public int getX() { - return this.x; - } -} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/GeneratedGlobalOffLombokOn.java b/test/transform/resource/after-delombok/GeneratedGlobalOffLombokOn.java deleted file mode 100644 index 40cfa92e..00000000 --- a/test/transform/resource/after-delombok/GeneratedGlobalOffLombokOn.java +++ /dev/null @@ -1,8 +0,0 @@ -class GeneratedGlobalOffLombokOn { - int x; - @java.lang.SuppressWarnings("all") - @lombok.Generated - public int getX() { - return this.x; - } -} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/GeneratedJavaxOff.java b/test/transform/resource/after-delombok/GeneratedJavaxOff.java index d061ccba..ca50f3d2 100644 --- a/test/transform/resource/after-delombok/GeneratedJavaxOff.java +++ b/test/transform/resource/after-delombok/GeneratedJavaxOff.java @@ -1,8 +1,7 @@ class GeneratedJavaxOff { int x; @java.lang.SuppressWarnings("all") - @lombok.Generated public int getX() { return this.x; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GeneratedJavaxOnLombokOn.java b/test/transform/resource/after-delombok/GeneratedJavaxOnLombokOn.java new file mode 100644 index 00000000..90fe0e3a --- /dev/null +++ b/test/transform/resource/after-delombok/GeneratedJavaxOnLombokOn.java @@ -0,0 +1,9 @@ +class GeneratedJavaxOnLombokOn { + int x; + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + @lombok.Generated + public int getX() { + return this.x; + } +} diff --git a/test/transform/resource/after-delombok/GeneratedLombokOff.java b/test/transform/resource/after-delombok/GeneratedLombokOff.java deleted file mode 100644 index 59d146a4..00000000 --- a/test/transform/resource/after-delombok/GeneratedLombokOff.java +++ /dev/null @@ -1,8 +0,0 @@ -class GeneratedLombokOff { - int x; - @java.lang.SuppressWarnings("all") - @javax.annotation.Generated("lombok") - public int getX() { - return this.x; - } -} \ No newline at end of file diff --git a/test/transform/resource/after-delombok/GeneratedOff.java b/test/transform/resource/after-delombok/GeneratedOff.java new file mode 100644 index 00000000..0e4ecf7d --- /dev/null +++ b/test/transform/resource/after-delombok/GeneratedOff.java @@ -0,0 +1,7 @@ +class GeneratedOff { + int x; + @java.lang.SuppressWarnings("all") + public int getX() { + return this.x; + } +} diff --git a/test/transform/resource/after-delombok/GeneratedOffJavaxOn.java b/test/transform/resource/after-delombok/GeneratedOffJavaxOn.java new file mode 100644 index 00000000..05c2be09 --- /dev/null +++ b/test/transform/resource/after-delombok/GeneratedOffJavaxOn.java @@ -0,0 +1,8 @@ +class GeneratedOffJavaxOn { + int x; + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public int getX() { + return this.x; + } +} diff --git a/test/transform/resource/after-delombok/GeneratedOffLombokOn.java b/test/transform/resource/after-delombok/GeneratedOffLombokOn.java new file mode 100644 index 00000000..03e23d66 --- /dev/null +++ b/test/transform/resource/after-delombok/GeneratedOffLombokOn.java @@ -0,0 +1,8 @@ +class GeneratedOffLombokOn { + int x; + @java.lang.SuppressWarnings("all") + @lombok.Generated + public int getX() { + return this.x; + } +} diff --git a/test/transform/resource/after-delombok/GetterAccessLevel.java b/test/transform/resource/after-delombok/GetterAccessLevel.java index 2cb70954..31f8a59f 100644 --- a/test/transform/resource/after-delombok/GetterAccessLevel.java +++ b/test/transform/resource/after-delombok/GetterAccessLevel.java @@ -12,56 +12,47 @@ class GetterAccessLevel { String value; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private boolean isPrivate() { return this.isPrivate; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated boolean isPackage() { return this.isPackage; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean isProtected() { return this.isProtected; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isPublic() { return this.isPublic; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private String getPrivateString() { return this.privateString; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated String getPackageString() { return this.packageString; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected String getProtectedString() { return this.protectedString; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getPublicString() { return this.publicString; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getValue() { return this.value; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterAlreadyExists.java b/test/transform/resource/after-delombok/GetterAlreadyExists.java index 556ea4a8..ba2bb5e1 100644 --- a/test/transform/resource/after-delombok/GetterAlreadyExists.java +++ b/test/transform/resource/after-delombok/GetterAlreadyExists.java @@ -5,7 +5,6 @@ class Getter1 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isFoo() { return this.foo; } @@ -29,7 +28,6 @@ class Getter4 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getFoo() { return this.foo; } @@ -41,7 +39,6 @@ class Getter5 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getFoo() { return this.foo; } @@ -59,7 +56,6 @@ class Getter7 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getFoo() { return this.foo; } @@ -71,7 +67,6 @@ class Getter8 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getFoo() { return this.foo; } @@ -89,7 +84,6 @@ class Getter10 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isFoo() { return this.foo; } @@ -113,7 +107,6 @@ class Getter13 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getFoo() { return this.foo; } @@ -125,7 +118,6 @@ class Getter14 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getFoo() { return this.foo; } @@ -143,7 +135,6 @@ class Getter16 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getFoo() { return this.foo; } @@ -155,7 +146,6 @@ class Getter17 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getFoo() { return this.foo; } @@ -165,4 +155,4 @@ class Getter18 { static String getFoo() { return ""; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterBoolean.java b/test/transform/resource/after-delombok/GetterBoolean.java index 567ea94d..d6347abd 100644 --- a/test/transform/resource/after-delombok/GetterBoolean.java +++ b/test/transform/resource/after-delombok/GetterBoolean.java @@ -4,19 +4,16 @@ class Getter { boolean hasBaz; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isFoo() { return this.foo; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isBar() { return this.isBar; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isHasBaz() { return this.hasBaz; } @@ -28,7 +25,6 @@ class MoreGetter { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isFoo() { return this.foo; } @@ -38,4 +34,4 @@ class YetMoreGetter { boolean getFoo() { return true; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterDeprecated.java b/test/transform/resource/after-delombok/GetterDeprecated.java index 09938d56..8bef2b6a 100644 --- a/test/transform/resource/after-delombok/GetterDeprecated.java +++ b/test/transform/resource/after-delombok/GetterDeprecated.java @@ -8,7 +8,6 @@ class GetterDeprecated { @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getAnnotation() { return this.annotation; } @@ -18,8 +17,7 @@ class GetterDeprecated { @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getJavadoc() { return this.javadoc; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterEnum.java b/test/transform/resource/after-delombok/GetterEnum.java index a74a012a..25b5fd8b 100644 --- a/test/transform/resource/after-delombok/GetterEnum.java +++ b/test/transform/resource/after-delombok/GetterEnum.java @@ -4,21 +4,18 @@ enum GetterEnum { private final String name; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private GetterEnum(final int id, final String name) { this.id = id; this.name = name; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getId() { return this.id; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getName() { return this.name; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterLazy.java b/test/transform/resource/after-delombok/GetterLazy.java index a36175fe..2ea3cbf2 100644 --- a/test/transform/resource/after-delombok/GetterLazy.java +++ b/test/transform/resource/after-delombok/GetterLazy.java @@ -4,7 +4,6 @@ class GetterLazy { private final java.util.concurrent.atomic.AtomicReference fieldName = new java.util.concurrent.atomic.AtomicReference(); @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ValueType getFieldName() { java.lang.Object value = this.fieldName.get(); if (value == null) { diff --git a/test/transform/resource/after-delombok/GetterLazyBoolean.java b/test/transform/resource/after-delombok/GetterLazyBoolean.java index bb439e65..41349447 100644 --- a/test/transform/resource/after-delombok/GetterLazyBoolean.java +++ b/test/transform/resource/after-delombok/GetterLazyBoolean.java @@ -7,7 +7,6 @@ class GetterLazyBoolean { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof GetterLazyBoolean)) return false; @@ -18,14 +17,12 @@ class GetterLazyBoolean { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof GetterLazyBoolean; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -35,13 +32,11 @@ class GetterLazyBoolean { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "GetterLazyBoolean(booleanValue=" + this.isBooleanValue() + ")"; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isBooleanValue() { java.lang.Object value = this.booleanValue.get(); if (value == null) { @@ -58,7 +53,6 @@ class GetterLazyBoolean { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isOtherBooleanValue() { java.lang.Object value = this.otherBooleanValue.get(); if (value == null) { diff --git a/test/transform/resource/after-delombok/GetterLazyEahcToString.java b/test/transform/resource/after-delombok/GetterLazyEahcToString.java index 7995663f..495087f9 100644 --- a/test/transform/resource/after-delombok/GetterLazyEahcToString.java +++ b/test/transform/resource/after-delombok/GetterLazyEahcToString.java @@ -6,7 +6,6 @@ class GetterLazyEahcToString { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof GetterLazyEahcToString)) return false; @@ -25,7 +24,6 @@ class GetterLazyEahcToString { @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof GetterLazyEahcToString; } @@ -33,7 +31,6 @@ class GetterLazyEahcToString { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -47,7 +44,6 @@ class GetterLazyEahcToString { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "GetterLazyEahcToString(value=" + this.getValue() + ", value2=" + this.value2 + ")"; } @@ -56,7 +52,6 @@ class GetterLazyEahcToString { @javax.annotation.Generated("lombok") - @lombok.Generated public String getValue() { java.lang.Object value = this.value.get(); if (value == null) { @@ -74,8 +69,7 @@ class GetterLazyEahcToString { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getValue2() { return this.value2; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterLazyInvalid.java b/test/transform/resource/after-delombok/GetterLazyInvalid.java index 2b20c3d4..9e7d5bee 100644 --- a/test/transform/resource/after-delombok/GetterLazyInvalid.java +++ b/test/transform/resource/after-delombok/GetterLazyInvalid.java @@ -14,7 +14,6 @@ class GetterLazyInvalidClass { private final String fieldName = ""; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getFieldName() { return this.fieldName; } @@ -24,4 +23,4 @@ class GetterLazyInvalidNoInit { GetterLazyInvalidNoInit() { this.fieldName = "foo"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterLazyNative.java b/test/transform/resource/after-delombok/GetterLazyNative.java index cd0e0303..0d88558d 100644 --- a/test/transform/resource/after-delombok/GetterLazyNative.java +++ b/test/transform/resource/after-delombok/GetterLazyNative.java @@ -10,7 +10,6 @@ class GetterLazyNative { private final java.util.concurrent.atomic.AtomicReference intArrayField = new java.util.concurrent.atomic.AtomicReference(); @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isBooleanField() { java.lang.Object value = this.booleanField.get(); if (value == null) { @@ -27,7 +26,6 @@ class GetterLazyNative { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public byte getByteField() { java.lang.Object value = this.byteField.get(); if (value == null) { @@ -44,7 +42,6 @@ class GetterLazyNative { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public short getShortField() { java.lang.Object value = this.shortField.get(); if (value == null) { @@ -61,7 +58,6 @@ class GetterLazyNative { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getIntField() { java.lang.Object value = this.intField.get(); if (value == null) { @@ -78,7 +74,6 @@ class GetterLazyNative { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public long getLongField() { java.lang.Object value = this.longField.get(); if (value == null) { @@ -95,7 +90,6 @@ class GetterLazyNative { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public float getFloatField() { java.lang.Object value = this.floatField.get(); if (value == null) { @@ -112,7 +106,6 @@ class GetterLazyNative { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public double getDoubleField() { java.lang.Object value = this.doubleField.get(); if (value == null) { @@ -129,7 +122,6 @@ class GetterLazyNative { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public char getCharField() { java.lang.Object value = this.charField.get(); if (value == null) { @@ -146,7 +138,6 @@ class GetterLazyNative { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int[] getIntArrayField() { java.lang.Object value = this.intArrayField.get(); if (value == null) { diff --git a/test/transform/resource/after-delombok/GetterLazyTransient.java b/test/transform/resource/after-delombok/GetterLazyTransient.java index a3327a6e..dbebad90 100644 --- a/test/transform/resource/after-delombok/GetterLazyTransient.java +++ b/test/transform/resource/after-delombok/GetterLazyTransient.java @@ -4,7 +4,6 @@ class GetterLazyTransient { private final transient int nonLazyTransientField = 3; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getNonTransientField() { java.lang.Object value = this.nonTransientField.get(); if (value == null) { @@ -21,7 +20,6 @@ class GetterLazyTransient { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getNonLazyTransientField() { return this.nonLazyTransientField; } diff --git a/test/transform/resource/after-delombok/GetterNone.java b/test/transform/resource/after-delombok/GetterNone.java index a24b04fa..2ff386a2 100644 --- a/test/transform/resource/after-delombok/GetterNone.java +++ b/test/transform/resource/after-delombok/GetterNone.java @@ -3,8 +3,7 @@ class GetterNone { int foo; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getI() { return this.i; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterOnClass.java b/test/transform/resource/after-delombok/GetterOnClass.java index a9d1280c..3a7c76a0 100644 --- a/test/transform/resource/after-delombok/GetterOnClass.java +++ b/test/transform/resource/after-delombok/GetterOnClass.java @@ -3,7 +3,6 @@ class GetterOnClass1 { boolean isPublic; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isPublic() { return this.isPublic; } @@ -14,13 +13,11 @@ class GetterOnClass2 { boolean isPackage; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean isProtected() { return this.isProtected; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated boolean isPackage() { return this.isPackage; } @@ -30,7 +27,6 @@ class GetterOnClass3 { boolean isPackage; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated boolean isPackage() { return this.isPackage; } @@ -40,7 +36,6 @@ class GetterOnClass4 { boolean isPrivate; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private boolean isPrivate() { return this.isPrivate; } @@ -50,7 +45,6 @@ class GetterOnClass5 { boolean isPublic; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean isPublic() { return this.isPublic; } @@ -61,15 +55,13 @@ class GetterOnClass6 { String nonNull; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getCouldBeNull() { return this.couldBeNull; } @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getNonNull() { return this.nonNull; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterOnMethod.java b/test/transform/resource/after-delombok/GetterOnMethod.java index 8496e984..37ae83a4 100644 --- a/test/transform/resource/after-delombok/GetterOnMethod.java +++ b/test/transform/resource/after-delombok/GetterOnMethod.java @@ -7,7 +7,6 @@ class GetterOnMethod { @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getI() { return this.i; } @@ -15,7 +14,6 @@ class GetterOnMethod { @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getJ() { return this.j; } @@ -23,7 +21,6 @@ class GetterOnMethod { @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getK() { return this.k; } diff --git a/test/transform/resource/after-delombok/GetterOnMethodErrors.java b/test/transform/resource/after-delombok/GetterOnMethodErrors.java index 55949391..b7fe82c2 100644 --- a/test/transform/resource/after-delombok/GetterOnMethodErrors.java +++ b/test/transform/resource/after-delombok/GetterOnMethodErrors.java @@ -4,8 +4,7 @@ class GetterOnMethodErrors { private int test; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getTest() { return this.test; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterOnMethodErrors2.java b/test/transform/resource/after-delombok/GetterOnMethodErrors2.java index 2ef4ac8e..3114d23d 100644 --- a/test/transform/resource/after-delombok/GetterOnMethodErrors2.java +++ b/test/transform/resource/after-delombok/GetterOnMethodErrors2.java @@ -11,45 +11,38 @@ class GetterOnMethodErrors2 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getBad1() { return this.bad1; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getBad2() { return this.bad2; } @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getBad3() { return this.bad3; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getBad4() { return this.bad4; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getGood1() { return this.good1; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getGood2() { return this.good2; } @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getGood3() { return this.good3; } @@ -57,7 +50,6 @@ class GetterOnMethodErrors2 { @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getGood4() { return this.good4; } diff --git a/test/transform/resource/after-delombok/GetterOnStatic.java b/test/transform/resource/after-delombok/GetterOnStatic.java index d7ddca69..34c2dba1 100644 --- a/test/transform/resource/after-delombok/GetterOnStatic.java +++ b/test/transform/resource/after-delombok/GetterOnStatic.java @@ -3,13 +3,11 @@ class Getter { static int bar; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static boolean isFoo() { return Getter.foo; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static int getBar() { return Getter.bar; } diff --git a/test/transform/resource/after-delombok/GetterPlain.java b/test/transform/resource/after-delombok/GetterPlain.java index d489d63e..9af44b04 100644 --- a/test/transform/resource/after-delombok/GetterPlain.java +++ b/test/transform/resource/after-delombok/GetterPlain.java @@ -3,14 +3,12 @@ class GetterPlain { int foo; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getI() { return this.i; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getFoo() { return this.foo; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/GetterSetterJavadoc.java b/test/transform/resource/after-delombok/GetterSetterJavadoc.java index 21b339e8..f156de92 100644 --- a/test/transform/resource/after-delombok/GetterSetterJavadoc.java +++ b/test/transform/resource/after-delombok/GetterSetterJavadoc.java @@ -5,7 +5,6 @@ class GetterSetterJavadoc1 { private int fieldName; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public GetterSetterJavadoc1() { } /** @@ -15,7 +14,6 @@ class GetterSetterJavadoc1 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getFieldName() { return this.fieldName; } @@ -26,14 +24,12 @@ class GetterSetterJavadoc1 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setFieldName(final int fieldName) { this.fieldName = fieldName; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof GetterSetterJavadoc1)) return false; @@ -44,14 +40,12 @@ class GetterSetterJavadoc1 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof GetterSetterJavadoc1; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -61,7 +55,6 @@ class GetterSetterJavadoc1 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "GetterSetterJavadoc1(fieldName=" + this.getFieldName() + ")"; } @@ -78,7 +71,6 @@ class GetterSetterJavadoc2 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getFieldName() { return this.fieldName; } @@ -89,7 +81,6 @@ class GetterSetterJavadoc2 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setFieldName(final int fieldName) { this.fieldName = fieldName; } @@ -105,7 +96,6 @@ class GetterSetterJavadoc3 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getFieldName() { return this.fieldName; } @@ -115,7 +105,6 @@ class GetterSetterJavadoc3 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setFieldName(final int fieldName) { this.fieldName = fieldName; } @@ -132,7 +121,6 @@ class GetterSetterJavadoc4 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int fieldName() { return this.fieldName; } @@ -144,7 +132,6 @@ class GetterSetterJavadoc4 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public GetterSetterJavadoc4 fieldName(final int fieldName) { this.fieldName = fieldName; return this; @@ -161,7 +148,6 @@ class GetterSetterJavadoc5 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int fieldName() { return this.fieldName; } @@ -172,7 +158,6 @@ class GetterSetterJavadoc5 { */ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public GetterSetterJavadoc5 fieldName(final int fieldName) { this.fieldName = fieldName; return this; diff --git a/test/transform/resource/after-delombok/GetterWithDollar.java b/test/transform/resource/after-delombok/GetterWithDollar.java index 5ee3774f..60625e6d 100644 --- a/test/transform/resource/after-delombok/GetterWithDollar.java +++ b/test/transform/resource/after-delombok/GetterWithDollar.java @@ -2,7 +2,6 @@ class GetterWithDollar1 { int $i; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int get$i() { return this.$i; } @@ -12,14 +11,12 @@ class GetterWithDollar2 { int i; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int get$i() { return this.$i; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getI() { return this.i; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/InjectField.java b/test/transform/resource/after-delombok/InjectField.java index 5adc5074..9da58db4 100644 --- a/test/transform/resource/after-delombok/InjectField.java +++ b/test/transform/resource/after-delombok/InjectField.java @@ -7,15 +7,12 @@ enum InjectField1 { @javax.annotation.Generated("lombok") - @lombok.Generated private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField1.class.getName()); @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private final java.lang.Object $lock = new java.lang.Object[0]; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final java.lang.Object $LOCK = new java.lang.Object[0]; private static final String LOG_MESSAGE = "static initializer"; @@ -44,11 +41,9 @@ enum InjectField1 { class InjectField2 { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField2.class.getName()); @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private final java.lang.Object $lock = new java.lang.Object[0]; private static final String LOG_MESSAGE = "static initializer"; @@ -67,9 +62,8 @@ class InjectField2 { class InjectField3 { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField3.class.getName()); static { log.log(Level.FINE, "static initializer"); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerCommons.java b/test/transform/resource/after-delombok/LoggerCommons.java index 613c8c99..3cb26794 100644 --- a/test/transform/resource/after-delombok/LoggerCommons.java +++ b/test/transform/resource/after-delombok/LoggerCommons.java @@ -1,18 +1,15 @@ class LoggerCommons { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LoggerCommons.class); } class LoggerCommonsWithImport { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LoggerCommonsWithImport.class); } class LoggerCommonsWithDifferentName { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog("DifferentName"); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerConfig.java b/test/transform/resource/after-delombok/LoggerConfig.java index ab7671c6..1fa6cb2f 100644 --- a/test/transform/resource/after-delombok/LoggerConfig.java +++ b/test/transform/resource/after-delombok/LoggerConfig.java @@ -1,6 +1,5 @@ class LoggerWithConfig { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private final org.slf4j.Logger myLogger = org.slf4j.LoggerFactory.getLogger(LoggerWithConfig.class); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerJBossLog.java b/test/transform/resource/after-delombok/LoggerJBossLog.java index 2c62da68..864b39fe 100644 --- a/test/transform/resource/after-delombok/LoggerJBossLog.java +++ b/test/transform/resource/after-delombok/LoggerJBossLog.java @@ -1,20 +1,17 @@ class LoggerJBossLog { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLog.class); } class LoggerJBossLogWithImport { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggerJBossLogWithImport.class); } class LoggerJBossLogOuter { static class Inner { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(Inner.class); } } @@ -22,6 +19,5 @@ class LoggerJBossLogOuter { class LoggerJBossLogWithDifferentLoggerName { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger("DifferentLogger"); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerJul.java b/test/transform/resource/after-delombok/LoggerJul.java index 66bb5099..80659477 100644 --- a/test/transform/resource/after-delombok/LoggerJul.java +++ b/test/transform/resource/after-delombok/LoggerJul.java @@ -1,18 +1,15 @@ class LoggerJul { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LoggerJul.class.getName()); } class LoggerJulWithImport { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LoggerJulWithImport.class.getName()); } class LoggerJulWithDifferentName { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger("DifferentName"); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerLog4j.java b/test/transform/resource/after-delombok/LoggerLog4j.java index e161c9fe..35c2e42c 100644 --- a/test/transform/resource/after-delombok/LoggerLog4j.java +++ b/test/transform/resource/after-delombok/LoggerLog4j.java @@ -1,18 +1,15 @@ class LoggerLog4j { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LoggerLog4j.class); } class LoggerLog4jWithImport { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LoggerLog4jWithImport.class); } class LoggerLog4jWithDifferentName { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("DifferentName"); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerLog4j2.java b/test/transform/resource/after-delombok/LoggerLog4j2.java index f0ae54db..70a09645 100644 --- a/test/transform/resource/after-delombok/LoggerLog4j2.java +++ b/test/transform/resource/after-delombok/LoggerLog4j2.java @@ -1,18 +1,15 @@ class LoggerLog4j2 { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger(LoggerLog4j2.class); } class LoggerLog4j2WithImport { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger(LoggerLog4j2WithImport.class); } class LoggerLog4j2WithDifferentName { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger("DifferentName"); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerSlf4j.java b/test/transform/resource/after-delombok/LoggerSlf4j.java index 3178bd63..a00bca40 100644 --- a/test/transform/resource/after-delombok/LoggerSlf4j.java +++ b/test/transform/resource/after-delombok/LoggerSlf4j.java @@ -1,20 +1,17 @@ class LoggerSlf4j { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4j.class); } class LoggerSlf4jWithImport { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithImport.class); } class LoggerSlf4jOuter { static class Inner { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(Inner.class); } } @@ -22,6 +19,5 @@ class LoggerSlf4jOuter { class LoggerSlf4jWithDifferentLoggerName { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger("DifferentLogger"); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerSlf4jAlreadyExists.java b/test/transform/resource/after-delombok/LoggerSlf4jAlreadyExists.java index a7cd9409..2b9e4bcb 100644 --- a/test/transform/resource/after-delombok/LoggerSlf4jAlreadyExists.java +++ b/test/transform/resource/after-delombok/LoggerSlf4jAlreadyExists.java @@ -1,3 +1,3 @@ class LoggerSlf4jAlreadyExists { int log; -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerSlf4jTypes.java b/test/transform/resource/after-delombok/LoggerSlf4jTypes.java index 0fa5615d..1a13f7a2 100644 --- a/test/transform/resource/after-delombok/LoggerSlf4jTypes.java +++ b/test/transform/resource/after-delombok/LoggerSlf4jTypes.java @@ -6,21 +6,18 @@ enum LoggerSlf4jTypesEnum { ; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jTypesEnum.class); } enum LoggerSlf4jTypesEnumWithElement { FOO; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jTypesEnumWithElement.class); } interface LoggerSlf4jTypesInterfaceOuter { class Inner { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(Inner.class); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/LoggerSlf4jWithPackage.java b/test/transform/resource/after-delombok/LoggerSlf4jWithPackage.java index b83a1140..8a1d543f 100644 --- a/test/transform/resource/after-delombok/LoggerSlf4jWithPackage.java +++ b/test/transform/resource/after-delombok/LoggerSlf4jWithPackage.java @@ -2,14 +2,12 @@ package before; class LoggerSlf4jWithPackage { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithPackage.class); } class LoggerSlf4jWithPackageOuter { static class Inner { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(Inner.class); } } diff --git a/test/transform/resource/after-delombok/LoggerXSlf4j.java b/test/transform/resource/after-delombok/LoggerXSlf4j.java index 7da0247c..6940d69f 100644 --- a/test/transform/resource/after-delombok/LoggerXSlf4j.java +++ b/test/transform/resource/after-delombok/LoggerXSlf4j.java @@ -1,18 +1,15 @@ class LoggerXSlf4j { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger(LoggerXSlf4j.class); } class LoggerXSlf4jWithImport { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger(LoggerXSlf4jWithImport.class); } class LoggerXSlf4jWithDifferentName { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger("DifferentName"); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/MixGetterVal.java b/test/transform/resource/after-delombok/MixGetterVal.java index d5c36f39..fc178113 100644 --- a/test/transform/resource/after-delombok/MixGetterVal.java +++ b/test/transform/resource/after-delombok/MixGetterVal.java @@ -10,8 +10,7 @@ class MixGetterVal { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/MultiFieldGetter.java b/test/transform/resource/after-delombok/MultiFieldGetter.java index 9d21e7f0..6488d9dc 100644 --- a/test/transform/resource/after-delombok/MultiFieldGetter.java +++ b/test/transform/resource/after-delombok/MultiFieldGetter.java @@ -3,13 +3,11 @@ class MultiFieldGetter { int y; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected int getY() { return this.y; } @@ -19,14 +17,12 @@ class MultiFieldGetter2 { int y; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated int getY() { return this.y; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/NoArgsConstructorForce.java b/test/transform/resource/after-delombok/NoArgsConstructorForce.java index f0071a31..5b6c6357 100644 --- a/test/transform/resource/after-delombok/NoArgsConstructorForce.java +++ b/test/transform/resource/after-delombok/NoArgsConstructorForce.java @@ -6,10 +6,9 @@ public class NoArgsConstructorForce { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public NoArgsConstructorForce() { this.i = null; this.o = null; this.fullQualifiedList = null; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java b/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java index e0330bd6..62fd878a 100644 --- a/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java +++ b/test/transform/resource/after-delombok/NonNullOnParameterAbstract.java @@ -7,4 +7,4 @@ abstract class NonNullOnParameterAbstract { } public abstract void test2(@lombok.NonNull String arg); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/NonNullPlain.java b/test/transform/resource/after-delombok/NonNullPlain.java index 46f7699d..52a80c1a 100644 --- a/test/transform/resource/after-delombok/NonNullPlain.java +++ b/test/transform/resource/after-delombok/NonNullPlain.java @@ -13,7 +13,6 @@ class NonNullPlain { @java.beans.ConstructorProperties({"i", "s"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public NonNullPlain(@lombok.NonNull final int i, @lombok.NonNull final String s) { if (s == null) { throw new java.lang.NullPointerException("s"); @@ -24,32 +23,27 @@ class NonNullPlain { @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getI() { return this.i; } @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getS() { return this.s; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Object getO() { return this.o; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setI(@lombok.NonNull final int i) { this.i = i; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setS(@lombok.NonNull final String s) { if (s == null) { throw new java.lang.NullPointerException("s"); @@ -58,7 +52,6 @@ class NonNullPlain { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setO(final Object o) { this.o = o; } diff --git a/test/transform/resource/after-delombok/NonNullWithAlternateException.java b/test/transform/resource/after-delombok/NonNullWithAlternateException.java index 1c0179c0..a5c0a2bc 100644 --- a/test/transform/resource/after-delombok/NonNullWithAlternateException.java +++ b/test/transform/resource/after-delombok/NonNullWithAlternateException.java @@ -9,11 +9,10 @@ public class NonNullWithAlternateException { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setTest(@lombok.NonNull final String test) { if (test == null) { throw new java.lang.IllegalArgumentException("test is null"); } this.test = test; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/NonNullWithSneakyThrows.java b/test/transform/resource/after-delombok/NonNullWithSneakyThrows.java index 91646468..97de0d8a 100644 --- a/test/transform/resource/after-delombok/NonNullWithSneakyThrows.java +++ b/test/transform/resource/after-delombok/NonNullWithSneakyThrows.java @@ -9,4 +9,4 @@ class NonNullWithSneakyThrows { throw lombok.Lombok.sneakyThrow($ex); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SetterAccessLevel.java b/test/transform/resource/after-delombok/SetterAccessLevel.java index eff16797..b9f9466b 100644 --- a/test/transform/resource/after-delombok/SetterAccessLevel.java +++ b/test/transform/resource/after-delombok/SetterAccessLevel.java @@ -7,32 +7,27 @@ class SetterAccessLevel { boolean value; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private void setPrivate(final boolean isPrivate) { this.isPrivate = isPrivate; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated void setPackage(final boolean isPackage) { this.isPackage = isPackage; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected void setProtected(final boolean isProtected) { this.isProtected = isProtected; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setPublic(final boolean isPublic) { this.isPublic = isPublic; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setValue(final boolean value) { this.value = value; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SetterAlreadyExists.java b/test/transform/resource/after-delombok/SetterAlreadyExists.java index 5f492d07..1ff9fdcc 100644 --- a/test/transform/resource/after-delombok/SetterAlreadyExists.java +++ b/test/transform/resource/after-delombok/SetterAlreadyExists.java @@ -24,7 +24,6 @@ class Setter5 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setFoo(final String foo) { this.foo = foo; } @@ -35,7 +34,6 @@ class Setter6 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setFoo(final String foo) { this.foo = foo; } @@ -54,4 +52,4 @@ class Setter9 { boolean isFoo; void setFoo(boolean foo) { } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SetterDeprecated.java b/test/transform/resource/after-delombok/SetterDeprecated.java index 9d19d06c..115096be 100644 --- a/test/transform/resource/after-delombok/SetterDeprecated.java +++ b/test/transform/resource/after-delombok/SetterDeprecated.java @@ -8,7 +8,6 @@ class SetterDeprecated { @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setAnnotation(final int annotation) { this.annotation = annotation; } @@ -18,8 +17,7 @@ class SetterDeprecated { @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setJavadoc(final int javadoc) { this.javadoc = javadoc; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SetterOnClass.java b/test/transform/resource/after-delombok/SetterOnClass.java index 2821ed05..9c376d43 100644 --- a/test/transform/resource/after-delombok/SetterOnClass.java +++ b/test/transform/resource/after-delombok/SetterOnClass.java @@ -3,7 +3,6 @@ class SetterOnClass1 { boolean isPublic; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setPublic(final boolean isPublic) { this.isPublic = isPublic; } @@ -14,13 +13,11 @@ class SetterOnClass2 { boolean isPackage; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected void setProtected(final boolean isProtected) { this.isProtected = isProtected; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated void setPackage(final boolean isPackage) { this.isPackage = isPackage; } @@ -30,7 +27,6 @@ class SetterOnClass3 { boolean isPackage; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated void setPackage(final boolean isPackage) { this.isPackage = isPackage; } @@ -40,7 +36,6 @@ class SetterOnClass4 { boolean isPrivate; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private void setPrivate(final boolean isPrivate) { this.isPrivate = isPrivate; } @@ -50,7 +45,6 @@ class SetterOnClass5 { boolean isPublic; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setPublic(final boolean isPublic) { this.isPublic = isPublic; } @@ -61,17 +55,15 @@ class SetterOnClass6 { String nonNull; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setCouldBeNull(final String couldBeNull) { this.couldBeNull = couldBeNull; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setNonNull(@lombok.NonNull final String nonNull) { if (nonNull == null) { throw new java.lang.NullPointerException("nonNull"); } this.nonNull = nonNull; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SetterOnMethodOnParam.java b/test/transform/resource/after-delombok/SetterOnMethodOnParam.java index b9da6342..c166f936 100644 --- a/test/transform/resource/after-delombok/SetterOnMethodOnParam.java +++ b/test/transform/resource/after-delombok/SetterOnMethodOnParam.java @@ -7,7 +7,6 @@ class SetterOnMethodOnParam { @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setI(final int i) { this.i = i; } @@ -15,7 +14,6 @@ class SetterOnMethodOnParam { @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setJ(@Test final int j) { this.j = j; } @@ -23,7 +21,6 @@ class SetterOnMethodOnParam { @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setK(@Test final int k) { this.k = k; } diff --git a/test/transform/resource/after-delombok/SetterOnStatic.java b/test/transform/resource/after-delombok/SetterOnStatic.java index 4612df2b..a1947b36 100644 --- a/test/transform/resource/after-delombok/SetterOnStatic.java +++ b/test/transform/resource/after-delombok/SetterOnStatic.java @@ -3,13 +3,11 @@ class Setter { static int bar; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static void setFoo(final boolean foo) { Setter.foo = foo; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public static void setBar(final int bar) { Setter.bar = bar; } diff --git a/test/transform/resource/after-delombok/SetterPlain.java b/test/transform/resource/after-delombok/SetterPlain.java index 3aaf89d5..19acc392 100644 --- a/test/transform/resource/after-delombok/SetterPlain.java +++ b/test/transform/resource/after-delombok/SetterPlain.java @@ -3,14 +3,12 @@ class SetterPlain { int foo; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setI(final int i) { this.i = i; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setFoo(final int foo) { this.foo = foo; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SetterWithDollar.java b/test/transform/resource/after-delombok/SetterWithDollar.java index cd8b0f21..fdcbfe75 100644 --- a/test/transform/resource/after-delombok/SetterWithDollar.java +++ b/test/transform/resource/after-delombok/SetterWithDollar.java @@ -5,7 +5,6 @@ class SetterWithDollar1 { @javax.annotation.Generated("lombok") - @lombok.Generated public void set$i(final int $i) { this.$i = $i; } @@ -18,14 +17,12 @@ class SetterWithDollar2 { @javax.annotation.Generated("lombok") - @lombok.Generated public void set$i(final int $i) { this.$i = $i; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public void setI(final int i) { this.i = i; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SimpleTypeResolution.java b/test/transform/resource/after-delombok/SimpleTypeResolution.java index 0360e80e..1e45bb79 100644 --- a/test/transform/resource/after-delombok/SimpleTypeResolution.java +++ b/test/transform/resource/after-delombok/SimpleTypeResolution.java @@ -6,7 +6,6 @@ class SimpleTypeResolutionSuccess { private int x; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } diff --git a/test/transform/resource/after-delombok/SneakyThrowsMultiple.java b/test/transform/resource/after-delombok/SneakyThrowsMultiple.java index 42b275c6..5faca0a1 100644 --- a/test/transform/resource/after-delombok/SneakyThrowsMultiple.java +++ b/test/transform/resource/after-delombok/SneakyThrowsMultiple.java @@ -42,4 +42,4 @@ class SneakyThrowsMultiple { throw lombok.Lombok.sneakyThrow($ex); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SneakyThrowsPlain.java b/test/transform/resource/after-delombok/SneakyThrowsPlain.java index f712ab55..86f7790c 100644 --- a/test/transform/resource/after-delombok/SneakyThrowsPlain.java +++ b/test/transform/resource/after-delombok/SneakyThrowsPlain.java @@ -28,4 +28,4 @@ class SneakyThrowsPlain { throw lombok.Lombok.sneakyThrow($ex); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SneakyThrowsSingle.java b/test/transform/resource/after-delombok/SneakyThrowsSingle.java index 8901f827..24b4566a 100644 --- a/test/transform/resource/after-delombok/SneakyThrowsSingle.java +++ b/test/transform/resource/after-delombok/SneakyThrowsSingle.java @@ -23,4 +23,4 @@ class SneakyThrowsSingle { throw lombok.Lombok.sneakyThrow($ex); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SynchronizedName.java b/test/transform/resource/after-delombok/SynchronizedName.java index ab3c0431..91fd7ea7 100644 --- a/test/transform/resource/after-delombok/SynchronizedName.java +++ b/test/transform/resource/after-delombok/SynchronizedName.java @@ -17,4 +17,4 @@ class SynchronizedName { System.out.println("five"); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SynchronizedNameNoSuchField.java b/test/transform/resource/after-delombok/SynchronizedNameNoSuchField.java index d252985f..73ce25ec 100644 --- a/test/transform/resource/after-delombok/SynchronizedNameNoSuchField.java +++ b/test/transform/resource/after-delombok/SynchronizedNameNoSuchField.java @@ -4,4 +4,4 @@ class SynchronizedNameNoSuchField { void test2() { System.out.println("two"); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java b/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java index 8441570b..effa036f 100644 --- a/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java +++ b/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java @@ -6,4 +6,4 @@ class SynchronizedNameStaticToInstanceRef { System.out.println("three"); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/SynchronizedPlain.java b/test/transform/resource/after-delombok/SynchronizedPlain.java index 4e9ecac1..229d261a 100644 --- a/test/transform/resource/after-delombok/SynchronizedPlain.java +++ b/test/transform/resource/after-delombok/SynchronizedPlain.java @@ -1,7 +1,6 @@ class SynchronizedPlain1 { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private final java.lang.Object $lock = new java.lang.Object[0]; void test() { synchronized (this.$lock) { @@ -17,7 +16,6 @@ class SynchronizedPlain1 { class SynchronizedPlain2 { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private static final java.lang.Object $LOCK = new java.lang.Object[0]; static void test() { synchronized (SynchronizedPlain2.$LOCK) { @@ -29,4 +27,4 @@ class SynchronizedPlain2 { System.out.println("four"); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ToStringConfiguration.java b/test/transform/resource/after-delombok/ToStringConfiguration.java index 85d02c61..1baabebd 100644 --- a/test/transform/resource/after-delombok/ToStringConfiguration.java +++ b/test/transform/resource/after-delombok/ToStringConfiguration.java @@ -3,13 +3,11 @@ class ToStringConfiguration { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ToStringConfiguration(" + this.x + ")"; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @@ -19,7 +17,6 @@ class ToStringConfiguration2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ToStringConfiguration2(x=" + this.x + ")"; } @@ -29,14 +26,12 @@ class ToStringConfiguration3 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ToStringConfiguration3(" + this.getX() + ")"; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ToStringInner.java b/test/transform/resource/after-delombok/ToStringInner.java index 095b8c05..ef14bcde 100644 --- a/test/transform/resource/after-delombok/ToStringInner.java +++ b/test/transform/resource/after-delombok/ToStringInner.java @@ -6,7 +6,6 @@ class ToStringOuter { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ToStringOuter.ToStringInner(y=" + this.y + ")"; } @@ -16,7 +15,6 @@ class ToStringOuter { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ToStringOuter.ToStringStaticInner(y=" + this.y + ")"; } @@ -27,7 +25,6 @@ class ToStringOuter { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ToStringOuter.ToStringMiddle.ToStringMoreInner(name=" + this.name + ")"; } @@ -37,8 +34,7 @@ class ToStringOuter { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ToStringOuter(x=" + this.x + ", name=" + this.name + ")"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ToStringPlain.java b/test/transform/resource/after-delombok/ToStringPlain.java index 07bb0a87..bf0ef419 100644 --- a/test/transform/resource/after-delombok/ToStringPlain.java +++ b/test/transform/resource/after-delombok/ToStringPlain.java @@ -4,7 +4,6 @@ class ToString1 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ToString1(x=" + this.x + ", name=" + this.name + ")"; } @@ -15,8 +14,7 @@ class ToString2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ToString2(x=" + this.x + ", name=" + this.name + ")"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/Tolerate.java b/test/transform/resource/after-delombok/Tolerate.java index 089f732f..e56979dc 100644 --- a/test/transform/resource/after-delombok/Tolerate.java +++ b/test/transform/resource/after-delombok/Tolerate.java @@ -13,7 +13,6 @@ class Tolerate { @javax.annotation.Generated("lombok") - @lombok.Generated public void setPattern(final Pattern pattern) { this.pattern = pattern; } @@ -22,7 +21,6 @@ class Tolerate { @javax.annotation.Generated("lombok") - @lombok.Generated public Pattern getPattern() { return this.pattern; } @@ -43,7 +41,6 @@ class Tolerate2 { @javax.annotation.Generated("lombok") - @lombok.Generated public Pattern getPattern() { return this.pattern; } @@ -52,7 +49,6 @@ class Tolerate2 { @javax.annotation.Generated("lombok") - @lombok.Generated public Tolerate2 withPattern(final Pattern pattern) { return this.pattern == pattern ? this : new Tolerate2(pattern); } @@ -60,7 +56,6 @@ class Tolerate2 { @java.beans.ConstructorProperties({"pattern"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Tolerate2(final Pattern pattern) { this.pattern = pattern; } diff --git a/test/transform/resource/after-delombok/TrickyTypeResolution.java b/test/transform/resource/after-delombok/TrickyTypeResolution.java index 05a31da6..6badfbf4 100644 --- a/test/transform/resource/after-delombok/TrickyTypeResolution.java +++ b/test/transform/resource/after-delombok/TrickyTypeResolution.java @@ -15,7 +15,6 @@ class TrickySuccess { int x; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } diff --git a/test/transform/resource/after-delombok/UtilityClass.java b/test/transform/resource/after-delombok/UtilityClass.java index 80bb1b7c..32e47557 100644 --- a/test/transform/resource/after-delombok/UtilityClass.java +++ b/test/transform/resource/after-delombok/UtilityClass.java @@ -8,7 +8,6 @@ final class UtilityClass { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private UtilityClass() { throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); } @@ -19,7 +18,6 @@ class UtilityInner { static int member; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private InnerInnerInner() { throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); } @@ -31,7 +29,6 @@ class UtilityInner { static int member; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private InsideEnum() { throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); } @@ -42,10 +39,9 @@ class UtilityInner { static int member; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private InsideInterface() { throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); } } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/UtilityClassErrors.java b/test/transform/resource/after-delombok/UtilityClassErrors.java index 072edf91..5181b750 100644 --- a/test/transform/resource/after-delombok/UtilityClassErrors.java +++ b/test/transform/resource/after-delombok/UtilityClassErrors.java @@ -16,4 +16,4 @@ class UtilityClassErrors3 { private String member; } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValComplex.java b/test/transform/resource/after-delombok/ValComplex.java index 0df87fac..e0dfe1b7 100644 --- a/test/transform/resource/after-delombok/ValComplex.java +++ b/test/transform/resource/after-delombok/ValComplex.java @@ -17,4 +17,4 @@ public class ValComplex { } final java.lang.String shouldBeString = field; //Unshadowing } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValDefault.java b/test/transform/resource/after-delombok/ValDefault.java index 8c85311b..74376dbb 100644 --- a/test/transform/resource/after-delombok/ValDefault.java +++ b/test/transform/resource/after-delombok/ValDefault.java @@ -5,4 +5,4 @@ interface ValDefault { final int x = 1; final int size = size(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValErrors.java b/test/transform/resource/after-delombok/ValErrors.java index 770a7e95..f8365c2d 100644 --- a/test/transform/resource/after-delombok/ValErrors.java +++ b/test/transform/resource/after-delombok/ValErrors.java @@ -5,4 +5,4 @@ public class ValErrors { public void arrayInitializer() { val e = {"foo", "bar"}; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValFinal.java b/test/transform/resource/after-delombok/ValFinal.java index d35ca713..6be08565 100644 --- a/test/transform/resource/after-delombok/ValFinal.java +++ b/test/transform/resource/after-delombok/ValFinal.java @@ -2,4 +2,4 @@ public class ValFinal { public void test() { final int x = 10; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValInBasicFor.java b/test/transform/resource/after-delombok/ValInBasicFor.java index e21450e1..a3746b23 100644 --- a/test/transform/resource/after-delombok/ValInBasicFor.java +++ b/test/transform/resource/after-delombok/ValInBasicFor.java @@ -6,4 +6,4 @@ public class ValInBasicFor { System.out.println(""); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValInFor.java b/test/transform/resource/after-delombok/ValInFor.java index de75803b..5cb15e1a 100644 --- a/test/transform/resource/after-delombok/ValInFor.java +++ b/test/transform/resource/after-delombok/ValInFor.java @@ -6,4 +6,4 @@ public class ValInFor { final java.lang.String shouldBeString2 = shouldBeString; } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValInMultiDeclaration.java b/test/transform/resource/after-delombok/ValInMultiDeclaration.java index 32f689c7..d1074174 100644 --- a/test/transform/resource/after-delombok/ValInMultiDeclaration.java +++ b/test/transform/resource/after-delombok/ValInMultiDeclaration.java @@ -3,4 +3,4 @@ public class ValInMultiDeclaration { final int x = 10; final java.lang.String y = ""; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValLambda.java b/test/transform/resource/after-delombok/ValLambda.java index 40b056f3..9214b490 100644 --- a/test/transform/resource/after-delombok/ValLambda.java +++ b/test/transform/resource/after-delombok/ValLambda.java @@ -18,4 +18,4 @@ class ValLambda { // Runnable foo = (Runnable) ((System.currentTimeMillis() > 0) ? () -> {} : System.out::println); // lombok.val foo = (Runnable) ((System.currentTimeMillis() > 0) ? () -> {} : System.out::println); // } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValLessSimple.java b/test/transform/resource/after-delombok/ValLessSimple.java index d06c66ec..5edd5056 100644 --- a/test/transform/resource/after-delombok/ValLessSimple.java +++ b/test/transform/resource/after-delombok/ValLessSimple.java @@ -30,4 +30,4 @@ public class ValLessSimple { } } private String field = "field"; -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValLub.java b/test/transform/resource/after-delombok/ValLub.java index d7e8f944..e0847cec 100644 --- a/test/transform/resource/after-delombok/ValLub.java +++ b/test/transform/resource/after-delombok/ValLub.java @@ -15,4 +15,4 @@ class ValLub { thisShouldBeCollection.add(""); String foo = thisShouldBeCollection.iterator().next(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValNullInit.java b/test/transform/resource/after-delombok/ValNullInit.java index f0834a63..91818083 100644 --- a/test/transform/resource/after-delombok/ValNullInit.java +++ b/test/transform/resource/after-delombok/ValNullInit.java @@ -2,4 +2,4 @@ class ValNullInit { void method() { final java.lang.Object x = null; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValRawType.java b/test/transform/resource/after-delombok/ValRawType.java index 122eabda..2e638f98 100644 --- a/test/transform/resource/after-delombok/ValRawType.java +++ b/test/transform/resource/after-delombok/ValRawType.java @@ -17,4 +17,4 @@ public class ValRawType { static class Attribute { } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValWeirdTypes.java b/test/transform/resource/after-delombok/ValWeirdTypes.java index 996ce662..cd6ba538 100644 --- a/test/transform/resource/after-delombok/ValWeirdTypes.java +++ b/test/transform/resource/after-delombok/ValWeirdTypes.java @@ -54,4 +54,4 @@ public class ValWeirdTypes { final java.lang.Object[] single = multiDimArray[0]; final int singleInt = copy[0]; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValWithLabel.java b/test/transform/resource/after-delombok/ValWithLabel.java index 4d8eabf2..2d046e93 100644 --- a/test/transform/resource/after-delombok/ValWithLabel.java +++ b/test/transform/resource/after-delombok/ValWithLabel.java @@ -7,4 +7,4 @@ public class ValWithLabel { } } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValueCallSuper.java b/test/transform/resource/after-delombok/ValueCallSuper.java index 79dcead3..e0065885 100644 --- a/test/transform/resource/after-delombok/ValueCallSuper.java +++ b/test/transform/resource/after-delombok/ValueCallSuper.java @@ -3,13 +3,11 @@ class ValueParent { final class ValueCallSuper extends ValueParent { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ValueCallSuper() { } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof ValueCallSuper)) return false; @@ -20,14 +18,12 @@ final class ValueCallSuper extends ValueParent { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof ValueCallSuper; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -37,7 +33,6 @@ final class ValueCallSuper extends ValueParent { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ValueCallSuper()"; } diff --git a/test/transform/resource/after-delombok/ValueExperimental.java b/test/transform/resource/after-delombok/ValueExperimental.java index 723cfe87..95803228 100644 --- a/test/transform/resource/after-delombok/ValueExperimental.java +++ b/test/transform/resource/after-delombok/ValueExperimental.java @@ -1,13 +1,11 @@ final class ValueExperimental1 { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ValueExperimental1() { } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof ValueExperimental1)) return false; @@ -16,7 +14,6 @@ final class ValueExperimental1 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -24,7 +21,6 @@ final class ValueExperimental1 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ValueExperimental1()"; } @@ -32,13 +28,11 @@ final class ValueExperimental1 { final class ValueExperimental2 { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ValueExperimental2() { } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof ValueExperimental2)) return false; @@ -47,7 +41,6 @@ final class ValueExperimental2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -55,8 +48,7 @@ final class ValueExperimental2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ValueExperimental2()"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValueExperimentalStarImport.java b/test/transform/resource/after-delombok/ValueExperimentalStarImport.java index add5b3d6..b3bd9db5 100644 --- a/test/transform/resource/after-delombok/ValueExperimentalStarImport.java +++ b/test/transform/resource/after-delombok/ValueExperimentalStarImport.java @@ -2,14 +2,12 @@ import lombok.experimental.*; final class ValueExperimentalStarImport { @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ValueExperimentalStarImport() { } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof ValueExperimentalStarImport)) return false; @@ -18,7 +16,6 @@ final class ValueExperimentalStarImport { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -26,8 +23,7 @@ final class ValueExperimentalStarImport { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ValueExperimentalStarImport()"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/ValuePlain.java b/test/transform/resource/after-delombok/ValuePlain.java index f20f4aea..056cdacf 100644 --- a/test/transform/resource/after-delombok/ValuePlain.java +++ b/test/transform/resource/after-delombok/ValuePlain.java @@ -4,27 +4,23 @@ final class Value1 { @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Value1(final int x, final String name) { this.x = x; this.name = name; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getName() { return this.name; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Value1)) return false; @@ -38,7 +34,6 @@ final class Value1 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -50,7 +45,6 @@ final class Value1 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Value1(x=" + this.getX() + ", name=" + this.getName() + ")"; } @@ -61,27 +55,23 @@ class Value2 { @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Value2(final int x, final String name) { this.x = x; this.name = name; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public String getName() { return this.name; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Value2)) return false; @@ -95,14 +85,12 @@ class Value2 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof Value2; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -114,7 +102,6 @@ class Value2 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Value2(x=" + this.getX() + ", name=" + this.getName() + ")"; } @@ -125,27 +112,23 @@ final class Value3 { @java.beans.ConstructorProperties({"x", "y"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Value3(final int x, final int y) { this.x = x; this.y = y; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getX() { return this.x; } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int getY() { return this.y; } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Value3)) return false; @@ -157,7 +140,6 @@ final class Value3 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; @@ -168,7 +150,6 @@ final class Value3 { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "Value3(x=" + this.getX() + ", y=" + this.getY() + ")"; } diff --git a/test/transform/resource/after-delombok/ValueStaticField.java b/test/transform/resource/after-delombok/ValueStaticField.java index d5334869..7725d1ac 100644 --- a/test/transform/resource/after-delombok/ValueStaticField.java +++ b/test/transform/resource/after-delombok/ValueStaticField.java @@ -3,13 +3,11 @@ final class ValueStaticField { static String PASSWORD = "Ken sent me"; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public ValueStaticField() { } @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof ValueStaticField)) return false; @@ -18,7 +16,6 @@ final class ValueStaticField { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public int hashCode() { int result = 1; return result; @@ -26,8 +23,7 @@ final class ValueStaticField { @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public java.lang.String toString() { return "ValueStaticField()"; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/VarComplex.java b/test/transform/resource/after-delombok/VarComplex.java index 10b33943..b08ad115 100644 --- a/test/transform/resource/after-delombok/VarComplex.java +++ b/test/transform/resource/after-delombok/VarComplex.java @@ -17,4 +17,4 @@ public class VarComplex { } java.lang.String shouldBeString = field; //Unshadowing } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/VarInFor.java b/test/transform/resource/after-delombok/VarInFor.java index 363aeeff..f2e95b09 100644 --- a/test/transform/resource/after-delombok/VarInFor.java +++ b/test/transform/resource/after-delombok/VarInFor.java @@ -6,4 +6,4 @@ public class VarInFor { int shouldBeInt2 = shouldBeInt; } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/VarInForOld.java b/test/transform/resource/after-delombok/VarInForOld.java index bb510c0b..ddb370ef 100644 --- a/test/transform/resource/after-delombok/VarInForOld.java +++ b/test/transform/resource/after-delombok/VarInForOld.java @@ -4,4 +4,4 @@ public class VarInForOld { System.out.println(i); } } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/VarModifier.java b/test/transform/resource/after-delombok/VarModifier.java index 9838cdf7..ba4d9362 100644 --- a/test/transform/resource/after-delombok/VarModifier.java +++ b/test/transform/resource/after-delombok/VarModifier.java @@ -4,4 +4,4 @@ public class VarModifier { final char[] shouldBeFinalCharArray = field.toCharArray(); char[] shouldBeCharArray = field.toCharArray(); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/VarNullInit.java b/test/transform/resource/after-delombok/VarNullInit.java index 8ec2ea73..ed5f8e8d 100644 --- a/test/transform/resource/after-delombok/VarNullInit.java +++ b/test/transform/resource/after-delombok/VarNullInit.java @@ -3,4 +3,4 @@ public class VarNullInit { void method() { java.lang.Object x = null; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/WithInnerAnnotation.java b/test/transform/resource/after-delombok/WithInnerAnnotation.java index a8decfeb..1e88b226 100644 --- a/test/transform/resource/after-delombok/WithInnerAnnotation.java +++ b/test/transform/resource/after-delombok/WithInnerAnnotation.java @@ -2,4 +2,4 @@ class WithInnerAnnotation { @interface Inner { int bar() default 42; } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/WitherAccessLevel.java b/test/transform/resource/after-delombok/WitherAccessLevel.java index b828c5c6..8cf98cec 100644 --- a/test/transform/resource/after-delombok/WitherAccessLevel.java +++ b/test/transform/resource/after-delombok/WitherAccessLevel.java @@ -9,32 +9,27 @@ class WitherAccessLevel { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated private WitherAccessLevel withPrivate(final boolean isPrivate) { return this.isPrivate == isPrivate ? this : new WitherAccessLevel(this.isNone, isPrivate, this.isPackage, this.isProtected, this.isPublic, this.value); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated WitherAccessLevel withPackage(final boolean isPackage) { return this.isPackage == isPackage ? this : new WitherAccessLevel(this.isNone, this.isPrivate, isPackage, this.isProtected, this.isPublic, this.value); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected WitherAccessLevel withProtected(final boolean isProtected) { return this.isProtected == isProtected ? this : new WitherAccessLevel(this.isNone, this.isPrivate, this.isPackage, isProtected, this.isPublic, this.value); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherAccessLevel withPublic(final boolean isPublic) { return this.isPublic == isPublic ? this : new WitherAccessLevel(this.isNone, this.isPrivate, this.isPackage, this.isProtected, isPublic, this.value); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherAccessLevel withValue(final boolean value) { return this.value == value ? this : new WitherAccessLevel(this.isNone, this.isPrivate, this.isPackage, this.isProtected, this.isPublic, value); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/WitherAlreadyExists.java b/test/transform/resource/after-delombok/WitherAlreadyExists.java index 352d3f18..8f51af48 100644 --- a/test/transform/resource/after-delombok/WitherAlreadyExists.java +++ b/test/transform/resource/after-delombok/WitherAlreadyExists.java @@ -34,7 +34,6 @@ class Wither5 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Wither5 withFoo(final String foo) { return this.foo == foo ? this : new Wither5(foo); } @@ -47,7 +46,6 @@ class Wither6 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public Wither6 withFoo(final String foo) { return this.foo == foo ? this : new Wither6(foo); } @@ -72,4 +70,4 @@ class Wither9 { } Wither9(boolean foo) { } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/WitherAndAllArgsConstructor.java b/test/transform/resource/after-delombok/WitherAndAllArgsConstructor.java index f285d75d..0d0d6525 100644 --- a/test/transform/resource/after-delombok/WitherAndAllArgsConstructor.java +++ b/test/transform/resource/after-delombok/WitherAndAllArgsConstructor.java @@ -7,7 +7,6 @@ class WitherAndAllArgsConstructor { @java.beans.ConstructorProperties({"test", "test2", "y", "z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherAndAllArgsConstructor(final J test, final java.util.List test2, final int y, final int z) { this.test = test; this.test2 = test2; @@ -16,14 +15,12 @@ class WitherAndAllArgsConstructor { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherAndAllArgsConstructor withTest(final J test) { return this.test == test ? this : new WitherAndAllArgsConstructor(test, this.test2, this.y, this.z); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherAndAllArgsConstructor withTest2(final java.util.List test2) { return this.test2 == test2 ? this : new WitherAndAllArgsConstructor(this.test, test2, this.y, this.z); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/WitherDeprecated.java b/test/transform/resource/after-delombok/WitherDeprecated.java index 18fb598f..409e773f 100644 --- a/test/transform/resource/after-delombok/WitherDeprecated.java +++ b/test/transform/resource/after-delombok/WitherDeprecated.java @@ -10,7 +10,6 @@ class WitherDeprecated { @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherDeprecated withAnnotation(final int annotation) { return this.annotation == annotation ? this : new WitherDeprecated(annotation, this.javadoc); } @@ -20,8 +19,7 @@ class WitherDeprecated { @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherDeprecated withJavadoc(final int javadoc) { return this.javadoc == javadoc ? this : new WitherDeprecated(this.annotation, javadoc); } -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/WitherOnClass.java b/test/transform/resource/after-delombok/WitherOnClass.java index 98c789e8..ae352d33 100644 --- a/test/transform/resource/after-delombok/WitherOnClass.java +++ b/test/transform/resource/after-delombok/WitherOnClass.java @@ -5,7 +5,6 @@ class WitherOnClass1 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherOnClass1 withPublic(final boolean isPublic) { return this.isPublic == isPublic ? this : new WitherOnClass1(this.isNone, isPublic); } @@ -18,13 +17,11 @@ class WitherOnClass2 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated protected WitherOnClass2 withProtected(final boolean isProtected) { return this.isProtected == isProtected ? this : new WitherOnClass2(this.isNone, isProtected, this.isPackage); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated WitherOnClass2 withPackage(final boolean isPackage) { return this.isPackage == isPackage ? this : new WitherOnClass2(this.isNone, this.isProtected, isPackage); } @@ -37,13 +34,11 @@ class WitherOnClass3 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherOnClass3 withCouldBeNull(final String couldBeNull) { return this.couldBeNull == couldBeNull ? this : new WitherOnClass3(couldBeNull, this.nonNull); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherOnClass3 withNonNull(@lombok.NonNull final String nonNull) { if (nonNull == null) { throw new java.lang.NullPointerException("nonNull"); @@ -59,7 +54,6 @@ class WitherOnClass4 { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherOnClass4 withY(final int fY) { return this.fY == fY ? this : new WitherOnClass4(fY); } diff --git a/test/transform/resource/after-delombok/WitherPlain.java b/test/transform/resource/after-delombok/WitherPlain.java index 3a0d42f7..548ff299 100644 --- a/test/transform/resource/after-delombok/WitherPlain.java +++ b/test/transform/resource/after-delombok/WitherPlain.java @@ -7,13 +7,11 @@ class WitherPlain { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherPlain withI(final int i) { return this.i == i ? this : new WitherPlain(i, this.foo); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherPlain withFoo(final int foo) { return this.foo == foo ? this : new WitherPlain(this.i, foo); } diff --git a/test/transform/resource/after-delombok/WitherWithAbstract.java b/test/transform/resource/after-delombok/WitherWithAbstract.java index 5acb8e84..7cbb1309 100644 --- a/test/transform/resource/after-delombok/WitherWithAbstract.java +++ b/test/transform/resource/after-delombok/WitherWithAbstract.java @@ -2,6 +2,5 @@ abstract class WitherWithAbstract { String foo; @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public abstract WitherWithAbstract withFoo(final String foo); -} \ No newline at end of file +} diff --git a/test/transform/resource/after-delombok/WitherWithGenerics.java b/test/transform/resource/after-delombok/WitherWithGenerics.java index c124276d..fd466559 100644 --- a/test/transform/resource/after-delombok/WitherWithGenerics.java +++ b/test/transform/resource/after-delombok/WitherWithGenerics.java @@ -7,19 +7,16 @@ class WitherWithGenerics { } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherWithGenerics withTest(final J test) { return this.test == test ? this : new WitherWithGenerics(test, this.test2, this.test3); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherWithGenerics withTest2(final java.util.List test2) { return this.test2 == test2 ? this : new WitherWithGenerics(this.test, test2, this.test3); } @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") - @lombok.Generated public WitherWithGenerics withTest3(final java.util.List test3) { return this.test3 == test3 ? this : new WitherWithGenerics(this.test, this.test2, test3); } diff --git a/test/transform/resource/after-ecj/Accessors.java b/test/transform/resource/after-ecj/Accessors.java index 09b94c8e..450c35fa 100644 --- a/test/transform/resource/after-ecj/Accessors.java +++ b/test/transform/resource/after-ecj/Accessors.java @@ -3,10 +3,10 @@ class AccessorsFluent { AccessorsFluent() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String fieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String fieldName() { return this.fieldName; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated AccessorsFluent fieldName(final String fieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") AccessorsFluent fieldName(final String fieldName) { this.fieldName = fieldName; return this; } @@ -17,14 +17,14 @@ class AccessorsFluent { AccessorsFluentOnClass() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated AccessorsFluentOnClass fieldName(final String fieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") AccessorsFluentOnClass fieldName(final String fieldName) { this.fieldName = fieldName; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String fieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String fieldName() { return this.fieldName; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getOtherFieldWithOverride() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getOtherFieldWithOverride() { return this.otherFieldWithOverride; } } @@ -33,7 +33,7 @@ class AccessorsChain { AccessorsChain() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated AccessorsChain setRunning(final boolean isRunning) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") AccessorsChain setRunning(final boolean isRunning) { this.isRunning = isRunning; return this; } @@ -44,7 +44,7 @@ class AccessorsChain { AccessorsPrefix() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setActualField(final String fActualField) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setActualField(final String fActualField) { this.fActualField = fActualField; } } @@ -54,10 +54,10 @@ class AccessorsChain { AccessorsPrefix2() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setFieldName(final String fieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setFieldName(final String fieldName) { this.fieldName = fieldName; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setActualField(final String fActualField) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setActualField(final String fActualField) { this.fActualField = fActualField; } } @@ -69,10 +69,10 @@ class AccessorsChain { private String getName() { return fName; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("AccessorsPrefix3(fName=" + this.getName()) + ")"); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof AccessorsPrefix3))) @@ -86,10 +86,10 @@ class AccessorsChain { return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof AccessorsPrefix3); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; final java.lang.Object $fName = this.getName(); @@ -102,7 +102,7 @@ class AccessorsFluentGenerics { AccessorsFluentGenerics() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated AccessorsFluentGenerics name(final String name) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") AccessorsFluentGenerics name(final String name) { this.name = name; return this; } @@ -112,7 +112,7 @@ class AccessorsFluentNoChaining { AccessorsFluentNoChaining() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void name(final String name) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void name(final String name) { this.name = name; } } @@ -123,7 +123,7 @@ class AccessorsFluentStatic { AccessorsFluentStatic() { super(); } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void name(final String name) { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void name(final String name) { AccessorsFluentStatic.name = name; } } diff --git a/test/transform/resource/after-ecj/AccessorsConfiguration.java b/test/transform/resource/after-ecj/AccessorsConfiguration.java index 7db470c5..fdf2ff85 100644 --- a/test/transform/resource/after-ecj/AccessorsConfiguration.java +++ b/test/transform/resource/after-ecj/AccessorsConfiguration.java @@ -3,10 +3,10 @@ class AccessorsConfiguration { AccessorsConfiguration() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String fieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String fieldName() { return this.m_FieldName; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void fieldName(final String m_FieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void fieldName(final String m_FieldName) { this.m_FieldName = m_FieldName; } } @@ -15,7 +15,7 @@ class AccessorsConfiguration { AccessorsConfiguration2() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setM_FieldName(final String m_FieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setM_FieldName(final String m_FieldName) { this.m_FieldName = m_FieldName; } } @@ -24,7 +24,7 @@ class AccessorsConfiguration { AccessorsConfiguration3() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated AccessorsConfiguration3 setFieldName(final String fFieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") AccessorsConfiguration3 setFieldName(final String fFieldName) { this.fFieldName = fFieldName; return this; } diff --git a/test/transform/resource/after-ecj/BuilderChainAndFluent.java b/test/transform/resource/after-ecj/BuilderChainAndFluent.java index 78d0bdec..1554cf44 100644 --- a/test/transform/resource/after-ecj/BuilderChainAndFluent.java +++ b/test/transform/resource/after-ecj/BuilderChainAndFluent.java @@ -1,25 +1,25 @@ @lombok.experimental.Builder(fluent = false,chain = false) class BuilderChainAndFluent { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderChainAndFluentBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int yes; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderChainAndFluentBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderChainAndFluentBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int yes; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderChainAndFluentBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setYes(final int yes) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setYes(final int yes) { this.yes = yes; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderChainAndFluent build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderChainAndFluent build() { return new BuilderChainAndFluent(yes); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("BuilderChainAndFluent.BuilderChainAndFluentBuilder(yes=" + this.yes) + ")"); } } private final int yes; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderChainAndFluent(final int yes) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderChainAndFluent(final int yes) { super(); this.yes = yes; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderChainAndFluentBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderChainAndFluentBuilder builder() { return new BuilderChainAndFluentBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderComplex.java b/test/transform/resource/after-ecj/BuilderComplex.java index 48995923..c63ad8e6 100644 --- a/test/transform/resource/after-ecj/BuilderComplex.java +++ b/test/transform/resource/after-ecj/BuilderComplex.java @@ -1,34 +1,34 @@ import java.util.List; import lombok.experimental.Builder; class BuilderComplex { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class VoidBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated T number; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int arg2; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String arg3; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderComplex selfRef; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated VoidBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class VoidBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") T number; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int arg2; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String arg3; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderComplex selfRef; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") VoidBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated VoidBuilder number(final T number) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") VoidBuilder number(final T number) { this.number = number; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated VoidBuilder arg2(final int arg2) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") VoidBuilder arg2(final int arg2) { this.arg2 = arg2; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated VoidBuilder arg3(final String arg3) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") VoidBuilder arg3(final String arg3) { this.arg3 = arg3; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated VoidBuilder selfRef(final BuilderComplex selfRef) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") VoidBuilder selfRef(final BuilderComplex selfRef) { this.selfRef = selfRef; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void execute() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void execute() { BuilderComplex.testVoidWithGenerics(number, arg2, arg3, selfRef); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((((("BuilderComplex.VoidBuilder(number=" + this.number) + ", arg2=") + this.arg2) + ", arg3=") + this.arg3) + ", selfRef=") + this.selfRef) + ")"); } } @@ -37,7 +37,7 @@ class BuilderComplex { } private static @Builder(buildMethodName = "execute") void testVoidWithGenerics(T number, int arg2, String arg3, BuilderComplex selfRef) { } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated VoidBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") VoidBuilder builder() { return new VoidBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderInstanceMethod.java b/test/transform/resource/after-ecj/BuilderInstanceMethod.java index 985e8e1c..ff7d0aab 100644 --- a/test/transform/resource/after-ecj/BuilderInstanceMethod.java +++ b/test/transform/resource/after-ecj/BuilderInstanceMethod.java @@ -1,33 +1,33 @@ import java.util.List; class BuilderInstanceMethod { - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class StringBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int show; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int yes; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated List also; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int $andMe; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StringBuilder() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class StringBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int show; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int yes; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") List also; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int $andMe; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StringBuilder show(final int show) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder show(final int show) { this.show = show; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StringBuilder yes(final int yes) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder yes(final int yes) { this.yes = yes; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StringBuilder also(final List also) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder also(final List also) { this.also = also; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StringBuilder $andMe(final int $andMe) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder $andMe(final int $andMe) { this.$andMe = $andMe; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String build() { return BuilderInstanceMethod.this.create(show, yes, also, $andMe); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((((("BuilderInstanceMethod.StringBuilder(show=" + this.show) + ", yes=") + this.yes) + ", also=") + this.also) + ", $andMe=") + this.$andMe) + ")"); } } @@ -37,7 +37,7 @@ class BuilderInstanceMethod { public @lombok.Builder String create(int show, final int yes, List also, int $andMe) { return (((("" + show) + yes) + also) + $andMe); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StringBuilder builder() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder builder() { return new StringBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSimple.java b/test/transform/resource/after-ecj/BuilderSimple.java index c235201e..53d1ed9e 100644 --- a/test/transform/resource/after-ecj/BuilderSimple.java +++ b/test/transform/resource/after-ecj/BuilderSimple.java @@ -1,23 +1,23 @@ import java.util.List; @lombok.Builder class BuilderSimple { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderSimpleBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int yes; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated List also; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSimpleBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSimpleBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int yes; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") List also; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSimpleBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSimpleBuilder yes(final int yes) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSimpleBuilder yes(final int yes) { this.yes = yes; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSimpleBuilder also(final List also) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSimpleBuilder also(final List also) { this.also = also; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSimple build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSimple build() { return new BuilderSimple(yes, also); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("BuilderSimple.BuilderSimpleBuilder(yes=" + this.yes) + ", also=") + this.also) + ")"); } } @@ -25,12 +25,12 @@ import java.util.List; private final int yes; private List also; private int $butNotMe; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSimple(final int yes, final List also) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSimple(final int yes, final List also) { super(); this.yes = yes; this.also = also; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSimpleBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSimpleBuilder builder() { return new BuilderSimpleBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java b/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java index 2a596964..5cf9f4ac 100644 --- a/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java +++ b/test/transform/resource/after-ecj/BuilderSingularGuavaListsSets.java @@ -5,96 +5,96 @@ import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.ImmutableTable; import lombok.Singular; @lombok.Builder class BuilderSingularGuavaListsSets { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderSingularGuavaListsSetsBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableList.Builder cards; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableList.Builder frogs; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableSet.Builder rawSet; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableSortedSet.Builder passes; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableTable.Builder users; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularGuavaListsSetsBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableList.Builder cards; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableList.Builder frogs; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableSet.Builder rawSet; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableSortedSet.Builder passes; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableTable.Builder users; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder card(T card) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder card(T card) { if ((this.cards == null)) this.cards = com.google.common.collect.ImmutableList.builder(); this.cards.add(card); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder cards(java.lang.Iterable cards) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder cards(java.lang.Iterable cards) { if ((this.cards == null)) this.cards = com.google.common.collect.ImmutableList.builder(); this.cards.addAll(cards); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder clearCards() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder clearCards() { this.cards = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder frog(Number frog) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder frog(Number frog) { if ((this.frogs == null)) this.frogs = com.google.common.collect.ImmutableList.builder(); this.frogs.add(frog); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder frogs(java.lang.Iterable frogs) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder frogs(java.lang.Iterable frogs) { if ((this.frogs == null)) this.frogs = com.google.common.collect.ImmutableList.builder(); this.frogs.addAll(frogs); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder clearFrogs() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder clearFrogs() { this.frogs = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder rawSet(java.lang.Object rawSet) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder rawSet(java.lang.Object rawSet) { if ((this.rawSet == null)) this.rawSet = com.google.common.collect.ImmutableSet.builder(); this.rawSet.add(rawSet); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder rawSet(java.lang.Iterable rawSet) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder rawSet(java.lang.Iterable rawSet) { if ((this.rawSet == null)) this.rawSet = com.google.common.collect.ImmutableSet.builder(); this.rawSet.addAll(rawSet); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder clearRawSet() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder clearRawSet() { this.rawSet = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder pass(String pass) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder pass(String pass) { if ((this.passes == null)) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); this.passes.add(pass); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder passes(java.lang.Iterable passes) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder passes(java.lang.Iterable passes) { if ((this.passes == null)) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder(); this.passes.addAll(passes); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder clearPasses() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder clearPasses() { this.passes = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder user(Number rowKey, Number columnKey, String value) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder user(Number rowKey, Number columnKey, String value) { if ((this.users == null)) this.users = com.google.common.collect.ImmutableTable.builder(); this.users.put(rowKey, columnKey, value); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder users(com.google.common.collect.Table users) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder users(com.google.common.collect.Table users) { if ((this.users == null)) this.users = com.google.common.collect.ImmutableTable.builder(); this.users.putAll(users); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder clearUsers() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder clearUsers() { this.users = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSets build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSets build() { com.google.common.collect.ImmutableList cards = ((this.cards == null) ? com.google.common.collect.ImmutableList.of() : this.cards.build()); com.google.common.collect.ImmutableCollection frogs = ((this.frogs == null) ? com.google.common.collect.ImmutableList.of() : this.frogs.build()); com.google.common.collect.ImmutableSet rawSet = ((this.rawSet == null) ? com.google.common.collect.ImmutableSet.of() : this.rawSet.build()); @@ -102,7 +102,7 @@ import lombok.Singular; com.google.common.collect.ImmutableTable users = ((this.users == null) ? com.google.common.collect.ImmutableTable.of() : this.users.build()); return new BuilderSingularGuavaListsSets(cards, frogs, rawSet, passes, users); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((((((("BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder(cards=" + this.cards) + ", frogs=") + this.frogs) + ", rawSet=") + this.rawSet) + ", passes=") + this.passes) + ", users=") + this.users) + ")"); } } @@ -111,7 +111,7 @@ import lombok.Singular; private @SuppressWarnings("all") @Singular("rawSet") ImmutableSet rawSet; private @Singular ImmutableSortedSet passes; private @Singular ImmutableTable users; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSets(final ImmutableList cards, final ImmutableCollection frogs, final ImmutableSet rawSet, final ImmutableSortedSet passes, final ImmutableTable users) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSets(final ImmutableList cards, final ImmutableCollection frogs, final ImmutableSet rawSet, final ImmutableSortedSet passes, final ImmutableTable users) { super(); this.cards = cards; this.frogs = frogs; @@ -119,7 +119,7 @@ import lombok.Singular; this.passes = passes; this.users = users; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaListsSetsBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaListsSetsBuilder builder() { return new BuilderSingularGuavaListsSetsBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java b/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java index 1988f097..378ec309 100644 --- a/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java +++ b/test/transform/resource/after-ecj/BuilderSingularGuavaMaps.java @@ -3,81 +3,81 @@ import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableSortedMap; import lombok.Singular; @lombok.Builder class BuilderSingularGuavaMaps { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderSingularGuavaMapsBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableMap.Builder battleaxes; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableSortedMap.Builder vertices; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableBiMap.Builder rawMap; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularGuavaMapsBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableMap.Builder battleaxes; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableSortedMap.Builder vertices; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableBiMap.Builder rawMap; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder battleaxe(K key, V value) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder battleaxe(K key, V value) { if ((this.battleaxes == null)) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.put(key, value); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder battleaxes(java.util.Map battleaxes) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder battleaxes(java.util.Map battleaxes) { if ((this.battleaxes == null)) this.battleaxes = com.google.common.collect.ImmutableMap.builder(); this.battleaxes.putAll(battleaxes); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder clearBattleaxes() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder clearBattleaxes() { this.battleaxes = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder vertex(Integer key, V value) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder vertex(Integer key, V value) { if ((this.vertices == null)) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.put(key, value); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder vertices(java.util.Map vertices) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder vertices(java.util.Map vertices) { if ((this.vertices == null)) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.vertices.putAll(vertices); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder clearVertices() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder clearVertices() { this.vertices = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder rawMap(java.lang.Object key, java.lang.Object value) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder rawMap(java.lang.Object key, java.lang.Object value) { if ((this.rawMap == null)) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.put(key, value); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder rawMap(java.util.Map rawMap) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder rawMap(java.util.Map rawMap) { if ((this.rawMap == null)) this.rawMap = com.google.common.collect.ImmutableBiMap.builder(); this.rawMap.putAll(rawMap); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder clearRawMap() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder clearRawMap() { this.rawMap = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMaps build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMaps build() { com.google.common.collect.ImmutableMap battleaxes = ((this.battleaxes == null) ? com.google.common.collect.ImmutableMap.of() : this.battleaxes.build()); com.google.common.collect.ImmutableSortedMap vertices = ((this.vertices == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.vertices.build()); com.google.common.collect.ImmutableBiMap rawMap = ((this.rawMap == null) ? com.google.common.collect.ImmutableBiMap.of() : this.rawMap.build()); return new BuilderSingularGuavaMaps(battleaxes, vertices, rawMap); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((("BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder(battleaxes=" + this.battleaxes) + ", vertices=") + this.vertices) + ", rawMap=") + this.rawMap) + ")"); } } private @Singular ImmutableMap battleaxes; private @Singular ImmutableSortedMap vertices; private @SuppressWarnings("all") @Singular("rawMap") ImmutableBiMap rawMap; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMaps(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMaps(final ImmutableMap battleaxes, final ImmutableSortedMap vertices, final ImmutableBiMap rawMap) { super(); this.battleaxes = battleaxes; this.vertices = vertices; this.rawMap = rawMap; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularGuavaMapsBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularGuavaMapsBuilder builder() { return new BuilderSingularGuavaMapsBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularLists.java b/test/transform/resource/after-ecj/BuilderSingularLists.java index 3293870a..e1036262 100644 --- a/test/transform/resource/after-ecj/BuilderSingularLists.java +++ b/test/transform/resource/after-ecj/BuilderSingularLists.java @@ -3,65 +3,65 @@ import java.util.Collection; import lombok.Singular; @lombok.Builder class BuilderSingularLists { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderSingularListsBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList children; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList scarves; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList rawList; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularListsBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList children; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList scarves; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList rawList; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder child(T child) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder child(T child) { if ((this.children == null)) this.children = new java.util.ArrayList(); this.children.add(child); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder children(java.util.Collection children) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder children(java.util.Collection children) { if ((this.children == null)) this.children = new java.util.ArrayList(); this.children.addAll(children); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder clearChildren() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder clearChildren() { if ((this.children != null)) this.children.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder scarf(Number scarf) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder scarf(Number scarf) { if ((this.scarves == null)) this.scarves = new java.util.ArrayList(); this.scarves.add(scarf); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder scarves(java.util.Collection scarves) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder scarves(java.util.Collection scarves) { if ((this.scarves == null)) this.scarves = new java.util.ArrayList(); this.scarves.addAll(scarves); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder clearScarves() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder clearScarves() { if ((this.scarves != null)) this.scarves.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder rawList(java.lang.Object rawList) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder rawList(java.lang.Object rawList) { if ((this.rawList == null)) this.rawList = new java.util.ArrayList(); this.rawList.add(rawList); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder rawList(java.util.Collection rawList) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder rawList(java.util.Collection rawList) { if ((this.rawList == null)) this.rawList = new java.util.ArrayList(); this.rawList.addAll(rawList); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder clearRawList() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder clearRawList() { if ((this.rawList != null)) this.rawList.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularLists build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularLists build() { java.util.List children; switch (((this.children == null) ? 0 : this.children.size())) { case 0 : @@ -97,20 +97,20 @@ import lombok.Singular; } return new BuilderSingularLists(children, scarves, rawList); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((("BuilderSingularLists.BuilderSingularListsBuilder(children=" + this.children) + ", scarves=") + this.scarves) + ", rawList=") + this.rawList) + ")"); } } private @Singular List children; private @Singular Collection scarves; private @SuppressWarnings("all") @Singular("rawList") List rawList; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularLists(final List children, final Collection scarves, final List rawList) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularLists(final List children, final Collection scarves, final List rawList) { super(); this.children = children; this.scarves = scarves; this.rawList = rawList; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularListsBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularListsBuilder builder() { return new BuilderSingularListsBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularMaps.java b/test/transform/resource/after-ecj/BuilderSingularMaps.java index 7e778452..38ac0ed7 100644 --- a/test/transform/resource/after-ecj/BuilderSingularMaps.java +++ b/test/transform/resource/after-ecj/BuilderSingularMaps.java @@ -2,19 +2,19 @@ import java.util.Map; import java.util.SortedMap; import lombok.Singular; @lombok.Builder class BuilderSingularMaps { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderSingularMapsBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList women$key; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList women$value; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList men$key; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList men$value; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList rawMap$key; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList rawMap$value; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList stringMap$key; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList stringMap$value; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularMapsBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList women$key; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList women$value; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList men$key; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList men$value; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList rawMap$key; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList rawMap$value; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList stringMap$key; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList stringMap$value; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder woman(K womanKey, V womanValue) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder woman(K womanKey, V womanValue) { if ((this.women$key == null)) { this.women$key = new java.util.ArrayList(); @@ -24,7 +24,7 @@ import lombok.Singular; this.women$value.add(womanValue); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder women(java.util.Map women) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder women(java.util.Map women) { if ((this.women$key == null)) { this.women$key = new java.util.ArrayList(); @@ -37,7 +37,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder clearWomen() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder clearWomen() { if ((this.women$key != null)) { this.women$key.clear(); @@ -45,7 +45,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder man(K manKey, Number manValue) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder man(K manKey, Number manValue) { if ((this.men$key == null)) { this.men$key = new java.util.ArrayList(); @@ -55,7 +55,7 @@ import lombok.Singular; this.men$value.add(manValue); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder men(java.util.Map men) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder men(java.util.Map men) { if ((this.men$key == null)) { this.men$key = new java.util.ArrayList(); @@ -68,7 +68,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder clearMen() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder clearMen() { if ((this.men$key != null)) { this.men$key.clear(); @@ -76,7 +76,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder rawMap(java.lang.Object rawMapKey, java.lang.Object rawMapValue) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder rawMap(java.lang.Object rawMapKey, java.lang.Object rawMapValue) { if ((this.rawMap$key == null)) { this.rawMap$key = new java.util.ArrayList(); @@ -86,7 +86,7 @@ import lombok.Singular; this.rawMap$value.add(rawMapValue); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder rawMap(java.util.Map rawMap) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder rawMap(java.util.Map rawMap) { if ((this.rawMap$key == null)) { this.rawMap$key = new java.util.ArrayList(); @@ -99,7 +99,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder clearRawMap() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder clearRawMap() { if ((this.rawMap$key != null)) { this.rawMap$key.clear(); @@ -107,7 +107,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder stringMap(String stringMapKey, V stringMapValue) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder stringMap(String stringMapKey, V stringMapValue) { if ((this.stringMap$key == null)) { this.stringMap$key = new java.util.ArrayList(); @@ -117,7 +117,7 @@ import lombok.Singular; this.stringMap$value.add(stringMapValue); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder stringMap(java.util.Map stringMap) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder stringMap(java.util.Map stringMap) { if ((this.stringMap$key == null)) { this.stringMap$key = new java.util.ArrayList(); @@ -130,7 +130,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder clearStringMap() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder clearStringMap() { if ((this.stringMap$key != null)) { this.stringMap$key.clear(); @@ -138,7 +138,7 @@ import lombok.Singular; } return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMaps build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMaps build() { java.util.Map women; switch (((this.women$key == null) ? 0 : this.women$key.size())) { case 0 : @@ -188,7 +188,7 @@ import lombok.Singular; } return new BuilderSingularMaps(women, men, rawMap, stringMap); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((((((((((((("BuilderSingularMaps.BuilderSingularMapsBuilder(women$key=" + this.women$key) + ", women$value=") + this.women$value) + ", men$key=") + this.men$key) + ", men$value=") + this.men$value) + ", rawMap$key=") + this.rawMap$key) + ", rawMap$value=") + this.rawMap$value) + ", stringMap$key=") + this.stringMap$key) + ", stringMap$value=") + this.stringMap$value) + ")"); } } @@ -196,14 +196,14 @@ import lombok.Singular; private @Singular SortedMap men; private @SuppressWarnings("all") @Singular("rawMap") Map rawMap; private @Singular("stringMap") Map stringMap; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMaps(final Map women, final SortedMap men, final Map rawMap, final Map stringMap) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMaps(final Map women, final SortedMap men, final Map rawMap, final Map stringMap) { super(); this.women = women; this.men = men; this.rawMap = rawMap; this.stringMap = stringMap; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularMapsBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularMapsBuilder builder() { return new BuilderSingularMapsBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularNoAuto.java b/test/transform/resource/after-ecj/BuilderSingularNoAuto.java index 6ea5a7db..1b79538c 100644 --- a/test/transform/resource/after-ecj/BuilderSingularNoAuto.java +++ b/test/transform/resource/after-ecj/BuilderSingularNoAuto.java @@ -1,65 +1,65 @@ import java.util.List; import lombok.Singular; @lombok.Builder class BuilderSingularNoAuto { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderSingularNoAutoBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList things; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList widgets; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList items; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularNoAutoBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList things; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList widgets; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList items; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder things(String things) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder things(String things) { if ((this.things == null)) this.things = new java.util.ArrayList(); this.things.add(things); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder things(java.util.Collection things) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder things(java.util.Collection things) { if ((this.things == null)) this.things = new java.util.ArrayList(); this.things.addAll(things); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder clearThings() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder clearThings() { if ((this.things != null)) this.things.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder widget(String widget) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder widget(String widget) { if ((this.widgets == null)) this.widgets = new java.util.ArrayList(); this.widgets.add(widget); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder widgets(java.util.Collection widgets) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder widgets(java.util.Collection widgets) { if ((this.widgets == null)) this.widgets = new java.util.ArrayList(); this.widgets.addAll(widgets); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder clearWidgets() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder clearWidgets() { if ((this.widgets != null)) this.widgets.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder items(String items) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder items(String items) { if ((this.items == null)) this.items = new java.util.ArrayList(); this.items.add(items); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder items(java.util.Collection items) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder items(java.util.Collection items) { if ((this.items == null)) this.items = new java.util.ArrayList(); this.items.addAll(items); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder clearItems() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder clearItems() { if ((this.items != null)) this.items.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAuto build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAuto build() { java.util.List things; switch (((this.things == null) ? 0 : this.things.size())) { case 0 : @@ -95,20 +95,20 @@ import lombok.Singular; } return new BuilderSingularNoAuto(things, widgets, items); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((("BuilderSingularNoAuto.BuilderSingularNoAutoBuilder(things=" + this.things) + ", widgets=") + this.widgets) + ", items=") + this.items) + ")"); } } private @Singular List things; private @Singular("widget") List widgets; private @Singular List items; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAuto(final List things, final List widgets, final List items) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAuto(final List things, final List widgets, final List items) { super(); this.things = things; this.widgets = widgets; this.items = items; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularNoAutoBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder builder() { return new BuilderSingularNoAutoBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java b/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java index 2b65ba3f..84335f46 100644 --- a/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java +++ b/test/transform/resource/after-ecj/BuilderSingularRedirectToGuava.java @@ -3,81 +3,81 @@ import java.util.NavigableMap; import java.util.Collection; import lombok.Singular; @lombok.Builder class BuilderSingularRedirectToGuava { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderSingularRedirectToGuavaBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableSet.Builder dangerMice; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableSortedMap.Builder things; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated com.google.common.collect.ImmutableList.Builder> doohickeys; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularRedirectToGuavaBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableSet.Builder dangerMice; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableSortedMap.Builder things; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") com.google.common.collect.ImmutableList.Builder> doohickeys; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder dangerMouse(String dangerMouse) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder dangerMouse(String dangerMouse) { if ((this.dangerMice == null)) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.add(dangerMouse); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder dangerMice(java.lang.Iterable dangerMice) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder dangerMice(java.lang.Iterable dangerMice) { if ((this.dangerMice == null)) this.dangerMice = com.google.common.collect.ImmutableSet.builder(); this.dangerMice.addAll(dangerMice); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder clearDangerMice() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder clearDangerMice() { this.dangerMice = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder thing(Integer key, Number value) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder thing(Integer key, Number value) { if ((this.things == null)) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.put(key, value); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder things(java.util.Map things) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder things(java.util.Map things) { if ((this.things == null)) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder(); this.things.putAll(things); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder clearThings() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder clearThings() { this.things = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder doohickey(Class doohickey) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder doohickey(Class doohickey) { if ((this.doohickeys == null)) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.add(doohickey); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder doohickeys(java.lang.Iterable> doohickeys) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder doohickeys(java.lang.Iterable> doohickeys) { if ((this.doohickeys == null)) this.doohickeys = com.google.common.collect.ImmutableList.builder(); this.doohickeys.addAll(doohickeys); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder clearDoohickeys() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder clearDoohickeys() { this.doohickeys = null; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuava build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuava build() { java.util.Set dangerMice = ((this.dangerMice == null) ? com.google.common.collect.ImmutableSet.of() : this.dangerMice.build()); java.util.NavigableMap things = ((this.things == null) ? com.google.common.collect.ImmutableSortedMap.of() : this.things.build()); java.util.Collection> doohickeys = ((this.doohickeys == null) ? com.google.common.collect.ImmutableList.>of() : this.doohickeys.build()); return new BuilderSingularRedirectToGuava(dangerMice, things, doohickeys); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((("BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder(dangerMice=" + this.dangerMice) + ", things=") + this.things) + ", doohickeys=") + this.doohickeys) + ")"); } } private @Singular Set dangerMice; private @Singular NavigableMap things; private @Singular Collection> doohickeys; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuava(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuava(final Set dangerMice, final NavigableMap things, final Collection> doohickeys) { super(); this.dangerMice = dangerMice; this.things = things; this.doohickeys = doohickeys; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularRedirectToGuavaBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularRedirectToGuavaBuilder builder() { return new BuilderSingularRedirectToGuavaBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularSets.java b/test/transform/resource/after-ecj/BuilderSingularSets.java index 49a87fe9..118eb16f 100644 --- a/test/transform/resource/after-ecj/BuilderSingularSets.java +++ b/test/transform/resource/after-ecj/BuilderSingularSets.java @@ -2,83 +2,83 @@ import java.util.Set; import java.util.SortedSet; import lombok.Singular; @lombok.Builder class BuilderSingularSets { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderSingularSetsBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList dangerMice; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList octopodes; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList rawSet; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList stringSet; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularSetsBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList dangerMice; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList octopodes; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList rawSet; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList stringSet; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder dangerMouse(T dangerMouse) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder dangerMouse(T dangerMouse) { if ((this.dangerMice == null)) this.dangerMice = new java.util.ArrayList(); this.dangerMice.add(dangerMouse); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder dangerMice(java.util.Collection dangerMice) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder dangerMice(java.util.Collection dangerMice) { if ((this.dangerMice == null)) this.dangerMice = new java.util.ArrayList(); this.dangerMice.addAll(dangerMice); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder clearDangerMice() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder clearDangerMice() { if ((this.dangerMice != null)) this.dangerMice.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder octopus(Number octopus) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder octopus(Number octopus) { if ((this.octopodes == null)) this.octopodes = new java.util.ArrayList(); this.octopodes.add(octopus); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder octopodes(java.util.Collection octopodes) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder octopodes(java.util.Collection octopodes) { if ((this.octopodes == null)) this.octopodes = new java.util.ArrayList(); this.octopodes.addAll(octopodes); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder clearOctopodes() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder clearOctopodes() { if ((this.octopodes != null)) this.octopodes.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder rawSet(java.lang.Object rawSet) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder rawSet(java.lang.Object rawSet) { if ((this.rawSet == null)) this.rawSet = new java.util.ArrayList(); this.rawSet.add(rawSet); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder rawSet(java.util.Collection rawSet) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder rawSet(java.util.Collection rawSet) { if ((this.rawSet == null)) this.rawSet = new java.util.ArrayList(); this.rawSet.addAll(rawSet); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder clearRawSet() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder clearRawSet() { if ((this.rawSet != null)) this.rawSet.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder stringSet(String stringSet) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder stringSet(String stringSet) { if ((this.stringSet == null)) this.stringSet = new java.util.ArrayList(); this.stringSet.add(stringSet); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder stringSet(java.util.Collection stringSet) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder stringSet(java.util.Collection stringSet) { if ((this.stringSet == null)) this.stringSet = new java.util.ArrayList(); this.stringSet.addAll(stringSet); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder clearStringSet() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder clearStringSet() { if ((this.stringSet != null)) this.stringSet.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSets build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSets build() { java.util.Set dangerMice; switch (((this.dangerMice == null) ? 0 : this.dangerMice.size())) { case 0 : @@ -124,7 +124,7 @@ import lombok.Singular; } return new BuilderSingularSets(dangerMice, octopodes, rawSet, stringSet); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((((("BuilderSingularSets.BuilderSingularSetsBuilder(dangerMice=" + this.dangerMice) + ", octopodes=") + this.octopodes) + ", rawSet=") + this.rawSet) + ", stringSet=") + this.stringSet) + ")"); } } @@ -132,14 +132,14 @@ import lombok.Singular; private @Singular SortedSet octopodes; private @SuppressWarnings("all") @Singular("rawSet") Set rawSet; private @Singular("stringSet") Set stringSet; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSets(final Set dangerMice, final SortedSet octopodes, final Set rawSet, final Set stringSet) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSets(final Set dangerMice, final SortedSet octopodes, final Set rawSet, final Set stringSet) { super(); this.dangerMice = dangerMice; this.octopodes = octopodes; this.rawSet = rawSet; this.stringSet = stringSet; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularSetsBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularSetsBuilder builder() { return new BuilderSingularSetsBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java b/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java index 1351ae15..c0e4af75 100644 --- a/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java +++ b/test/transform/resource/after-ecj/BuilderSingularWithPrefixes.java @@ -1,28 +1,28 @@ import lombok.Singular; @lombok.Builder @lombok.experimental.Accessors(prefix = "_") class BuilderSingularWithPrefixes { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderSingularWithPrefixesBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList elems; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularWithPrefixesBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularWithPrefixesBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList elems; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularWithPrefixesBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularWithPrefixesBuilder elem(String elem) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularWithPrefixesBuilder elem(String elem) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.add(elem); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularWithPrefixesBuilder elems(java.util.Collection elems) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularWithPrefixesBuilder elems(java.util.Collection elems) { if ((this.elems == null)) this.elems = new java.util.ArrayList(); this.elems.addAll(elems); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularWithPrefixesBuilder clearElems() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularWithPrefixesBuilder clearElems() { if ((this.elems != null)) this.elems.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularWithPrefixes build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularWithPrefixes build() { java.util.List elems; switch (((this.elems == null) ? 0 : this.elems.size())) { case 0 : @@ -36,16 +36,16 @@ import lombok.Singular; } return new BuilderSingularWithPrefixes(elems); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder(elems=" + this.elems) + ")"); } } private @Singular java.util.List _elems; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularWithPrefixes(final java.util.List elems) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularWithPrefixes(final java.util.List elems) { super(); this._elems = elems; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderSingularWithPrefixesBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularWithPrefixesBuilder builder() { return new BuilderSingularWithPrefixesBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderValueData.java b/test/transform/resource/after-ecj/BuilderValueData.java index 855979f1..4fcc04bf 100644 --- a/test/transform/resource/after-ecj/BuilderValueData.java +++ b/test/transform/resource/after-ecj/BuilderValueData.java @@ -1,27 +1,27 @@ import java.util.List; final @lombok.Builder @lombok.Value class BuilderAndValue { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderAndValueBuilder { - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderAndValueBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderAndValueBuilder { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderAndValueBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderAndValue build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderAndValue build() { return new BuilderAndValue(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "BuilderAndValue.BuilderAndValueBuilder()"; } } private final int zero = 0; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderAndValue() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderAndValue() { super(); } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderAndValueBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderAndValueBuilder builder() { return new BuilderAndValueBuilder(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getZero() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getZero() { return this.zero; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof BuilderAndValue))) @@ -31,39 +31,39 @@ final @lombok.Builder @lombok.Value class BuilderAndValue { return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getZero()); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("BuilderAndValue(zero=" + this.getZero()) + ")"); } } @lombok.Builder @lombok.Data class BuilderAndData { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderAndDataBuilder { - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderAndDataBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderAndDataBuilder { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderAndDataBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderAndData build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderAndData build() { return new BuilderAndData(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "BuilderAndData.BuilderAndDataBuilder()"; } } private final int zero = 0; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderAndData() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderAndData() { super(); } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderAndDataBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderAndDataBuilder builder() { return new BuilderAndDataBuilder(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getZero() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getZero() { return this.zero; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof BuilderAndData))) @@ -75,16 +75,16 @@ final @lombok.Builder @lombok.Value class BuilderAndValue { return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof BuilderAndData); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getZero()); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("BuilderAndData(zero=" + this.getZero()) + ")"); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderWithAccessors.java b/test/transform/resource/after-ecj/BuilderWithAccessors.java index 2846fd80..de93a75c 100644 --- a/test/transform/resource/after-ecj/BuilderWithAccessors.java +++ b/test/transform/resource/after-ecj/BuilderWithAccessors.java @@ -1,32 +1,32 @@ @lombok.Builder @lombok.experimental.Accessors(prefix = {"p", "_"}) class BuilderWithAccessors { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderWithAccessorsBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int plower; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int upper; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int foo; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int _bar; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithAccessorsBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderWithAccessorsBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int plower; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int upper; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int foo; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int _bar; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithAccessorsBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithAccessorsBuilder plower(final int plower) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithAccessorsBuilder plower(final int plower) { this.plower = plower; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithAccessorsBuilder upper(final int upper) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithAccessorsBuilder upper(final int upper) { this.upper = upper; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithAccessorsBuilder foo(final int foo) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithAccessorsBuilder foo(final int foo) { this.foo = foo; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithAccessorsBuilder _bar(final int _bar) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithAccessorsBuilder _bar(final int _bar) { this._bar = _bar; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithAccessors build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithAccessors build() { return new BuilderWithAccessors(plower, upper, foo, _bar); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((((("BuilderWithAccessors.BuilderWithAccessorsBuilder(plower=" + this.plower) + ", upper=") + this.upper) + ", foo=") + this.foo) + ", _bar=") + this._bar) + ")"); } } @@ -34,14 +34,14 @@ private final int pUpper; private int _foo; private int __bar; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithAccessors(final int plower, final int upper, final int foo, final int _bar) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithAccessors(final int plower, final int upper, final int foo, final int _bar) { super(); this.plower = plower; this.pUpper = upper; this._foo = foo; this.__bar = _bar; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithAccessorsBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithAccessorsBuilder builder() { return new BuilderWithAccessorsBuilder(); } } diff --git a/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java b/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java index 114d4cfa..1c23e0ee 100644 --- a/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java +++ b/test/transform/resource/after-ecj/BuilderWithExistingBuilderClass.java @@ -1,26 +1,26 @@ import lombok.Builder; class BuilderWithExistingBuilderClass { public static class BuilderWithExistingBuilderClassBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean arg2; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String arg3; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean arg2; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String arg3; private Z arg1; public void arg2(boolean arg) { } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithExistingBuilderClassBuilder() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithExistingBuilderClassBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithExistingBuilderClassBuilder arg1(final Z arg1) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithExistingBuilderClassBuilder arg1(final Z arg1) { this.arg1 = arg1; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithExistingBuilderClassBuilder arg3(final String arg3) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithExistingBuilderClassBuilder arg3(final String arg3) { this.arg3 = arg3; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithExistingBuilderClass build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithExistingBuilderClass build() { return BuilderWithExistingBuilderClass.staticMethod(arg1, arg2, arg3); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((("BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder(arg1=" + this.arg1) + ", arg2=") + this.arg2) + ", arg3=") + this.arg3) + ")"); } } @@ -30,7 +30,7 @@ class BuilderWithExistingBuilderClass { public static @Builder BuilderWithExistingBuilderClass staticMethod(Z arg1, boolean arg2, String arg3) { return null; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithExistingBuilderClassBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithExistingBuilderClassBuilder builder() { return new BuilderWithExistingBuilderClassBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/BuilderWithToBuilder.java b/test/transform/resource/after-ecj/BuilderWithToBuilder.java index d1245c70..0d296cb6 100644 --- a/test/transform/resource/after-ecj/BuilderWithToBuilder.java +++ b/test/transform/resource/after-ecj/BuilderWithToBuilder.java @@ -1,44 +1,44 @@ import java.util.List; import lombok.Builder; @Builder(toBuilder = true) @lombok.experimental.Accessors(prefix = "m") class BuilderWithToBuilder { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class BuilderWithToBuilderBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String one; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String two; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated T foo; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.util.ArrayList bars; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilderBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderWithToBuilderBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String one; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String two; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") T foo; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList bars; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilderBuilder one(final String one) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder one(final String one) { this.one = one; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilderBuilder two(final String two) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder two(final String two) { this.two = two; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilderBuilder foo(final T foo) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder foo(final T foo) { this.foo = foo; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilderBuilder bar(T bar) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder bar(T bar) { if ((this.bars == null)) this.bars = new java.util.ArrayList(); this.bars.add(bar); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilderBuilder bars(java.util.Collection bars) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder bars(java.util.Collection bars) { if ((this.bars == null)) this.bars = new java.util.ArrayList(); this.bars.addAll(bars); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilderBuilder clearBars() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder clearBars() { if ((this.bars != null)) this.bars.clear(); return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilder build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilder build() { java.util.List bars; switch (((this.bars == null) ? 0 : this.bars.size())) { case 0 : @@ -52,7 +52,7 @@ import lombok.Builder; } return new BuilderWithToBuilder(one, two, foo, bars); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((((("BuilderWithToBuilder.BuilderWithToBuilderBuilder(one=" + this.one) + ", two=") + this.two) + ", foo=") + this.foo) + ", bars=") + this.bars) + ")"); } } @@ -63,39 +63,39 @@ import lombok.Builder; public static K rrr(BuilderWithToBuilder x) { return x.foo; } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilder(final String one, final String two, final T foo, final List bars) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilder(final String one, final String two, final T foo, final List bars) { super(); this.mOne = one; this.mTwo = two; this.foo = foo; this.bars = bars; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilderBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder builder() { return new BuilderWithToBuilderBuilder(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithToBuilderBuilder toBuilder() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder toBuilder() { return new BuilderWithToBuilderBuilder().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)).bars(this.bars); } } @lombok.experimental.Accessors(prefix = "m") class ConstructorWithToBuilder { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class ConstructorWithToBuilderBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String mOne; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated T bar; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConstructorWithToBuilderBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class ConstructorWithToBuilderBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String mOne; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") T bar; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConstructorWithToBuilderBuilder mOne(final String mOne) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConstructorWithToBuilderBuilder bar(final T bar) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder bar(final T bar) { this.bar = bar; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConstructorWithToBuilder build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilder build() { return new ConstructorWithToBuilder(mOne, bar); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(mOne=" + this.mOne) + ", bar=") + this.bar) + ")"); } } @@ -106,32 +106,32 @@ import lombok.Builder; public @Builder(toBuilder = true) ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T bar) { super(); } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConstructorWithToBuilderBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder builder() { return new ConstructorWithToBuilderBuilder(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConstructorWithToBuilderBuilder toBuilder() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder toBuilder() { return new ConstructorWithToBuilderBuilder().mOne(this.mOne).bar(this.foo); } } @lombok.experimental.Accessors(prefix = "m") class StaticWithToBuilder { - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated class StaticWithToBuilderBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String mOne; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Z bar; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StaticWithToBuilderBuilder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class StaticWithToBuilderBuilder { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String mOne; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Z bar; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StaticWithToBuilderBuilder mOne(final String mOne) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder mOne(final String mOne) { this.mOne = mOne; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StaticWithToBuilderBuilder bar(final Z bar) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder bar(final Z bar) { this.bar = bar; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StaticWithToBuilder build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilder build() { return StaticWithToBuilder.test(mOne, bar); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("StaticWithToBuilder.StaticWithToBuilderBuilder(mOne=" + this.mOne) + ", bar=") + this.bar) + ")"); } } @@ -146,10 +146,10 @@ import lombok.Builder; public static @Builder(toBuilder = true) StaticWithToBuilder test(String mOne, @Builder.ObtainVia(field = "foo") Z bar) { return new StaticWithToBuilder(); } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StaticWithToBuilderBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder builder() { return new StaticWithToBuilderBuilder(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated StaticWithToBuilderBuilder toBuilder() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder toBuilder() { return new StaticWithToBuilderBuilder().mOne(this.mOne).bar(this.foo); } } diff --git a/test/transform/resource/after-ecj/BuilderWithTolerate.java b/test/transform/resource/after-ecj/BuilderWithTolerate.java index ec6ae542..0b9b46a0 100644 --- a/test/transform/resource/after-ecj/BuilderWithTolerate.java +++ b/test/transform/resource/after-ecj/BuilderWithTolerate.java @@ -2,21 +2,21 @@ import lombok.Builder; import lombok.experimental.Tolerate; public @Builder class BuilderWithTolerate { public static class BuilderWithTolerateBuilder { - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int value; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int value; public @Tolerate BuilderWithTolerateBuilder value(String s) { return this.value(Integer.parseInt(s)); } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithTolerateBuilder() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerateBuilder() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithTolerateBuilder value(final int value) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerateBuilder value(final int value) { this.value = value; return this; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithTolerate build() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerate build() { return new BuilderWithTolerate(value); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("BuilderWithTolerate.BuilderWithTolerateBuilder(value=" + this.value) + ")"); } } @@ -24,11 +24,11 @@ public @Builder class BuilderWithTolerate { public static void main(String[] args) { BuilderWithTolerate.builder().value("42").build(); } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithTolerate(final int value) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerate(final int value) { super(); this.value = value; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated BuilderWithTolerateBuilder builder() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerateBuilder builder() { return new BuilderWithTolerateBuilder(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/ClassNamedAfterGetter.java b/test/transform/resource/after-ecj/ClassNamedAfterGetter.java index 33596372..79b422cc 100644 --- a/test/transform/resource/after-ecj/ClassNamedAfterGetter.java +++ b/test/transform/resource/after-ecj/ClassNamedAfterGetter.java @@ -3,7 +3,7 @@ class GetFoo { GetFoo() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getFoo() { return this.foo; } } diff --git a/test/transform/resource/after-ecj/CommentsInterspersed.java b/test/transform/resource/after-ecj/CommentsInterspersed.java index 17eaba9f..95489d54 100644 --- a/test/transform/resource/after-ecj/CommentsInterspersed.java +++ b/test/transform/resource/after-ecj/CommentsInterspersed.java @@ -6,7 +6,7 @@ public class CommentsInterspersed { super(); } public native void gwtTest(); - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getTest() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getTest() { return this.test; } } diff --git a/test/transform/resource/after-ecj/ConflictingStaticConstructorNames.java b/test/transform/resource/after-ecj/ConflictingStaticConstructorNames.java index e508ed14..f9437f0e 100644 --- a/test/transform/resource/after-ecj/ConflictingStaticConstructorNames.java +++ b/test/transform/resource/after-ecj/ConflictingStaticConstructorNames.java @@ -1,5 +1,5 @@ @lombok.Data(staticConstructor = "of") @lombok.NoArgsConstructor class ConflictingStaticConstructorNames { - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof ConflictingStaticConstructorNames))) @@ -9,17 +9,17 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof ConflictingStaticConstructorNames); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "ConflictingStaticConstructorNames()"; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConflictingStaticConstructorNames() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConflictingStaticConstructorNames() { super(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/Constructors.java b/test/transform/resource/after-ecj/Constructors.java index 7537a0f8..4cc24a81 100644 --- a/test/transform/resource/after-ecj/Constructors.java +++ b/test/transform/resource/after-ecj/Constructors.java @@ -1,7 +1,7 @@ @lombok.RequiredArgsConstructor class RequiredArgsConstructor1 { final int x; String name; - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated RequiredArgsConstructor1(final int x) { + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructor1(final int x) { super(); this.x = x; } @@ -9,7 +9,7 @@ @lombok.RequiredArgsConstructor(access = lombok.AccessLevel.PROTECTED) class RequiredArgsConstructorAccess { final int x; String name; - protected @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated RequiredArgsConstructorAccess(final int x) { + protected @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorAccess(final int x) { super(); this.x = x; } @@ -17,18 +17,18 @@ @lombok.RequiredArgsConstructor(staticName = "staticname") class RequiredArgsConstructorStaticName { final int x; String name; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated RequiredArgsConstructorStaticName(final int x) { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticName(final int x) { super(); this.x = x; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated RequiredArgsConstructorStaticName staticname(final int x) { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticName staticname(final int x) { return new RequiredArgsConstructorStaticName(x); } } @lombok.RequiredArgsConstructor() class RequiredArgsConstructorWithAnnotations { final int x; String name; - public @Deprecated @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated RequiredArgsConstructorWithAnnotations(final int x) { + public @Deprecated @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorWithAnnotations(final int x) { super(); this.x = x; } @@ -36,7 +36,7 @@ @lombok.AllArgsConstructor class AllArgsConstructor1 { final int x; String name; - public @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated AllArgsConstructor1(final int x, final String name) { + public @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") AllArgsConstructor1(final int x, final String name) { super(); this.x = x; this.name = name; @@ -45,35 +45,35 @@ @lombok.NoArgsConstructor class NoArgsConstructor1 { int x; String name; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated NoArgsConstructor1() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") NoArgsConstructor1() { super(); } } @lombok.RequiredArgsConstructor(staticName = "of") class RequiredArgsConstructorStaticNameGenerics { final T x; String name; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated RequiredArgsConstructorStaticNameGenerics(final T x) { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticNameGenerics(final T x) { super(); this.x = x; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated RequiredArgsConstructorStaticNameGenerics of(final T x) { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticNameGenerics of(final T x) { return new RequiredArgsConstructorStaticNameGenerics(x); } } @lombok.RequiredArgsConstructor(staticName = "of") class RequiredArgsConstructorStaticNameGenerics2 { final Class x; String name; - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated RequiredArgsConstructorStaticNameGenerics2(final Class x) { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticNameGenerics2(final Class x) { super(); this.x = x; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated RequiredArgsConstructorStaticNameGenerics2 of(final Class x) { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") RequiredArgsConstructorStaticNameGenerics2 of(final Class x) { return new RequiredArgsConstructorStaticNameGenerics2(x); } } @lombok.AllArgsConstructor(access = lombok.AccessLevel.PACKAGE) class AllArgsConstructorPackageAccess { final String x; - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated AllArgsConstructorPackageAccess(final String x) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") AllArgsConstructorPackageAccess(final String x) { super(); this.x = x; } @@ -86,7 +86,7 @@ final float f; final String s; byte z; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated NoArgsConstructor2() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") NoArgsConstructor2() { super(); this.x = 0; this.y = 0D; diff --git a/test/transform/resource/after-ecj/ConstructorsConfiguration.java b/test/transform/resource/after-ecj/ConstructorsConfiguration.java index 8bd1e38b..33a95181 100644 --- a/test/transform/resource/after-ecj/ConstructorsConfiguration.java +++ b/test/transform/resource/after-ecj/ConstructorsConfiguration.java @@ -1,13 +1,13 @@ @lombok.AllArgsConstructor class ConstructorsConfiguration { int x; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConstructorsConfiguration(final int x) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorsConfiguration(final int x) { super(); this.x = x; } } @lombok.AllArgsConstructor(suppressConstructorProperties = false) class ConstructorsConfigurationExplicit { int x; - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConstructorsConfigurationExplicit(final int x) { + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorsConfigurationExplicit(final int x) { super(); this.x = x; } diff --git a/test/transform/resource/after-ecj/ConstructorsWithAccessors.java b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java index 27ff3488..7c691b42 100644 --- a/test/transform/resource/after-ecj/ConstructorsWithAccessors.java +++ b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java @@ -3,7 +3,7 @@ int pUpper; int _huh; int __huh2; - public @java.beans.ConstructorProperties({"plower", "upper", "huh", "_huh2"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ConstructorsWithAccessors(final int plower, final int upper, final int huh, final int _huh2) { + public @java.beans.ConstructorProperties({"plower", "upper", "huh", "_huh2"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorsWithAccessors(final int plower, final int upper, final int huh, final int _huh2) { super(); this.plower = plower; this.pUpper = upper; diff --git a/test/transform/resource/after-ecj/DataConfiguration.java b/test/transform/resource/after-ecj/DataConfiguration.java index 83b95737..4ca1f093 100644 --- a/test/transform/resource/after-ecj/DataConfiguration.java +++ b/test/transform/resource/after-ecj/DataConfiguration.java @@ -1,9 +1,9 @@ @lombok.Data class DataConfiguration { final int x; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof DataConfiguration))) @@ -15,19 +15,19 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof DataConfiguration); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("DataConfiguration(x=" + this.getX()) + ")"); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated DataConfiguration(final int x) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") DataConfiguration(final int x) { super(); this.x = x; } diff --git a/test/transform/resource/after-ecj/DataExtended.java b/test/transform/resource/after-ecj/DataExtended.java index 875b4cd7..46446a0f 100644 --- a/test/transform/resource/after-ecj/DataExtended.java +++ b/test/transform/resource/after-ecj/DataExtended.java @@ -1,12 +1,12 @@ @lombok.Data @lombok.ToString(doNotUseGetters = true) class DataExtended { int x; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setX(final int x) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setX(final int x) { this.x = x; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof DataExtended))) @@ -18,19 +18,19 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof DataExtended); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); return result; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated DataExtended() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") DataExtended() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("DataExtended(x=" + this.x) + ")"); } } diff --git a/test/transform/resource/after-ecj/DataIgnore.java b/test/transform/resource/after-ecj/DataIgnore.java index 264f9927..dbf9713f 100644 --- a/test/transform/resource/after-ecj/DataIgnore.java +++ b/test/transform/resource/after-ecj/DataIgnore.java @@ -1,10 +1,10 @@ @lombok.Data class DataIgnore { final int x; String $name; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof DataIgnore))) @@ -16,19 +16,19 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof DataIgnore); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("DataIgnore(x=" + this.getX()) + ")"); } - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated DataIgnore(final int x) { + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") DataIgnore(final int x) { super(); this.x = x; } diff --git a/test/transform/resource/after-ecj/DataOnEnum.java b/test/transform/resource/after-ecj/DataOnEnum.java index c80696dd..917a840b 100644 --- a/test/transform/resource/after-ecj/DataOnEnum.java +++ b/test/transform/resource/after-ecj/DataOnEnum.java @@ -3,13 +3,13 @@ public @lombok.Getter @lombok.ToString @lombok.RequiredArgsConstructor enum Data private final String someField; () { } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getSomeField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getSomeField() { return this.someField; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("DataOnEnum(someField=" + this.getSomeField()) + ")"); } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated DataOnEnum(final String someField) { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") DataOnEnum(final String someField) { super(); this.someField = someField; } diff --git a/test/transform/resource/after-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java index ee7682bd..9d6bced1 100644 --- a/test/transform/resource/after-ecj/DataOnLocalClass.java +++ b/test/transform/resource/after-ecj/DataOnLocalClass.java @@ -7,16 +7,16 @@ class DataOnLocalClass1 { @Data class Local { final int x; String name; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getName() { return this.name; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setName(final String name) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setName(final String name) { this.name = name; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Local))) @@ -32,10 +32,10 @@ class DataOnLocalClass1 { return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof Local); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); @@ -43,10 +43,10 @@ class DataOnLocalClass1 { result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("Local(x=" + this.getX()) + ", name=") + this.getName()) + ")"); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Local(final int x) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Local(final int x) { super(); this.x = x; } @@ -58,17 +58,17 @@ class DataOnLocalClass2 { @Data class Local { @Data class InnerLocal { @lombok.NonNull String name; - public @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getName() { + public @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getName() { return this.name; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setName(final @lombok.NonNull String name) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setName(final @lombok.NonNull String name) { if ((name == null)) { throw new java.lang.NullPointerException("name"); } this.name = name; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Local.InnerLocal))) @@ -82,20 +82,20 @@ class DataOnLocalClass2 { return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof Local.InnerLocal); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; final java.lang.Object $name = this.getName(); result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("Local.InnerLocal(name=" + this.getName()) + ")"); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated InnerLocal(final @lombok.NonNull String name) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InnerLocal(final @lombok.NonNull String name) { super(); if ((name == null)) { @@ -105,10 +105,10 @@ class DataOnLocalClass2 { } } final int x; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Local))) @@ -120,19 +120,19 @@ class DataOnLocalClass2 { return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof Local); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("Local(x=" + this.getX()) + ")"); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Local(final int x) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Local(final int x) { super(); this.x = x; } diff --git a/test/transform/resource/after-ecj/DataPlain.java b/test/transform/resource/after-ecj/DataPlain.java index 708b2102..ba6c75c8 100644 --- a/test/transform/resource/after-ecj/DataPlain.java +++ b/test/transform/resource/after-ecj/DataPlain.java @@ -2,16 +2,16 @@ import lombok.Data; @lombok.Data class Data1 { final int x; String name; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getName() { return this.name; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setName(final String name) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setName(final String name) { this.name = name; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Data1))) @@ -27,10 +27,10 @@ import lombok.Data; return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof Data1); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); @@ -38,10 +38,10 @@ import lombok.Data; result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("Data1(x=" + this.getX()) + ", name=") + this.getName()) + ")"); } - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Data1(final int x) { + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Data1(final int x) { super(); this.x = x; } @@ -49,16 +49,16 @@ import lombok.Data; @Data class Data2 { final int x; String name; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getName() { return this.name; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setName(final String name) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setName(final String name) { this.name = name; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Data2))) @@ -74,10 +74,10 @@ import lombok.Data; return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof Data2); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); @@ -85,10 +85,10 @@ import lombok.Data; result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("Data2(x=" + this.getX()) + ", name=") + this.getName()) + ")"); } - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Data2(final int x) { + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Data2(final int x) { super(); this.x = x; } @@ -96,16 +96,16 @@ import lombok.Data; final @Data class Data3 { final int x; String name; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getName() { return this.name; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setName(final String name) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setName(final String name) { this.name = name; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Data3))) @@ -119,7 +119,7 @@ final @Data class Data3 { return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); @@ -127,10 +127,10 @@ final @Data class Data3 { result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("Data3(x=" + this.getX()) + ", name=") + this.getName()) + ")"); } - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Data3(final int x) { + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Data3(final int x) { super(); this.x = x; } @@ -140,16 +140,16 @@ final @Data @lombok.EqualsAndHashCode(callSuper = true) class Data4 extends java Data4() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setX(final int x) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setX(final int x) { this.x = x; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("Data4(x=" + this.getX()) + ")"); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Data4))) @@ -163,10 +163,10 @@ final @Data @lombok.EqualsAndHashCode(callSuper = true) class Data4 extends java return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof Data4); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + super.hashCode()); @@ -175,7 +175,7 @@ final @Data @lombok.EqualsAndHashCode(callSuper = true) class Data4 extends java } } @Data class Data5 { - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Data5))) @@ -185,36 +185,36 @@ final @Data @lombok.EqualsAndHashCode(callSuper = true) class Data4 extends java return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof Data5); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "Data5()"; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Data5() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Data5() { super(); } } final @Data class Data6 { - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Data6))) return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "Data6()"; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Data6() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Data6() { super(); } } diff --git a/test/transform/resource/after-ecj/DataWithGetter.java b/test/transform/resource/after-ecj/DataWithGetter.java index 62661aad..5a358c89 100644 --- a/test/transform/resource/after-ecj/DataWithGetter.java +++ b/test/transform/resource/after-ecj/DataWithGetter.java @@ -2,13 +2,13 @@ private int x; private int y; private final String z; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setX(final int x) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setX(final int x) { this.x = x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setY(final int y) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setY(final int y) { this.y = y; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof DataWithGetter))) @@ -26,10 +26,10 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof DataWithGetter); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); @@ -38,20 +38,20 @@ result = ((result * PRIME) + (($z == null) ? 43 : $z.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((("DataWithGetter(x=" + this.getX()) + ", y=") + this.getY()) + ", z=") + this.getZ()) + ")"); } - public @java.beans.ConstructorProperties({"z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated DataWithGetter(final String z) { + public @java.beans.ConstructorProperties({"z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") DataWithGetter(final String z) { super(); this.z = z; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getY() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getY() { return this.y; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getZ() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getZ() { return this.z; } } diff --git a/test/transform/resource/after-ecj/DataWithGetterNone.java b/test/transform/resource/after-ecj/DataWithGetterNone.java index c28cf119..b03ce146 100644 --- a/test/transform/resource/after-ecj/DataWithGetterNone.java +++ b/test/transform/resource/after-ecj/DataWithGetterNone.java @@ -2,13 +2,13 @@ private int x; private int y; private final String z; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setX(final int x) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setX(final int x) { this.x = x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setY(final int y) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setY(final int y) { this.y = y; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof DataWithGetterNone))) @@ -26,10 +26,10 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof DataWithGetterNone); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.x); @@ -38,10 +38,10 @@ result = ((result * PRIME) + (($z == null) ? 43 : $z.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((((("DataWithGetterNone(x=" + this.x) + ", y=") + this.y) + ", z=") + this.z) + ")"); } - public @java.beans.ConstructorProperties({"z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated DataWithGetterNone(final String z) { + public @java.beans.ConstructorProperties({"z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") DataWithGetterNone(final String z) { super(); this.z = z; } diff --git a/test/transform/resource/after-ecj/DelegateOnGetter.java b/test/transform/resource/after-ecj/DelegateOnGetter.java index 41c3e7b9..06b57ceb 100644 --- a/test/transform/resource/after-ecj/DelegateOnGetter.java +++ b/test/transform/resource/after-ecj/DelegateOnGetter.java @@ -9,7 +9,7 @@ class DelegateOnGetter { DelegateOnGetter() { super(); } - public @Delegate @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Bar getBar() { + public @Delegate @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Bar getBar() { java.lang.Object value = this.bar.get(); if ((value == null)) { @@ -35,10 +35,10 @@ class DelegateOnGetter { } return (Bar) ((value == this.bar) ? null : value); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getInt() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getInt() { return this.getBar().getInt(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setList(final java.util.ArrayList list) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setList(final java.util.ArrayList list) { this.getBar().setList(list); } } diff --git a/test/transform/resource/after-ecj/DelegateOnGetterNone.java b/test/transform/resource/after-ecj/DelegateOnGetterNone.java index 86e508bc..2018e1e9 100644 --- a/test/transform/resource/after-ecj/DelegateOnGetterNone.java +++ b/test/transform/resource/after-ecj/DelegateOnGetterNone.java @@ -10,10 +10,10 @@ import lombok.Getter; DelegateOnGetterNone() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getInt() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getInt() { return this.bar.getInt(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setList(final java.util.ArrayList list) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setList(final java.util.ArrayList list) { this.bar.setList(list); } } diff --git a/test/transform/resource/after-ecj/DelegateOnMethods.java b/test/transform/resource/after-ecj/DelegateOnMethods.java index 21b84654..3e833ebb 100644 --- a/test/transform/resource/after-ecj/DelegateOnMethods.java +++ b/test/transform/resource/after-ecj/DelegateOnMethods.java @@ -7,7 +7,7 @@ abstract class DelegateOnMethods { super(); } public abstract @Delegate Bar getBar(); - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void bar(final java.util.ArrayList list) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void bar(final java.util.ArrayList list) { this.getBar().bar(list); } } diff --git a/test/transform/resource/after-ecj/DelegateTypesAndExcludes.java b/test/transform/resource/after-ecj/DelegateTypesAndExcludes.java index 31bb0be6..3718c5d9 100644 --- a/test/transform/resource/after-ecj/DelegateTypesAndExcludes.java +++ b/test/transform/resource/after-ecj/DelegateTypesAndExcludes.java @@ -27,10 +27,10 @@ class DelegatePlain { DelegatePlain() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void bar(final java.util.ArrayList list) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void bar(final java.util.ArrayList list) { this.bar.bar(list); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void foo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void foo() { this.foo.foo(); } } diff --git a/test/transform/resource/after-ecj/DelegateWithDeprecated.java b/test/transform/resource/after-ecj/DelegateWithDeprecated.java index 89e78b8c..ab3aa188 100644 --- a/test/transform/resource/after-ecj/DelegateWithDeprecated.java +++ b/test/transform/resource/after-ecj/DelegateWithDeprecated.java @@ -9,13 +9,13 @@ class DelegateWithDeprecated { DelegateWithDeprecated() { super(); } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void deprecatedAnnotation() { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void deprecatedAnnotation() { this.bar.deprecatedAnnotation(); } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void deprecatedComment() { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void deprecatedComment() { this.bar.deprecatedComment(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void notDeprecated() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void notDeprecated() { this.bar.notDeprecated(); } } diff --git a/test/transform/resource/after-ecj/DelegateWithVarargs.java b/test/transform/resource/after-ecj/DelegateWithVarargs.java index 98da057b..a0b5b7b5 100644 --- a/test/transform/resource/after-ecj/DelegateWithVarargs.java +++ b/test/transform/resource/after-ecj/DelegateWithVarargs.java @@ -10,16 +10,16 @@ class DelegateWithVarargs { DelegateWithVarargs() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void array(final int[] array) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void array(final int[] array) { this.bar.array(array); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void arrayVarargs(final int[]... arrayVarargs) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void arrayVarargs(final int[]... arrayVarargs) { this.bar.arrayVarargs(arrayVarargs); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void justOneParameter(final int... varargs) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void justOneParameter(final int... varargs) { this.bar.justOneParameter(varargs); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void multipleParameters(final java.lang.String first, final int... varargs) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void multipleParameters(final java.lang.String first, final int... varargs) { this.bar.multipleParameters(first, varargs); } } diff --git a/test/transform/resource/after-ecj/EqualsAndHashCode.java b/test/transform/resource/after-ecj/EqualsAndHashCode.java index e72352cc..c0bb5bbb 100644 --- a/test/transform/resource/after-ecj/EqualsAndHashCode.java +++ b/test/transform/resource/after-ecj/EqualsAndHashCode.java @@ -7,7 +7,7 @@ EqualsAndHashCode() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCode))) @@ -31,10 +31,10 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof EqualsAndHashCode); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.x); @@ -56,7 +56,7 @@ final @lombok.EqualsAndHashCode class EqualsAndHashCode2 { EqualsAndHashCode2() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCode2))) @@ -74,7 +74,7 @@ final @lombok.EqualsAndHashCode class EqualsAndHashCode2 { return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.x); @@ -91,7 +91,7 @@ final @lombok.EqualsAndHashCode(callSuper = false) class EqualsAndHashCode3 exte EqualsAndHashCode3() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCode3))) @@ -101,10 +101,10 @@ final @lombok.EqualsAndHashCode(callSuper = false) class EqualsAndHashCode3 exte return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof EqualsAndHashCode3); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } @@ -113,7 +113,7 @@ final @lombok.EqualsAndHashCode(callSuper = false) class EqualsAndHashCode3 exte EqualsAndHashCode4() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCode4))) @@ -125,10 +125,10 @@ final @lombok.EqualsAndHashCode(callSuper = false) class EqualsAndHashCode3 exte return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof EqualsAndHashCode4); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + super.hashCode()); diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeConfigKeys1.java b/test/transform/resource/after-ecj/EqualsAndHashCodeConfigKeys1.java index 59c34377..d2c7b201 100644 --- a/test/transform/resource/after-ecj/EqualsAndHashCodeConfigKeys1.java +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeConfigKeys1.java @@ -2,7 +2,7 @@ EqualsAndHashCodeConfigKeys1Parent() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCodeConfigKeys1Parent))) @@ -12,10 +12,10 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof EqualsAndHashCodeConfigKeys1Parent); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } @@ -25,7 +25,7 @@ EqualsAndHashCodeConfigKeys1() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCodeConfigKeys1))) @@ -37,10 +37,10 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof EqualsAndHashCodeConfigKeys1); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.x); diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeConfigKeys2.java b/test/transform/resource/after-ecj/EqualsAndHashCodeConfigKeys2.java index 2ce92965..0b93f980 100644 --- a/test/transform/resource/after-ecj/EqualsAndHashCodeConfigKeys2.java +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeConfigKeys2.java @@ -2,7 +2,7 @@ EqualsAndHashCodeConfigKeys2Parent() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCodeConfigKeys2Parent))) @@ -12,10 +12,10 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof EqualsAndHashCodeConfigKeys2Parent); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } @@ -25,7 +25,7 @@ EqualsAndHashCodeConfigKeys2() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCodeConfigKeys2))) @@ -39,10 +39,10 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof EqualsAndHashCodeConfigKeys2); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + super.hashCode()); diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java index 477ee64c..e4efb336 100644 --- a/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeWithExistingMethods.java @@ -24,7 +24,7 @@ final @lombok.EqualsAndHashCode(callSuper = true) class EqualsAndHashCodeWithExi private boolean canEqual(Object other) { return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCodeWithExistingMethods3))) @@ -38,7 +38,7 @@ final @lombok.EqualsAndHashCode(callSuper = true) class EqualsAndHashCodeWithExi return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + super.hashCode()); diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithOnParam.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithOnParam.java index f7845019..a59d2835 100644 --- a/test/transform/resource/after-ecj/EqualsAndHashCodeWithOnParam.java +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeWithOnParam.java @@ -10,7 +10,7 @@ EqualsAndHashCodeWithOnParam() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final @Nullable java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final @Nullable java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCodeWithOnParam))) @@ -34,10 +34,10 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final @Nullable java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final @Nullable java.lang.Object other) { return (other instanceof EqualsAndHashCodeWithOnParam); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.x); diff --git a/test/transform/resource/after-ecj/EqualsAndHashcodeOfExclude.java b/test/transform/resource/after-ecj/EqualsAndHashcodeOfExclude.java index fda2d69b..283c5430 100644 --- a/test/transform/resource/after-ecj/EqualsAndHashcodeOfExclude.java +++ b/test/transform/resource/after-ecj/EqualsAndHashcodeOfExclude.java @@ -4,7 +4,7 @@ final @lombok.EqualsAndHashCode(of = {"x"}) class EqualsAndHashCodeOf { EqualsAndHashCodeOf() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCodeOf))) @@ -14,7 +14,7 @@ final @lombok.EqualsAndHashCode(of = {"x"}) class EqualsAndHashCodeOf { return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.x); @@ -27,7 +27,7 @@ final @lombok.EqualsAndHashCode(exclude = {"y"}) class EqualsAndHashCodeExclude EqualsAndHashCodeExclude() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof EqualsAndHashCodeExclude))) @@ -37,7 +37,7 @@ final @lombok.EqualsAndHashCode(exclude = {"y"}) class EqualsAndHashCodeExclude return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.x); diff --git a/test/transform/resource/after-ecj/FieldDefaultsViaConfigAndRequiredArgsConstructor.java b/test/transform/resource/after-ecj/FieldDefaultsViaConfigAndRequiredArgsConstructor.java index 50658497..6a727f1d 100644 --- a/test/transform/resource/after-ecj/FieldDefaultsViaConfigAndRequiredArgsConstructor.java +++ b/test/transform/resource/after-ecj/FieldDefaultsViaConfigAndRequiredArgsConstructor.java @@ -1,6 +1,6 @@ @lombok.RequiredArgsConstructor class FieldDefaultsViaConfigAndRequiredArgsConstructor { final int x; - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated FieldDefaultsViaConfigAndRequiredArgsConstructor(final int x) { + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") FieldDefaultsViaConfigAndRequiredArgsConstructor(final int x) { super(); this.x = x; } diff --git a/test/transform/resource/after-ecj/GenerateSuppressFBWarnings.java b/test/transform/resource/after-ecj/GenerateSuppressFBWarnings.java index 78c46eae..407d41b6 100644 --- a/test/transform/resource/after-ecj/GenerateSuppressFBWarnings.java +++ b/test/transform/resource/after-ecj/GenerateSuppressFBWarnings.java @@ -3,7 +3,7 @@ class GenerateSuppressFBWarnings { GenerateSuppressFBWarnings() { super(); } - public @java.lang.SuppressWarnings("all") @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(justification = "generated code") @javax.annotation.Generated("lombok") @lombok.Generated int getY() { + public @java.lang.SuppressWarnings("all") @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(justification = "generated code") @javax.annotation.Generated("lombok") int getY() { return this.y; } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/GeneratedGlobalOff.java b/test/transform/resource/after-ecj/GeneratedGlobalOff.java deleted file mode 100644 index 046bac10..00000000 --- a/test/transform/resource/after-ecj/GeneratedGlobalOff.java +++ /dev/null @@ -1,9 +0,0 @@ -class GeneratedGlobalOff { - @lombok.Getter int x; - GeneratedGlobalOff() { - super(); - } - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } -} diff --git a/test/transform/resource/after-ecj/GeneratedGlobalOffJavaxOn.java b/test/transform/resource/after-ecj/GeneratedGlobalOffJavaxOn.java deleted file mode 100644 index 25aea362..00000000 --- a/test/transform/resource/after-ecj/GeneratedGlobalOffJavaxOn.java +++ /dev/null @@ -1,9 +0,0 @@ -class GeneratedGlobalOffJavaxOn { - @lombok.Getter int x; - GeneratedGlobalOffJavaxOn() { - super(); - } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { - return this.x; - } -} diff --git a/test/transform/resource/after-ecj/GeneratedGlobalOffLombokOn.java b/test/transform/resource/after-ecj/GeneratedGlobalOffLombokOn.java deleted file mode 100644 index edb72863..00000000 --- a/test/transform/resource/after-ecj/GeneratedGlobalOffLombokOn.java +++ /dev/null @@ -1,9 +0,0 @@ -class GeneratedGlobalOffLombokOn { - @lombok.Getter int x; - GeneratedGlobalOffLombokOn() { - super(); - } - public @java.lang.SuppressWarnings("all") @lombok.Generated int getX() { - return this.x; - } -} diff --git a/test/transform/resource/after-ecj/GeneratedJavaxOff.java b/test/transform/resource/after-ecj/GeneratedJavaxOff.java index 43c2e954..481e0ba9 100644 --- a/test/transform/resource/after-ecj/GeneratedJavaxOff.java +++ b/test/transform/resource/after-ecj/GeneratedJavaxOff.java @@ -3,7 +3,7 @@ class GeneratedJavaxOff { GeneratedJavaxOff() { super(); } - public @java.lang.SuppressWarnings("all") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") int getX() { return this.x; } } diff --git a/test/transform/resource/after-ecj/GeneratedJavaxOnLombokOn.java b/test/transform/resource/after-ecj/GeneratedJavaxOnLombokOn.java new file mode 100644 index 00000000..dc4537b9 --- /dev/null +++ b/test/transform/resource/after-ecj/GeneratedJavaxOnLombokOn.java @@ -0,0 +1,9 @@ +class GeneratedJavaxOnLombokOn { + @lombok.Getter int x; + GeneratedJavaxOnLombokOn() { + super(); + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + return this.x; + } +} diff --git a/test/transform/resource/after-ecj/GeneratedLombokOff.java b/test/transform/resource/after-ecj/GeneratedLombokOff.java deleted file mode 100644 index 2f153ec7..00000000 --- a/test/transform/resource/after-ecj/GeneratedLombokOff.java +++ /dev/null @@ -1,9 +0,0 @@ -class GeneratedLombokOff { - @lombok.Getter int x; - GeneratedLombokOff() { - super(); - } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { - return this.x; - } -} diff --git a/test/transform/resource/after-ecj/GeneratedOff.java b/test/transform/resource/after-ecj/GeneratedOff.java new file mode 100644 index 00000000..2644e42c --- /dev/null +++ b/test/transform/resource/after-ecj/GeneratedOff.java @@ -0,0 +1,9 @@ +class GeneratedOff { + @lombok.Getter int x; + GeneratedOff() { + super(); + } + public @java.lang.SuppressWarnings("all") int getX() { + return this.x; + } +} diff --git a/test/transform/resource/after-ecj/GeneratedOffJavaxOn.java b/test/transform/resource/after-ecj/GeneratedOffJavaxOn.java new file mode 100644 index 00000000..c21b5379 --- /dev/null +++ b/test/transform/resource/after-ecj/GeneratedOffJavaxOn.java @@ -0,0 +1,9 @@ +class GeneratedOffJavaxOn { + @lombok.Getter int x; + GeneratedOffJavaxOn() { + super(); + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { + return this.x; + } +} diff --git a/test/transform/resource/after-ecj/GeneratedOffLombokOn.java b/test/transform/resource/after-ecj/GeneratedOffLombokOn.java new file mode 100644 index 00000000..4d215593 --- /dev/null +++ b/test/transform/resource/after-ecj/GeneratedOffLombokOn.java @@ -0,0 +1,9 @@ +class GeneratedOffLombokOn { + @lombok.Getter int x; + GeneratedOffLombokOn() { + super(); + } + public @java.lang.SuppressWarnings("all") @lombok.Generated int getX() { + return this.x; + } +} diff --git a/test/transform/resource/after-ecj/GetterAccessLevel.java b/test/transform/resource/after-ecj/GetterAccessLevel.java index 9988a240..533e05cc 100644 --- a/test/transform/resource/after-ecj/GetterAccessLevel.java +++ b/test/transform/resource/after-ecj/GetterAccessLevel.java @@ -13,31 +13,31 @@ class GetterAccessLevel { GetterAccessLevel() { super(); } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isPrivate() { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isPrivate() { return this.isPrivate; } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isPackage() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isPackage() { return this.isPackage; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isProtected() { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isProtected() { return this.isProtected; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isPublic() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isPublic() { return this.isPublic; } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getPrivateString() { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getPrivateString() { return this.privateString; } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getPackageString() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getPackageString() { return this.packageString; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getProtectedString() { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getProtectedString() { return this.protectedString; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getPublicString() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getPublicString() { return this.publicString; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getValue() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getValue() { return this.value; } } diff --git a/test/transform/resource/after-ecj/GetterAlreadyExists.java b/test/transform/resource/after-ecj/GetterAlreadyExists.java index 6e3a5d08..b0856dce 100644 --- a/test/transform/resource/after-ecj/GetterAlreadyExists.java +++ b/test/transform/resource/after-ecj/GetterAlreadyExists.java @@ -6,7 +6,7 @@ class Getter1 { boolean hasFoo() { return true; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isFoo() { return this.foo; } } @@ -36,7 +36,7 @@ class Getter4 { String hasFoo() { return null; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getFoo() { return this.foo; } } @@ -48,7 +48,7 @@ class Getter5 { String isFoo() { return null; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getFoo() { return this.foo; } } @@ -69,7 +69,7 @@ class Getter7 { boolean hasFoo() { return false; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getFoo() { return this.foo; } } @@ -81,7 +81,7 @@ class Getter8 { boolean isFoo() { return false; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getFoo() { return this.foo; } } @@ -102,7 +102,7 @@ class Getter10 { static boolean hasFoo() { return false; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isFoo() { return this.foo; } } @@ -132,7 +132,7 @@ class Getter13 { static boolean hasFoo() { return false; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getFoo() { return this.foo; } } @@ -144,7 +144,7 @@ class Getter14 { static boolean isFoo() { return false; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getFoo() { return this.foo; } } @@ -165,7 +165,7 @@ class Getter16 { static String hasFoo() { return ""; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getFoo() { return this.foo; } } @@ -177,7 +177,7 @@ class Getter17 { static String isFoo() { return ""; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getFoo() { return this.foo; } } diff --git a/test/transform/resource/after-ecj/GetterBoolean.java b/test/transform/resource/after-ecj/GetterBoolean.java index 03619e7f..a1d1446e 100644 --- a/test/transform/resource/after-ecj/GetterBoolean.java +++ b/test/transform/resource/after-ecj/GetterBoolean.java @@ -5,13 +5,13 @@ class Getter { Getter() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isFoo() { return this.foo; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isBar() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isBar() { return this.isBar; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isHasBaz() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isHasBaz() { return this.hasBaz; } } @@ -23,7 +23,7 @@ class MoreGetter { boolean hasFoo() { return true; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isFoo() { return this.foo; } } diff --git a/test/transform/resource/after-ecj/GetterDeprecated.java b/test/transform/resource/after-ecj/GetterDeprecated.java index d7e661fb..fc7ce561 100644 --- a/test/transform/resource/after-ecj/GetterDeprecated.java +++ b/test/transform/resource/after-ecj/GetterDeprecated.java @@ -5,10 +5,10 @@ class GetterDeprecated { GetterDeprecated() { super(); } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getAnnotation() { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getAnnotation() { return this.annotation; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getJavadoc() { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getJavadoc() { return this.javadoc; } } diff --git a/test/transform/resource/after-ecj/GetterEnum.java b/test/transform/resource/after-ecj/GetterEnum.java index d54b4809..22a5b0fd 100644 --- a/test/transform/resource/after-ecj/GetterEnum.java +++ b/test/transform/resource/after-ecj/GetterEnum.java @@ -7,13 +7,13 @@ import lombok.RequiredArgsConstructor; private final @Getter String name; () { } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getId() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getId() { return this.id; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getName() { return this.name; } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated GetterEnum(final int id, final String name) { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") GetterEnum(final int id, final String name) { super(); this.id = id; this.name = name; diff --git a/test/transform/resource/after-ecj/GetterLazy.java b/test/transform/resource/after-ecj/GetterLazy.java index e48d5e31..d1ec507c 100644 --- a/test/transform/resource/after-ecj/GetterLazy.java +++ b/test/transform/resource/after-ecj/GetterLazy.java @@ -8,7 +8,7 @@ class GetterLazy { GetterLazy() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ValueType getFieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ValueType getFieldName() { java.lang.Object value = this.fieldName.get(); if ((value == null)) { diff --git a/test/transform/resource/after-ecj/GetterLazyBoolean.java b/test/transform/resource/after-ecj/GetterLazyBoolean.java index 2edae3bc..0a1d2564 100644 --- a/test/transform/resource/after-ecj/GetterLazyBoolean.java +++ b/test/transform/resource/after-ecj/GetterLazyBoolean.java @@ -7,7 +7,7 @@ private static boolean calculateBoolean() { return true; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isBooleanValue() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isBooleanValue() { java.lang.Object value = this.booleanValue.get(); if ((value == null)) { @@ -24,7 +24,7 @@ } return (java.lang.Boolean) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isOtherBooleanValue() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isOtherBooleanValue() { java.lang.Object value = this.otherBooleanValue.get(); if ((value == null)) { @@ -41,7 +41,7 @@ } return (java.lang.Boolean) value; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof GetterLazyBoolean))) @@ -53,16 +53,16 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof GetterLazyBoolean); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + (this.isBooleanValue() ? 79 : 97)); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("GetterLazyBoolean(booleanValue=" + this.isBooleanValue()) + ")"); } } diff --git a/test/transform/resource/after-ecj/GetterLazyEahcToString.java b/test/transform/resource/after-ecj/GetterLazyEahcToString.java index f192555e..40716f8b 100644 --- a/test/transform/resource/after-ecj/GetterLazyEahcToString.java +++ b/test/transform/resource/after-ecj/GetterLazyEahcToString.java @@ -4,7 +4,7 @@ GetterLazyEahcToString() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getValue() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getValue() { java.lang.Object value = this.value.get(); if ((value == null)) { @@ -21,10 +21,10 @@ } return (String) ((value == this.value) ? null : value); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getValue2() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getValue2() { return this.value2; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof GetterLazyEahcToString))) @@ -42,10 +42,10 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof GetterLazyEahcToString); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; final java.lang.Object $value = this.getValue(); @@ -54,7 +54,7 @@ result = ((result * PRIME) + (($value2 == null) ? 43 : $value2.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("GetterLazyEahcToString(value=" + this.getValue()) + ", value2=") + this.value2) + ")"); } } diff --git a/test/transform/resource/after-ecj/GetterLazyInvalid.java b/test/transform/resource/after-ecj/GetterLazyInvalid.java index abfba640..8e2bc4f3 100644 --- a/test/transform/resource/after-ecj/GetterLazyInvalid.java +++ b/test/transform/resource/after-ecj/GetterLazyInvalid.java @@ -27,7 +27,7 @@ class GetterLazyInvalidNone { GetterLazyInvalidClass() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getFieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getFieldName() { return this.fieldName; } } diff --git a/test/transform/resource/after-ecj/GetterLazyNative.java b/test/transform/resource/after-ecj/GetterLazyNative.java index 1bcc3206..40fe1c84 100644 --- a/test/transform/resource/after-ecj/GetterLazyNative.java +++ b/test/transform/resource/after-ecj/GetterLazyNative.java @@ -11,7 +11,7 @@ class GetterLazyNative { GetterLazyNative() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isBooleanField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isBooleanField() { java.lang.Object value = this.booleanField.get(); if ((value == null)) { @@ -28,7 +28,7 @@ class GetterLazyNative { } return (java.lang.Boolean) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated byte getByteField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") byte getByteField() { java.lang.Object value = this.byteField.get(); if ((value == null)) { @@ -45,7 +45,7 @@ class GetterLazyNative { } return (java.lang.Byte) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated short getShortField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") short getShortField() { java.lang.Object value = this.shortField.get(); if ((value == null)) { @@ -62,7 +62,7 @@ class GetterLazyNative { } return (java.lang.Short) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getIntField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getIntField() { java.lang.Object value = this.intField.get(); if ((value == null)) { @@ -79,7 +79,7 @@ class GetterLazyNative { } return (java.lang.Integer) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated long getLongField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") long getLongField() { java.lang.Object value = this.longField.get(); if ((value == null)) { @@ -96,7 +96,7 @@ class GetterLazyNative { } return (java.lang.Long) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated float getFloatField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") float getFloatField() { java.lang.Object value = this.floatField.get(); if ((value == null)) { @@ -113,7 +113,7 @@ class GetterLazyNative { } return (java.lang.Float) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated double getDoubleField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") double getDoubleField() { java.lang.Object value = this.doubleField.get(); if ((value == null)) { @@ -130,7 +130,7 @@ class GetterLazyNative { } return (java.lang.Double) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated char getCharField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") char getCharField() { java.lang.Object value = this.charField.get(); if ((value == null)) { @@ -147,7 +147,7 @@ class GetterLazyNative { } return (java.lang.Character) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int[] getIntArrayField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int[] getIntArrayField() { java.lang.Object value = this.intArrayField.get(); if ((value == null)) { diff --git a/test/transform/resource/after-ecj/GetterLazyTransient.java b/test/transform/resource/after-ecj/GetterLazyTransient.java index 73eb920e..9bc0d9ae 100644 --- a/test/transform/resource/after-ecj/GetterLazyTransient.java +++ b/test/transform/resource/after-ecj/GetterLazyTransient.java @@ -5,7 +5,7 @@ class GetterLazyTransient { GetterLazyTransient() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getNonTransientField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getNonTransientField() { java.lang.Object value = this.nonTransientField.get(); if ((value == null)) { @@ -22,7 +22,7 @@ class GetterLazyTransient { } return (java.lang.Integer) value; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getNonLazyTransientField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getNonLazyTransientField() { return this.nonLazyTransientField; } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/GetterNone.java b/test/transform/resource/after-ecj/GetterNone.java index 56c19630..e13379e0 100644 --- a/test/transform/resource/after-ecj/GetterNone.java +++ b/test/transform/resource/after-ecj/GetterNone.java @@ -6,7 +6,7 @@ import lombok.Getter; GetterNone() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getI() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getI() { return this.i; } } diff --git a/test/transform/resource/after-ecj/GetterOnClass.java b/test/transform/resource/after-ecj/GetterOnClass.java index 8a822bcd..deb56392 100644 --- a/test/transform/resource/after-ecj/GetterOnClass.java +++ b/test/transform/resource/after-ecj/GetterOnClass.java @@ -4,7 +4,7 @@ GetterOnClass1() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isPublic() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isPublic() { return this.isPublic; } } @@ -15,10 +15,10 @@ GetterOnClass2() { super(); } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isPackage() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isPackage() { return this.isPackage; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isProtected() { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isProtected() { return this.isProtected; } } @@ -28,7 +28,7 @@ GetterOnClass3() { super(); } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isPackage() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isPackage() { return this.isPackage; } } @@ -38,7 +38,7 @@ GetterOnClass4() { super(); } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isPrivate() { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isPrivate() { return this.isPrivate; } } @@ -48,7 +48,7 @@ GetterOnClass5() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isPublic() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isPublic() { return this.isPublic; } } @@ -58,10 +58,10 @@ GetterOnClass6() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getCouldBeNull() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getCouldBeNull() { return this.couldBeNull; } - public @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getNonNull() { + public @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getNonNull() { return this.nonNull; } } diff --git a/test/transform/resource/after-ecj/GetterOnMethod.java b/test/transform/resource/after-ecj/GetterOnMethod.java index 78cbf44d..6b227326 100644 --- a/test/transform/resource/after-ecj/GetterOnMethod.java +++ b/test/transform/resource/after-ecj/GetterOnMethod.java @@ -7,13 +7,13 @@ class GetterOnMethod { GetterOnMethod() { super(); } - public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getI() { + public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getI() { return this.i; } - public @java.lang.Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getJ() { + public @java.lang.Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getJ() { return this.j; } - public @java.lang.Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getK() { + public @java.lang.Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getK() { return this.k; } } diff --git a/test/transform/resource/after-ecj/GetterOnMethodErrors.java b/test/transform/resource/after-ecj/GetterOnMethodErrors.java index af196221..7ba02422 100644 --- a/test/transform/resource/after-ecj/GetterOnMethodErrors.java +++ b/test/transform/resource/after-ecj/GetterOnMethodErrors.java @@ -8,7 +8,7 @@ class PlaceFillerToMakeSurePositionIsRelevant { GetterOnMethodErrors() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getTest() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getTest() { return this.test; } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/GetterOnMethodErrors2.java b/test/transform/resource/after-ecj/GetterOnMethodErrors2.java index 8801a199..0dfd4c13 100644 --- a/test/transform/resource/after-ecj/GetterOnMethodErrors2.java +++ b/test/transform/resource/after-ecj/GetterOnMethodErrors2.java @@ -12,28 +12,28 @@ class GetterOnMethodErrors2 { GetterOnMethodErrors2() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getBad1() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getBad1() { return this.bad1; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getBad2() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getBad2() { return this.bad2; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getBad3() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getBad3() { return this.bad3; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getBad4() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getBad4() { return this.bad4; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getGood1() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getGood1() { return this.good1; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getGood2() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getGood2() { return this.good2; } - public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getGood3() { + public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getGood3() { return this.good3; } - public @Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getGood4() { + public @Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getGood4() { return this.good4; } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/GetterOnStatic.java b/test/transform/resource/after-ecj/GetterOnStatic.java index ec6d887e..89b83ed0 100644 --- a/test/transform/resource/after-ecj/GetterOnStatic.java +++ b/test/transform/resource/after-ecj/GetterOnStatic.java @@ -6,10 +6,10 @@ class Getter { Getter() { super(); } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean isFoo() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean isFoo() { return Getter.foo; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getBar() { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getBar() { return Getter.bar; } } diff --git a/test/transform/resource/after-ecj/GetterPlain.java b/test/transform/resource/after-ecj/GetterPlain.java index 6e1540ad..d3801b62 100644 --- a/test/transform/resource/after-ecj/GetterPlain.java +++ b/test/transform/resource/after-ecj/GetterPlain.java @@ -5,10 +5,10 @@ class GetterPlain { GetterPlain() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getI() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getI() { return this.i; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getFoo() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getFoo() { return this.foo; } } diff --git a/test/transform/resource/after-ecj/GetterSetterJavadoc.java b/test/transform/resource/after-ecj/GetterSetterJavadoc.java index da2f4324..275b408d 100644 --- a/test/transform/resource/after-ecj/GetterSetterJavadoc.java +++ b/test/transform/resource/after-ecj/GetterSetterJavadoc.java @@ -1,12 +1,12 @@ @lombok.Data class GetterSetterJavadoc1 { private int fieldName; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getFieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getFieldName() { return this.fieldName; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setFieldName(final int fieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setFieldName(final int fieldName) { this.fieldName = fieldName; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof GetterSetterJavadoc1))) @@ -18,19 +18,19 @@ return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof GetterSetterJavadoc1); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getFieldName()); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("GetterSetterJavadoc1(fieldName=" + this.getFieldName()) + ")"); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated GetterSetterJavadoc1() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") GetterSetterJavadoc1() { super(); } } @@ -39,10 +39,10 @@ class GetterSetterJavadoc2 { GetterSetterJavadoc2() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getFieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getFieldName() { return this.fieldName; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setFieldName(final int fieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setFieldName(final int fieldName) { this.fieldName = fieldName; } } @@ -51,10 +51,10 @@ class GetterSetterJavadoc3 { GetterSetterJavadoc3() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getFieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getFieldName() { return this.fieldName; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setFieldName(final int fieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setFieldName(final int fieldName) { this.fieldName = fieldName; } } @@ -63,10 +63,10 @@ class GetterSetterJavadoc3 { GetterSetterJavadoc4() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int fieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int fieldName() { return this.fieldName; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated GetterSetterJavadoc4 fieldName(final int fieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") GetterSetterJavadoc4 fieldName(final int fieldName) { this.fieldName = fieldName; return this; } @@ -76,10 +76,10 @@ class GetterSetterJavadoc3 { GetterSetterJavadoc5() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int fieldName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int fieldName() { return this.fieldName; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated GetterSetterJavadoc5 fieldName(final int fieldName) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") GetterSetterJavadoc5 fieldName(final int fieldName) { this.fieldName = fieldName; return this; } diff --git a/test/transform/resource/after-ecj/GetterWithDollar.java b/test/transform/resource/after-ecj/GetterWithDollar.java index 0223ae16..424635ed 100644 --- a/test/transform/resource/after-ecj/GetterWithDollar.java +++ b/test/transform/resource/after-ecj/GetterWithDollar.java @@ -3,7 +3,7 @@ class GetterWithDollar1 { GetterWithDollar1() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int get$i() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int get$i() { return this.$i; } } @@ -13,10 +13,10 @@ class GetterWithDollar2 { GetterWithDollar2() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int get$i() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int get$i() { return this.$i; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getI() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getI() { return this.i; } } diff --git a/test/transform/resource/after-ecj/MixGetterVal.java b/test/transform/resource/after-ecj/MixGetterVal.java index 92882390..fbc89a02 100644 --- a/test/transform/resource/after-ecj/MixGetterVal.java +++ b/test/transform/resource/after-ecj/MixGetterVal.java @@ -13,7 +13,7 @@ class MixGetterVal { final @val int a = getX(); m(a); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/MultiFieldGetter.java b/test/transform/resource/after-ecj/MultiFieldGetter.java index 0045de34..a608578e 100644 --- a/test/transform/resource/after-ecj/MultiFieldGetter.java +++ b/test/transform/resource/after-ecj/MultiFieldGetter.java @@ -6,10 +6,10 @@ class MultiFieldGetter { MultiFieldGetter() { super(); } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getY() { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getY() { return this.y; } } @@ -19,10 +19,10 @@ class MultiFieldGetter { MultiFieldGetter2() { super(); } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getY() { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getY() { return this.y; } } diff --git a/test/transform/resource/after-ecj/NoArgsConstructorForce.java b/test/transform/resource/after-ecj/NoArgsConstructorForce.java index e191e5eb..d0e69b0d 100644 --- a/test/transform/resource/after-ecj/NoArgsConstructorForce.java +++ b/test/transform/resource/after-ecj/NoArgsConstructorForce.java @@ -3,7 +3,7 @@ public @NoArgsConstructor(force = true) class NoArgsConstructorForce { private final int[] i; private final Object[] o; private final java.util.List[] fullQualifiedList; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated NoArgsConstructorForce() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") NoArgsConstructorForce() { super(); this.i = null; this.o = null; diff --git a/test/transform/resource/after-ecj/NonNullPlain.java b/test/transform/resource/after-ecj/NonNullPlain.java index d9059d7a..592ff4b5 100644 --- a/test/transform/resource/after-ecj/NonNullPlain.java +++ b/test/transform/resource/after-ecj/NonNullPlain.java @@ -5,7 +5,7 @@ import java.lang.annotation.*; @lombok.NonNull int i; @lombok.NonNull String s; @NotNull Object o; - public @java.beans.ConstructorProperties({"i", "s"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated NonNullPlain(final @lombok.NonNull int i, final @lombok.NonNull String s) { + public @java.beans.ConstructorProperties({"i", "s"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") NonNullPlain(final @lombok.NonNull int i, final @lombok.NonNull String s) { super(); if ((s == null)) { @@ -14,26 +14,26 @@ import java.lang.annotation.*; this.i = i; this.s = s; } - public @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getI() { + public @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getI() { return this.i; } - public @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getS() { + public @lombok.NonNull @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getS() { return this.s; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Object getO() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Object getO() { return this.o; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final @lombok.NonNull int i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final @lombok.NonNull int i) { this.i = i; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setS(final @lombok.NonNull String s) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setS(final @lombok.NonNull String s) { if ((s == null)) { throw new java.lang.NullPointerException("s"); } this.s = s; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setO(final Object o) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setO(final Object o) { this.o = o; } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/NonNullWithAlternateException.java b/test/transform/resource/after-ecj/NonNullWithAlternateException.java index a2594b91..1df18538 100644 --- a/test/transform/resource/after-ecj/NonNullWithAlternateException.java +++ b/test/transform/resource/after-ecj/NonNullWithAlternateException.java @@ -10,7 +10,7 @@ public class NonNullWithAlternateException { } System.out.println(arg); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setTest(final @lombok.NonNull String test) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setTest(final @lombok.NonNull String test) { if ((test == null)) { throw new java.lang.IllegalArgumentException("test is null"); diff --git a/test/transform/resource/after-ecj/SetterAccessLevel.java b/test/transform/resource/after-ecj/SetterAccessLevel.java index a23e00cb..db26226f 100644 --- a/test/transform/resource/after-ecj/SetterAccessLevel.java +++ b/test/transform/resource/after-ecj/SetterAccessLevel.java @@ -8,19 +8,19 @@ class SetterAccessLevel { SetterAccessLevel() { super(); } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setPrivate(final boolean isPrivate) { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPrivate(final boolean isPrivate) { this.isPrivate = isPrivate; } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setPackage(final boolean isPackage) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPackage(final boolean isPackage) { this.isPackage = isPackage; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setProtected(final boolean isProtected) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setProtected(final boolean isProtected) { this.isProtected = isProtected; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setPublic(final boolean isPublic) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPublic(final boolean isPublic) { this.isPublic = isPublic; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setValue(final boolean value) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setValue(final boolean value) { this.value = value; } } diff --git a/test/transform/resource/after-ecj/SetterAlreadyExists.java b/test/transform/resource/after-ecj/SetterAlreadyExists.java index 228b07e4..4a4d0c4c 100644 --- a/test/transform/resource/after-ecj/SetterAlreadyExists.java +++ b/test/transform/resource/after-ecj/SetterAlreadyExists.java @@ -37,7 +37,7 @@ class Setter5 { } void setFoo() { } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setFoo(final String foo) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setFoo(final String foo) { this.foo = foo; } } @@ -48,7 +48,7 @@ class Setter6 { } void setFoo(String foo, int x) { } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setFoo(final String foo) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setFoo(final String foo) { this.foo = foo; } } diff --git a/test/transform/resource/after-ecj/SetterDeprecated.java b/test/transform/resource/after-ecj/SetterDeprecated.java index dc899f8e..91008c96 100644 --- a/test/transform/resource/after-ecj/SetterDeprecated.java +++ b/test/transform/resource/after-ecj/SetterDeprecated.java @@ -5,10 +5,10 @@ class SetterDeprecated { SetterDeprecated() { super(); } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setAnnotation(final int annotation) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setAnnotation(final int annotation) { this.annotation = annotation; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setJavadoc(final int javadoc) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setJavadoc(final int javadoc) { this.javadoc = javadoc; } } diff --git a/test/transform/resource/after-ecj/SetterOnClass.java b/test/transform/resource/after-ecj/SetterOnClass.java index e3cebe68..8e6455d3 100644 --- a/test/transform/resource/after-ecj/SetterOnClass.java +++ b/test/transform/resource/after-ecj/SetterOnClass.java @@ -4,7 +4,7 @@ SetterOnClass1() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setPublic(final boolean isPublic) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPublic(final boolean isPublic) { this.isPublic = isPublic; } } @@ -15,10 +15,10 @@ SetterOnClass2() { super(); } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setPackage(final boolean isPackage) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPackage(final boolean isPackage) { this.isPackage = isPackage; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setProtected(final boolean isProtected) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setProtected(final boolean isProtected) { this.isProtected = isProtected; } } @@ -28,7 +28,7 @@ SetterOnClass3() { super(); } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setPackage(final boolean isPackage) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPackage(final boolean isPackage) { this.isPackage = isPackage; } } @@ -38,7 +38,7 @@ SetterOnClass4() { super(); } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setPrivate(final boolean isPrivate) { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPrivate(final boolean isPrivate) { this.isPrivate = isPrivate; } } @@ -48,7 +48,7 @@ SetterOnClass5() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setPublic(final boolean isPublic) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPublic(final boolean isPublic) { this.isPublic = isPublic; } } @@ -58,10 +58,10 @@ SetterOnClass6() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setCouldBeNull(final String couldBeNull) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setCouldBeNull(final String couldBeNull) { this.couldBeNull = couldBeNull; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setNonNull(final @lombok.NonNull String nonNull) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setNonNull(final @lombok.NonNull String nonNull) { if ((nonNull == null)) { throw new java.lang.NullPointerException("nonNull"); diff --git a/test/transform/resource/after-ecj/SetterOnMethod.java b/test/transform/resource/after-ecj/SetterOnMethod.java index 8f4399eb..4eaea8e5 100644 --- a/test/transform/resource/after-ecj/SetterOnMethod.java +++ b/test/transform/resource/after-ecj/SetterOnMethod.java @@ -2,10 +2,10 @@ import lombok.Setter; class SetterOnMethod { @lombok.Setter() int i; @lombok.Setter() int j; - public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final int i) { + public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final int i) { this.i = i; } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setJ(final int j) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setJ(final int j) { this.j = j; } SetterOnMethod() { @@ -15,10 +15,10 @@ class SetterOnMethod { @lombok.Setter() class SetterOnClassOnMethod { int i; int j; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final int i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final int i) { this.i = i; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setJ(final int j) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setJ(final int j) { this.j = j; } SetterOnClassOnMethod() { @@ -28,10 +28,10 @@ class SetterOnMethod { @lombok.Setter() class SetterOnClassAndOnAField { int i; @lombok.Setter() int j; - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setJ(final int j) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setJ(final int j) { this.j = j; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final int i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final int i) { this.i = i; } SetterOnClassAndOnAField() { diff --git a/test/transform/resource/after-ecj/SetterOnMethodOnParam.java b/test/transform/resource/after-ecj/SetterOnMethodOnParam.java index ab580e22..28799f42 100644 --- a/test/transform/resource/after-ecj/SetterOnMethodOnParam.java +++ b/test/transform/resource/after-ecj/SetterOnMethodOnParam.java @@ -7,13 +7,13 @@ class SetterOnMethodOnParam { SetterOnMethodOnParam() { super(); } - public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final int i) { + public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final int i) { this.i = i; } - public @java.lang.Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setJ(final @Test int j) { + public @java.lang.Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setJ(final @Test int j) { this.j = j; } - public @java.lang.Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setK(final @Test int k) { + public @java.lang.Deprecated @Test @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setK(final @Test int k) { this.k = k; } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/SetterOnParam.java b/test/transform/resource/after-ecj/SetterOnParam.java index d91645dc..7c2d1fc6 100644 --- a/test/transform/resource/after-ecj/SetterOnParam.java +++ b/test/transform/resource/after-ecj/SetterOnParam.java @@ -2,10 +2,10 @@ import lombok.Setter; class SetterOnParam { @lombok.Setter() int i; @lombok.Setter() int j; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final @SuppressWarnings("all") int i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final @SuppressWarnings("all") int i) { this.i = i; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setJ(final @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int j) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setJ(final @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int j) { this.j = j; } SetterOnParam() { @@ -15,10 +15,10 @@ class SetterOnParam { @lombok.Setter() class SetterOnClassOnParam { int i; int j; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final int i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final int i) { this.i = i; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setJ(final int j) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setJ(final int j) { this.j = j; } SetterOnClassOnParam() { @@ -28,10 +28,10 @@ class SetterOnParam { @lombok.Setter() class SetterOnClassAndOnAFieldParam { int i; @lombok.Setter() int j; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setJ(final @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int j) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setJ(final @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int j) { this.j = j; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final int i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final int i) { this.i = i; } SetterOnClassAndOnAFieldParam() { diff --git a/test/transform/resource/after-ecj/SetterOnParamAndOnMethod.java b/test/transform/resource/after-ecj/SetterOnParamAndOnMethod.java index fc60c75f..011b2241 100644 --- a/test/transform/resource/after-ecj/SetterOnParamAndOnMethod.java +++ b/test/transform/resource/after-ecj/SetterOnParamAndOnMethod.java @@ -1,6 +1,6 @@ class SetterOnParamAndOnMethod { @lombok.Setter() int i; - public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final @SuppressWarnings("all") int i) { + public @Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final @SuppressWarnings("all") int i) { this.i = i; } SetterOnParamAndOnMethod() { diff --git a/test/transform/resource/after-ecj/SetterOnStatic.java b/test/transform/resource/after-ecj/SetterOnStatic.java index 78799b42..1c5b71ae 100644 --- a/test/transform/resource/after-ecj/SetterOnStatic.java +++ b/test/transform/resource/after-ecj/SetterOnStatic.java @@ -6,10 +6,10 @@ class Setter { Setter() { super(); } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setFoo(final boolean foo) { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setFoo(final boolean foo) { Setter.foo = foo; } - public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setBar(final int bar) { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setBar(final int bar) { Setter.bar = bar; } } diff --git a/test/transform/resource/after-ecj/SetterPlain.java b/test/transform/resource/after-ecj/SetterPlain.java index fc442efb..4f428f0b 100644 --- a/test/transform/resource/after-ecj/SetterPlain.java +++ b/test/transform/resource/after-ecj/SetterPlain.java @@ -5,10 +5,10 @@ class SetterPlain { SetterPlain() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final int i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final int i) { this.i = i; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setFoo(final int foo) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setFoo(final int foo) { this.foo = foo; } } diff --git a/test/transform/resource/after-ecj/SetterWithDollar.java b/test/transform/resource/after-ecj/SetterWithDollar.java index 28fed82f..e8bd91df 100644 --- a/test/transform/resource/after-ecj/SetterWithDollar.java +++ b/test/transform/resource/after-ecj/SetterWithDollar.java @@ -3,7 +3,7 @@ class SetterWithDollar1 { SetterWithDollar1() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void set$i(final int $i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void set$i(final int $i) { this.$i = $i; } } @@ -13,10 +13,10 @@ class SetterWithDollar2 { SetterWithDollar2() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void set$i(final int $i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void set$i(final int $i) { this.$i = $i; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setI(final int i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setI(final int i) { this.i = i; } } diff --git a/test/transform/resource/after-ecj/SimpleTypeResolution.java b/test/transform/resource/after-ecj/SimpleTypeResolution.java index 77d52ada..736632bc 100644 --- a/test/transform/resource/after-ecj/SimpleTypeResolution.java +++ b/test/transform/resource/after-ecj/SimpleTypeResolution.java @@ -7,7 +7,7 @@ class SimpleTypeResolutionSuccess { private @lombok.Getter int x; SimpleTypeResolutionSuccess() { } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } } diff --git a/test/transform/resource/after-ecj/ToStringConfiguration.java b/test/transform/resource/after-ecj/ToStringConfiguration.java index 508c5f5a..ca36d1b4 100644 --- a/test/transform/resource/after-ecj/ToStringConfiguration.java +++ b/test/transform/resource/after-ecj/ToStringConfiguration.java @@ -5,10 +5,10 @@ import lombok.Getter; ToStringConfiguration() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("ToStringConfiguration(" + this.x) + ")"); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } } @@ -17,7 +17,7 @@ import lombok.Getter; ToStringConfiguration2() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("ToStringConfiguration2(x=" + this.x) + ")"); } } @@ -26,10 +26,10 @@ import lombok.Getter; ToStringConfiguration3() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("ToStringConfiguration3(" + this.getX()) + ")"); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/ToStringInner.java b/test/transform/resource/after-ecj/ToStringInner.java index 42fa81af..027ccd0c 100644 --- a/test/transform/resource/after-ecj/ToStringInner.java +++ b/test/transform/resource/after-ecj/ToStringInner.java @@ -5,7 +5,7 @@ import lombok.ToString; ToStringInner() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("ToStringOuter.ToStringInner(y=" + this.y) + ")"); } } @@ -14,7 +14,7 @@ import lombok.ToString; ToStringStaticInner() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("ToStringOuter.ToStringStaticInner(y=" + this.y) + ")"); } } @@ -24,7 +24,7 @@ import lombok.ToString; ToStringMoreInner() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (("ToStringOuter.ToStringMiddle.ToStringMoreInner(name=" + this.name) + ")"); } } @@ -37,7 +37,7 @@ import lombok.ToString; ToStringOuter() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("ToStringOuter(x=" + this.x) + ", name=") + this.name) + ")"); } } diff --git a/test/transform/resource/after-ecj/ToStringPlain.java b/test/transform/resource/after-ecj/ToStringPlain.java index fa87fde9..939aa78e 100644 --- a/test/transform/resource/after-ecj/ToStringPlain.java +++ b/test/transform/resource/after-ecj/ToStringPlain.java @@ -5,7 +5,7 @@ import lombok.ToString; ToString1() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("ToString1(x=" + this.x) + ", name=") + this.name) + ")"); } } @@ -15,7 +15,7 @@ import lombok.ToString; ToString2() { super(); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("ToString2(x=" + this.x) + ", name=") + this.name) + ")"); } } diff --git a/test/transform/resource/after-ecj/Tolerate.java b/test/transform/resource/after-ecj/Tolerate.java index 6b027163..1c7b1038 100644 --- a/test/transform/resource/after-ecj/Tolerate.java +++ b/test/transform/resource/after-ecj/Tolerate.java @@ -7,10 +7,10 @@ import java.util.regex.Pattern; public @lombok.experimental.Tolerate void setPattern(String pattern) { setPattern(Pattern.compile(pattern)); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated void setPattern(final Pattern pattern) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setPattern(final Pattern pattern) { this.pattern = pattern; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Pattern getPattern() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Pattern getPattern() { return this.pattern; } } @@ -22,13 +22,13 @@ import java.util.regex.Pattern; public Tolerate2 withPattern(String nameGlob, String extensionGlob) { return withPattern(((nameGlob.replace("*", ".*") + "\\.") + extensionGlob.replace("*", ".*"))); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Pattern getPattern() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Pattern getPattern() { return this.pattern; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Tolerate2 withPattern(final Pattern pattern) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Tolerate2 withPattern(final Pattern pattern) { return ((this.pattern == pattern) ? this : new Tolerate2(pattern)); } - public @java.beans.ConstructorProperties({"pattern"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Tolerate2(final Pattern pattern) { + public @java.beans.ConstructorProperties({"pattern"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Tolerate2(final Pattern pattern) { super(); this.pattern = pattern; } diff --git a/test/transform/resource/after-ecj/TrickyTypeResolution.java b/test/transform/resource/after-ecj/TrickyTypeResolution.java index aca9050d..5ea802dc 100644 --- a/test/transform/resource/after-ecj/TrickyTypeResolution.java +++ b/test/transform/resource/after-ecj/TrickyTypeResolution.java @@ -20,7 +20,7 @@ class TrickySuccess { TrickySuccess() { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } } diff --git a/test/transform/resource/after-ecj/UtilityClass.java b/test/transform/resource/after-ecj/UtilityClass.java index b2dfc0df..81d5d9e6 100644 --- a/test/transform/resource/after-ecj/UtilityClass.java +++ b/test/transform/resource/after-ecj/UtilityClass.java @@ -11,7 +11,7 @@ final @lombok.experimental.UtilityClass class UtilityClass { static void someMethod() { System.out.println(); } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated UtilityClass() { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") UtilityClass() { super(); throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); } @@ -22,7 +22,7 @@ class UtilityInner { static int member; () { } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated InnerInnerInner() { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InnerInnerInner() { super(); throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); } @@ -36,7 +36,7 @@ class UtilityInner { static int member; () { } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated InsideEnum() { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InsideEnum() { super(); throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); } @@ -54,7 +54,7 @@ class UtilityInner { static int member; () { } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated InsideInterface() { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InsideInterface() { super(); throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated"); } diff --git a/test/transform/resource/after-ecj/ValueCallSuper.java b/test/transform/resource/after-ecj/ValueCallSuper.java index 7d046e56..ecd4a1ef 100644 --- a/test/transform/resource/after-ecj/ValueCallSuper.java +++ b/test/transform/resource/after-ecj/ValueCallSuper.java @@ -4,7 +4,7 @@ class ValueParent { } } final @lombok.Value class ValueCallSuper extends ValueParent { - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof ValueCallSuper))) @@ -16,19 +16,19 @@ final @lombok.Value class ValueCallSuper extends ValueParent { return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof ValueCallSuper); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + super.hashCode()); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "ValueCallSuper()"; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ValueCallSuper() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ValueCallSuper() { super(); } } diff --git a/test/transform/resource/after-ecj/ValueExperimental.java b/test/transform/resource/after-ecj/ValueExperimental.java index 20c6d8f5..92deb614 100644 --- a/test/transform/resource/after-ecj/ValueExperimental.java +++ b/test/transform/resource/after-ecj/ValueExperimental.java @@ -1,39 +1,39 @@ import lombok.experimental.Value; final @Value class ValueExperimental1 { - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof ValueExperimental1))) return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "ValueExperimental1()"; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ValueExperimental1() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ValueExperimental1() { super(); } } final @lombok.experimental.Value class ValueExperimental2 { - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof ValueExperimental2))) return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "ValueExperimental2()"; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ValueExperimental2() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ValueExperimental2() { super(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/ValueExperimentalStarImport.java b/test/transform/resource/after-ecj/ValueExperimentalStarImport.java index 94ff473a..5b366e04 100644 --- a/test/transform/resource/after-ecj/ValueExperimentalStarImport.java +++ b/test/transform/resource/after-ecj/ValueExperimentalStarImport.java @@ -1,20 +1,20 @@ import lombok.experimental.*; final @Value class ValueExperimentalStarImport { - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof ValueExperimentalStarImport))) return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "ValueExperimentalStarImport()"; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ValueExperimentalStarImport() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ValueExperimentalStarImport() { super(); } } diff --git a/test/transform/resource/after-ecj/ValuePlain.java b/test/transform/resource/after-ecj/ValuePlain.java index 594e3f9b..6a3265c9 100644 --- a/test/transform/resource/after-ecj/ValuePlain.java +++ b/test/transform/resource/after-ecj/ValuePlain.java @@ -2,13 +2,13 @@ import lombok.Value; final @lombok.Value class Value1 { private final int x; private final String name; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getName() { return this.name; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Value1))) @@ -22,7 +22,7 @@ final @lombok.Value class Value1 { return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); @@ -30,10 +30,10 @@ final @lombok.Value class Value1 { result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("Value1(x=" + this.getX()) + ", name=") + this.getName()) + ")"); } - public @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Value1(final int x, final String name) { + public @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Value1(final int x, final String name) { super(); this.x = x; this.name = name; @@ -42,13 +42,13 @@ final @lombok.Value class Value1 { @Value @lombok.experimental.NonFinal class Value2 { public final int x; private final String name; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated String getName() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getName() { return this.name; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Value2))) @@ -64,10 +64,10 @@ final @lombok.Value class Value1 { return false; return true; } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean canEqual(final java.lang.Object other) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { return (other instanceof Value2); } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); @@ -75,10 +75,10 @@ final @lombok.Value class Value1 { result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode())); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("Value2(x=" + this.getX()) + ", name=") + this.getName()) + ")"); } - public @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Value2(final int x, final String name) { + public @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Value2(final int x, final String name) { super(); this.x = x; this.name = name; @@ -87,13 +87,13 @@ final @lombok.Value class Value1 { final @Value class Value3 { private @lombok.experimental.NonFinal int x; private final int y; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getX() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { return this.x; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int getY() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getY() { return this.y; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof Value3))) @@ -105,17 +105,17 @@ final @Value class Value3 { return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { final int PRIME = 59; int result = 1; result = ((result * PRIME) + this.getX()); result = ((result * PRIME) + this.getY()); return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return (((("Value3(x=" + this.getX()) + ", y=") + this.getY()) + ")"); } - public @java.beans.ConstructorProperties({"x", "y"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Value3(final int x, final int y) { + public @java.beans.ConstructorProperties({"x", "y"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Value3(final int x, final int y) { super(); this.x = x; this.y = y; diff --git a/test/transform/resource/after-ecj/ValueStaticField.java b/test/transform/resource/after-ecj/ValueStaticField.java index 97677417..75e337ce 100644 --- a/test/transform/resource/after-ecj/ValueStaticField.java +++ b/test/transform/resource/after-ecj/ValueStaticField.java @@ -4,21 +4,21 @@ final @Value class ValueStaticField { static String PASSWORD = "Ken sent me"; () { } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated boolean equals(final java.lang.Object o) { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { if ((o == this)) return true; if ((! (o instanceof ValueStaticField))) return false; return true; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated int hashCode() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { int result = 1; return result; } - public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated java.lang.String toString() { + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { return "ValueStaticField()"; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated ValueStaticField() { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ValueStaticField() { super(); } } \ No newline at end of file diff --git a/test/transform/resource/after-ecj/WitherAccessLevel.java b/test/transform/resource/after-ecj/WitherAccessLevel.java index 3248e8ce..18b896df 100644 --- a/test/transform/resource/after-ecj/WitherAccessLevel.java +++ b/test/transform/resource/after-ecj/WitherAccessLevel.java @@ -9,19 +9,19 @@ class WitherAccessLevel { WitherAccessLevel(boolean isNone, boolean isPrivate, boolean isPackage, boolean isProtected, boolean isPublic, boolean value) { super(); } - private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherAccessLevel withPrivate(final boolean isPrivate) { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherAccessLevel withPrivate(final boolean isPrivate) { return ((this.isPrivate == isPrivate) ? this : new WitherAccessLevel(this.isNone, isPrivate, this.isPackage, this.isProtected, this.isPublic, this.value)); } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherAccessLevel withPackage(final boolean isPackage) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherAccessLevel withPackage(final boolean isPackage) { return ((this.isPackage == isPackage) ? this : new WitherAccessLevel(this.isNone, this.isPrivate, isPackage, this.isProtected, this.isPublic, this.value)); } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherAccessLevel withProtected(final boolean isProtected) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherAccessLevel withProtected(final boolean isProtected) { return ((this.isProtected == isProtected) ? this : new WitherAccessLevel(this.isNone, this.isPrivate, this.isPackage, isProtected, this.isPublic, this.value)); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherAccessLevel withPublic(final boolean isPublic) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherAccessLevel withPublic(final boolean isPublic) { return ((this.isPublic == isPublic) ? this : new WitherAccessLevel(this.isNone, this.isPrivate, this.isPackage, this.isProtected, isPublic, this.value)); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherAccessLevel withValue(final boolean value) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherAccessLevel withValue(final boolean value) { return ((this.value == value) ? this : new WitherAccessLevel(this.isNone, this.isPrivate, this.isPackage, this.isProtected, this.isPublic, value)); } } diff --git a/test/transform/resource/after-ecj/WitherAlreadyExists.java b/test/transform/resource/after-ecj/WitherAlreadyExists.java index 9f1b3e12..f0186ca3 100644 --- a/test/transform/resource/after-ecj/WitherAlreadyExists.java +++ b/test/transform/resource/after-ecj/WitherAlreadyExists.java @@ -37,7 +37,7 @@ class Wither5 { Wither5(String foo) { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Wither5 withFoo(final String foo) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Wither5 withFoo(final String foo) { return ((this.foo == foo) ? this : new Wither5(foo)); } } @@ -48,7 +48,7 @@ class Wither6 { Wither6(String foo) { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated Wither6 withFoo(final String foo) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Wither6 withFoo(final String foo) { return ((this.foo == foo) ? this : new Wither6(foo)); } } diff --git a/test/transform/resource/after-ecj/WitherAndAllArgsConstructor.java b/test/transform/resource/after-ecj/WitherAndAllArgsConstructor.java index db0c5d7d..4443085c 100644 --- a/test/transform/resource/after-ecj/WitherAndAllArgsConstructor.java +++ b/test/transform/resource/after-ecj/WitherAndAllArgsConstructor.java @@ -4,13 +4,13 @@ final int x = 10; int y = 20; final int z; - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherAndAllArgsConstructor withTest(final J test) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherAndAllArgsConstructor withTest(final J test) { return ((this.test == test) ? this : new WitherAndAllArgsConstructor(test, this.test2, this.y, this.z)); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherAndAllArgsConstructor withTest2(final java.util.List test2) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherAndAllArgsConstructor withTest2(final java.util.List test2) { return ((this.test2 == test2) ? this : new WitherAndAllArgsConstructor(this.test, test2, this.y, this.z)); } - public @java.beans.ConstructorProperties({"test", "test2", "y", "z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherAndAllArgsConstructor(final J test, final java.util.List test2, final int y, final int z) { + public @java.beans.ConstructorProperties({"test", "test2", "y", "z"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherAndAllArgsConstructor(final J test, final java.util.List test2, final int y, final int z) { super(); this.test = test; this.test2 = test2; diff --git a/test/transform/resource/after-ecj/WitherDeprecated.java b/test/transform/resource/after-ecj/WitherDeprecated.java index 26c7a63f..90e5fb88 100644 --- a/test/transform/resource/after-ecj/WitherDeprecated.java +++ b/test/transform/resource/after-ecj/WitherDeprecated.java @@ -5,10 +5,10 @@ class WitherDeprecated { WitherDeprecated(int annotation, int javadoc) { super(); } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherDeprecated withAnnotation(final int annotation) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherDeprecated withAnnotation(final int annotation) { return ((this.annotation == annotation) ? this : new WitherDeprecated(annotation, this.javadoc)); } - public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherDeprecated withJavadoc(final int javadoc) { + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherDeprecated withJavadoc(final int javadoc) { return ((this.javadoc == javadoc) ? this : new WitherDeprecated(this.annotation, javadoc)); } } diff --git a/test/transform/resource/after-ecj/WitherOnClass.java b/test/transform/resource/after-ecj/WitherOnClass.java index b6048394..1d5414d0 100644 --- a/test/transform/resource/after-ecj/WitherOnClass.java +++ b/test/transform/resource/after-ecj/WitherOnClass.java @@ -4,7 +4,7 @@ WitherOnClass1(boolean isNone, boolean isPublic) { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherOnClass1 withPublic(final boolean isPublic) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherOnClass1 withPublic(final boolean isPublic) { return ((this.isPublic == isPublic) ? this : new WitherOnClass1(this.isNone, isPublic)); } } @@ -15,10 +15,10 @@ WitherOnClass2(boolean isNone, boolean isProtected, boolean isPackage) { super(); } - @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherOnClass2 withPackage(final boolean isPackage) { + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherOnClass2 withPackage(final boolean isPackage) { return ((this.isPackage == isPackage) ? this : new WitherOnClass2(this.isNone, this.isProtected, isPackage)); } - protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherOnClass2 withProtected(final boolean isProtected) { + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherOnClass2 withProtected(final boolean isProtected) { return ((this.isProtected == isProtected) ? this : new WitherOnClass2(this.isNone, isProtected, this.isPackage)); } } @@ -28,10 +28,10 @@ WitherOnClass3(String couldBeNull, String nonNull) { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherOnClass3 withCouldBeNull(final String couldBeNull) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherOnClass3 withCouldBeNull(final String couldBeNull) { return ((this.couldBeNull == couldBeNull) ? this : new WitherOnClass3(couldBeNull, this.nonNull)); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherOnClass3 withNonNull(final @lombok.NonNull String nonNull) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherOnClass3 withNonNull(final @lombok.NonNull String nonNull) { if ((nonNull == null)) { throw new java.lang.NullPointerException("nonNull"); @@ -46,7 +46,7 @@ super(); this.fY = y; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherOnClass4 withY(final int fY) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherOnClass4 withY(final int fY) { return ((this.fY == fY) ? this : new WitherOnClass4(fY)); } } diff --git a/test/transform/resource/after-ecj/WitherPlain.java b/test/transform/resource/after-ecj/WitherPlain.java index 0364bae4..52177ef1 100644 --- a/test/transform/resource/after-ecj/WitherPlain.java +++ b/test/transform/resource/after-ecj/WitherPlain.java @@ -7,10 +7,10 @@ class WitherPlain { this.i = i; this.foo = foo; } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherPlain withI(final int i) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherPlain withI(final int i) { return ((this.i == i) ? this : new WitherPlain(i, this.foo)); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherPlain withFoo(final int foo) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherPlain withFoo(final int foo) { return ((this.foo == foo) ? this : new WitherPlain(this.i, foo)); } } diff --git a/test/transform/resource/after-ecj/WitherWithAbstract.java b/test/transform/resource/after-ecj/WitherWithAbstract.java index de53630d..90fd6448 100644 --- a/test/transform/resource/after-ecj/WitherWithAbstract.java +++ b/test/transform/resource/after-ecj/WitherWithAbstract.java @@ -3,5 +3,5 @@ abstract class WitherWithAbstract { WitherWithAbstract() { super(); } - public abstract @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherWithAbstract withFoo(final String foo); + public abstract @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherWithAbstract withFoo(final String foo); } diff --git a/test/transform/resource/after-ecj/WitherWithGenerics.java b/test/transform/resource/after-ecj/WitherWithGenerics.java index 904e005a..66d8a8f8 100644 --- a/test/transform/resource/after-ecj/WitherWithGenerics.java +++ b/test/transform/resource/after-ecj/WitherWithGenerics.java @@ -6,13 +6,13 @@ class WitherWithGenerics { public WitherWithGenerics(J test, java.util.List test2, java.util.List test3) { super(); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherWithGenerics withTest(final J test) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherWithGenerics withTest(final J test) { return ((this.test == test) ? this : new WitherWithGenerics(test, this.test2, this.test3)); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherWithGenerics withTest2(final java.util.List test2) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherWithGenerics withTest2(final java.util.List test2) { return ((this.test2 == test2) ? this : new WitherWithGenerics(this.test, test2, this.test3)); } - public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @lombok.Generated WitherWithGenerics withTest3(final java.util.List test3) { + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") WitherWithGenerics withTest3(final java.util.List test3) { return ((this.test3 == test3) ? this : new WitherWithGenerics(this.test, this.test2, test3)); } } diff --git a/test/transform/resource/before/GeneratedGlobalOff.java b/test/transform/resource/before/GeneratedGlobalOff.java deleted file mode 100644 index 89dcff62..00000000 --- a/test/transform/resource/before/GeneratedGlobalOff.java +++ /dev/null @@ -1,5 +0,0 @@ -//CONF: lombok.addGeneratedAnnotation = false -class GeneratedGlobalOff { - @lombok.Getter - int x; -} diff --git a/test/transform/resource/before/GeneratedGlobalOffJavaxOn.java b/test/transform/resource/before/GeneratedGlobalOffJavaxOn.java deleted file mode 100644 index dc7e9d8a..00000000 --- a/test/transform/resource/before/GeneratedGlobalOffJavaxOn.java +++ /dev/null @@ -1,6 +0,0 @@ -//CONF: lombok.addGeneratedAnnotation = false -//CONF: lombok.addJavaxGeneratedAnnotation = true -class GeneratedGlobalOffJavaxOn { - @lombok.Getter - int x; -} diff --git a/test/transform/resource/before/GeneratedGlobalOffLombokOn.java b/test/transform/resource/before/GeneratedGlobalOffLombokOn.java deleted file mode 100644 index 39e80f7e..00000000 --- a/test/transform/resource/before/GeneratedGlobalOffLombokOn.java +++ /dev/null @@ -1,6 +0,0 @@ -//CONF: lombok.addGeneratedAnnotation = false -//CONF: lombok.addLombokGeneratedAnnotation = true -class GeneratedGlobalOffLombokOn { - @lombok.Getter - int x; -} diff --git a/test/transform/resource/before/GeneratedJavaxOnLombokOn.java b/test/transform/resource/before/GeneratedJavaxOnLombokOn.java new file mode 100644 index 00000000..cee391ad --- /dev/null +++ b/test/transform/resource/before/GeneratedJavaxOnLombokOn.java @@ -0,0 +1,6 @@ +//CONF: lombok.addJavaxGeneratedAnnotation = true +//CONF: lombok.addLombokGeneratedAnnotation = true +class GeneratedJavaxOnLombokOn { + @lombok.Getter + int x; +} diff --git a/test/transform/resource/before/GeneratedLombokOff.java b/test/transform/resource/before/GeneratedLombokOff.java deleted file mode 100644 index 53fcc462..00000000 --- a/test/transform/resource/before/GeneratedLombokOff.java +++ /dev/null @@ -1,5 +0,0 @@ -//CONF: lombok.addLombokGeneratedAnnotation = false -class GeneratedLombokOff { - @lombok.Getter - int x; -} diff --git a/test/transform/resource/before/GeneratedOff.java b/test/transform/resource/before/GeneratedOff.java new file mode 100644 index 00000000..7d62991b --- /dev/null +++ b/test/transform/resource/before/GeneratedOff.java @@ -0,0 +1,5 @@ +//CONF: lombok.addGeneratedAnnotation = false +class GeneratedOff { + @lombok.Getter + int x; +} diff --git a/test/transform/resource/before/GeneratedOffJavaxOn.java b/test/transform/resource/before/GeneratedOffJavaxOn.java new file mode 100644 index 00000000..a3547913 --- /dev/null +++ b/test/transform/resource/before/GeneratedOffJavaxOn.java @@ -0,0 +1,6 @@ +//CONF: lombok.addGeneratedAnnotation = false +//CONF: lombok.addJavaxGeneratedAnnotation = true +class GeneratedOffJavaxOn { + @lombok.Getter + int x; +} diff --git a/test/transform/resource/before/GeneratedOffLombokOn.java b/test/transform/resource/before/GeneratedOffLombokOn.java new file mode 100644 index 00000000..9d122306 --- /dev/null +++ b/test/transform/resource/before/GeneratedOffLombokOn.java @@ -0,0 +1,6 @@ +//CONF: lombok.addGeneratedAnnotation = false +//CONF: lombok.addLombokGeneratedAnnotation = true +class GeneratedOffLombokOn { + @lombok.Getter + int x; +} diff --git a/test/transform/resource/messages-idempotent/NonNullPlain.java.messages b/test/transform/resource/messages-idempotent/NonNullPlain.java.messages index 20a621df..0b520462 100644 --- a/test/transform/resource/messages-idempotent/NonNullPlain.java.messages +++ b/test/transform/resource/messages-idempotent/NonNullPlain.java.messages @@ -1,3 +1,3 @@ 3 @NonNull is meaningless on a primitive. -17 @NonNull is meaningless on a primitive. -47 @NonNull is meaningless on a primitive. \ No newline at end of file +16 @NonNull is meaningless on a primitive. +42 @NonNull is meaningless on a primitive. \ No newline at end of file -- cgit From 3127930afa4866ad5e1b45e700045ad656cd2d9e Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Thu, 9 Feb 2017 22:52:25 +0100 Subject: Make it possible to copy from the release notes --- src/installer/lombok/installer/InstallerGUI.java | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/installer/lombok/installer/InstallerGUI.java b/src/installer/lombok/installer/InstallerGUI.java index 7a94d595..5c0efcb4 100644 --- a/src/installer/lombok/installer/InstallerGUI.java +++ b/src/installer/lombok/installer/InstallerGUI.java @@ -64,11 +64,12 @@ import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.JTextPane; import javax.swing.Scrollable; import javax.swing.SwingUtilities; +import javax.swing.UIManager; import javax.swing.filechooser.FileFilter; -import javax.swing.plaf.basic.BasicHTML; -import javax.swing.text.View; +import javax.swing.text.html.HTMLDocument; import lombok.core.Version; import lombok.installer.OsUtils.OS; @@ -199,19 +200,23 @@ public class InstallerGUI { constraints.gridy++; constraints.fill = GridBagConstraints.BOTH; - JLabel notes = new JLabel(); + JTextPane notes = new JTextPane(); + notes.setContentType("text/html"); notes.setText(readChangeLog()); + notes.setEditable(false); + notes.setOpaque(false); + notes.setBorder(null); + notes.setSelectionStart(0); + notes.setSelectionEnd(0); + + Font font = UIManager.getFont("Label.font"); + String bodyRule = "body { font-family: " + font.getFamily() + "; font-size: " + font.getSize() + "pt; }"; + ((HTMLDocument)notes.getDocument()).getStyleSheet().addRule(bodyRule); JScrollPane scroller = new JScrollPane(notes); container.add(scroller, constraints); scroller.setPreferredSize(new Dimension(380, 240)); - View view = (View) notes.getClientProperty(BasicHTML.propertyKey); - view.setSize(380, 0.0f); - float w = view.getPreferredSpan(View.X_AXIS); - float h = view.getPreferredSpan(View.Y_AXIS); - notes.setSize((int) w, (int) h); - container.setPreferredSize(new Dimension(462, 415)); return container; } -- cgit From 4ea6857c7f14babe1c7130a7418f943186979885 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 9 Feb 2017 23:23:29 +0100 Subject: made the installer a little wider; this also fixes bizarre layouting for macosx. --- src/installer/lombok/installer/InstallerGUI.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/installer/lombok/installer/InstallerGUI.java b/src/installer/lombok/installer/InstallerGUI.java index 5c0efcb4..ff89df89 100644 --- a/src/installer/lombok/installer/InstallerGUI.java +++ b/src/installer/lombok/installer/InstallerGUI.java @@ -80,6 +80,7 @@ import lombok.installer.OsUtils.OS; * Also offers info on what this installer does in case people want to instrument their IDE manually. */ public class InstallerGUI { + private static final int INSTALLER_WINDOW_WIDTH = 662; static final AtomicReference exitMarker = new AtomicReference(); private JFrame appWindow; @@ -169,7 +170,7 @@ public class InstallerGUI { constraints.gridy = 2; container.add(buttonBar, constraints); - container.setPreferredSize(new Dimension(462, 415)); + container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415)); return container; } @@ -215,9 +216,9 @@ public class InstallerGUI { JScrollPane scroller = new JScrollPane(notes); container.add(scroller, constraints); - scroller.setPreferredSize(new Dimension(380, 240)); + scroller.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 240)); - container.setPreferredSize(new Dimension(462, 415)); + container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415)); return container; } @@ -290,7 +291,7 @@ public class InstallerGUI { constraints.gridy = 4; container.add(buttonBar, constraints); - container.setPreferredSize(new Dimension(462, 415)); + container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415)); return container; } @@ -313,7 +314,7 @@ public class InstallerGUI { constraints.gridy = 2; container.add(example, constraints); - container.setPreferredSize(new Dimension(462, 105)); + container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 105)); return container; } @@ -501,7 +502,7 @@ public class InstallerGUI { uninstallPlaceholder.setVisible(false); container.add(uninstallPlaceholder, constraints); - container.setPreferredSize(new Dimension(462, 296)); + container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 296)); return container; } -- cgit From 2335512c8e134a1f6a7a567948543bf87613544b Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Fri, 10 Feb 2017 00:10:07 +0100 Subject: [i1274] Add outer name to type name for nested types in equals. --- doc/changelog.markdown | 1 + .../eclipse/handlers/HandleEqualsAndHashCode.java | 70 +++++++++++++--------- .../javac/handlers/HandleEqualsAndHashCode.java | 36 +++++------ .../resource/after-delombok/DataOnLocalClass.java | 2 +- .../EqualsAndHashCodeNestedShadow.java | 56 +++++++++++++++++ .../resource/after-ecj/DataOnLocalClass.java | 2 +- .../after-ecj/EqualsAndHashCodeNestedShadow.java | 58 ++++++++++++++++++ .../before/EqualsAndHashCodeNestedShadow.java | 15 +++++ 8 files changed, 190 insertions(+), 50 deletions(-) create mode 100644 test/transform/resource/after-delombok/EqualsAndHashCodeNestedShadow.java create mode 100644 test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java create mode 100644 test/transform/resource/before/EqualsAndHashCodeNestedShadow.java (limited to 'src') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index bad185fa..1f5218d9 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -6,6 +6,7 @@ Lombok Changelog * FEATURE: Generated classes, methods and fields can now also annotated with `@lombok.Generated` [Issue #1014](https://github.com/rzwitserloot/lombok/issues/1014)
    * PLATFORM: Lombok can now be used together with other annotation processors that are looking for lombok-generated methods, but only if lombok is the first annotation processor executed. The most commonly used annotation processor affected by this change is [MapStruct](http://mapstruct.org/); we've worked with the mapstruct team specifically to allow any order. Other annotation processors might follow the framework we've built to make this possible; point the authors of any such processor to us and we'll get it sorted [MapStruct issue #510](https://github.com/mapstruct/mapstruct/issues/510) [Lombok issue #973](https://github.com/rzwitserloot/lombok/issues/973) * PLATFORM: Eclipse: Refactor script 'rename field' when lombok has also generated getters and/or setters for this field is nicer now [Issue #210](https://github.com/rzwitserloot/lombok/issues/210) +* BUGFIX: Something you never encountered. [Issue #1274](https://github.com/rzwitserloot/lombok/issues/1274) ### v1.16.12 (December 5th, 2016) * FEATURE: `var` is the mutable sister of `val`. For now experimental, and opt-in using `ALLOW` in the flagUsage configuration key. Thanks for the contribution, Bulgakov Alexander. diff --git a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java index a56eee89..bc25ae2a 100644 --- a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java +++ b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java @@ -67,6 +67,7 @@ import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; import org.eclipse.jdt.internal.compiler.ast.NameReference; import org.eclipse.jdt.internal.compiler.ast.NullLiteral; import org.eclipse.jdt.internal.compiler.ast.OperatorIds; +import org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference; import org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference; import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference; import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference; @@ -458,7 +459,14 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler list = new ArrayList(); list.add(type.getName()); EclipseNode tNode = type.up(); @@ -468,21 +476,44 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler fields, boolean callSuper, ASTNode source, FieldAccess fieldAccess, boolean needsCanEqual, List onParam) { int pS = source.sourceStart; int pE = source.sourceEnd; long p = (long)pS << 32 | pE; - TypeDeclaration typeDecl = (TypeDeclaration)type.get(); MethodDeclaration method = new MethodDeclaration( ((CompilationUnitDeclaration) type.top().get()).compilationResult); @@ -528,7 +559,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler other = (MyType) o; */ { + /* Outer.Inner.MyType other = (Outer.Inner.MyType) o; */ { if (!fields.isEmpty() || needsCanEqual) { LocalDeclaration other = new LocalDeclaration(otherName, pS, pE); other.modifiers |= ClassFileConstants.AccFinal; setGeneratedBy(other, source); - char[] typeName = typeDecl.name; - TypeReference targetType; - if (typeDecl.typeParameters == null || typeDecl.typeParameters.length == 0) { - targetType = new SingleTypeReference(typeName, p); - setGeneratedBy(targetType, source); - other.type = new SingleTypeReference(typeName, p); - setGeneratedBy(other.type, source); - } else { - TypeReference[] typeArgs = new TypeReference[typeDecl.typeParameters.length]; - for (int i = 0; i < typeArgs.length; i++) { - typeArgs[i] = new Wildcard(Wildcard.UNBOUND); - typeArgs[i].sourceStart = pS; typeArgs[i].sourceEnd = pE; - setGeneratedBy(typeArgs[i], source); - } - targetType = new ParameterizedSingleTypeReference(typeName, typeArgs, 0, p); - setGeneratedBy(targetType, source); - other.type = new ParameterizedSingleTypeReference(typeName, copyTypes(typeArgs, source), 0, p); - setGeneratedBy(other.type, source); - } + TypeReference targetType = createTypeReference(type, p, source, true); + setGeneratedBy(targetType, source); + other.type = createTypeReference(type, p, source, true); + setGeneratedBy(other.type, source); NameReference oRef = new SingleNameReference(new char[] { 'o' }, p); setGeneratedBy(oRef, source); other.initialization = makeCastExpression(oRef, targetType, source); @@ -772,7 +788,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler list = new ArrayList(); list.add(type.getName()); JavacNode tNode = type.up(); @@ -372,20 +372,28 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler wildcards = new ListBuffer(); + for (int i = 0 ; i < typeDecl.typarams.length() ; i++) { + wildcards.append(maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null)); + } + + return maker.TypeApply(chain, wildcards.toList()); } public JCMethodDecl createEquals(JavacNode typeNode, List fields, boolean callSuper, FieldAccess fieldAccess, boolean needsCanEqual, JCTree source, List onParam) { JavacTreeMaker maker = typeNode.getTreeMaker(); - JCClassDecl type = (JCClassDecl) typeNode.get(); Name oName = typeNode.toName("o"); Name otherName = typeNode.toName("other"); @@ -408,27 +416,13 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler other = (MyType) o; */ { + /* Outer.Inner.MyType other = (Outer.Inner.MyType) o; */ { if (!fields.isEmpty() || needsCanEqual) { - final JCExpression selfType1, selfType2; - ListBuffer wildcards1 = new ListBuffer(); - ListBuffer wildcards2 = new ListBuffer(); - for (int i = 0 ; i < type.typarams.length() ; i++) { - wildcards1.append(maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null)); - wildcards2.append(maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null)); - } - - if (type.typarams.isEmpty()) { - selfType1 = maker.Ident(type.name); - selfType2 = maker.Ident(type.name); - } else { - selfType1 = maker.TypeApply(maker.Ident(type.name), wildcards1.toList()); - selfType2 = maker.TypeApply(maker.Ident(type.name), wildcards2.toList()); - } + final JCExpression selfType1 = createTypeReference(typeNode, true), selfType2 = createTypeReference(typeNode, true); statements.append( maker.VarDef(maker.Modifiers(finalFlag), otherName, selfType1, maker.TypeCast(selfType2, maker.Ident(oName)))); @@ -533,7 +527,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler params = List.of(maker.VarDef(maker.Modifiers(flags, onParam), otherName, objectType, null)); JCBlock body = maker.Block(0, List.of( - maker.Return(maker.TypeTest(maker.Ident(otherName), createTypeReference(typeNode))))); + maker.Return(maker.TypeTest(maker.Ident(otherName), createTypeReference(typeNode, false))))); return recursiveSetGeneratedBy(maker.MethodDef(mods, canEqualName, returnType, List.nil(), params, List.nil(), body, null), source, typeNode.getContext()); } diff --git a/test/transform/resource/after-delombok/DataOnLocalClass.java b/test/transform/resource/after-delombok/DataOnLocalClass.java index 90ae7649..9fe16070 100644 --- a/test/transform/resource/after-delombok/DataOnLocalClass.java +++ b/test/transform/resource/after-delombok/DataOnLocalClass.java @@ -97,7 +97,7 @@ class DataOnLocalClass2 { public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Local.InnerLocal)) return false; - final InnerLocal other = (InnerLocal) o; + final Local.InnerLocal other = (Local.InnerLocal) o; if (!other.canEqual((java.lang.Object) this)) return false; final java.lang.Object this$name = this.getName(); final java.lang.Object other$name = other.getName(); diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeNestedShadow.java b/test/transform/resource/after-delombok/EqualsAndHashCodeNestedShadow.java new file mode 100644 index 00000000..ac687d84 --- /dev/null +++ b/test/transform/resource/after-delombok/EqualsAndHashCodeNestedShadow.java @@ -0,0 +1,56 @@ +interface EqualsAndHashCodeNestedShadow { + interface Foo { + } + class Bar { + public static class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo { + @java.lang.Override + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public boolean equals(final java.lang.Object o) { + if (o == this) return true; + if (!(o instanceof EqualsAndHashCodeNestedShadow.Bar.Foo)) return false; + final EqualsAndHashCodeNestedShadow.Bar.Foo other = (EqualsAndHashCodeNestedShadow.Bar.Foo) o; + if (!other.canEqual((java.lang.Object) this)) return false; + return true; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof EqualsAndHashCodeNestedShadow.Bar.Foo; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public int hashCode() { + int result = 1; + return result; + } + } + } + class Baz { + public static class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo { + @java.lang.Override + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public boolean equals(final java.lang.Object o) { + if (o == this) return true; + if (!(o instanceof EqualsAndHashCodeNestedShadow.Baz.Foo)) return false; + final EqualsAndHashCodeNestedShadow.Baz.Foo other = (EqualsAndHashCodeNestedShadow.Baz.Foo) o; + if (!other.canEqual((java.lang.Object) this)) return false; + return true; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof EqualsAndHashCodeNestedShadow.Baz.Foo; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public int hashCode() { + int result = 1; + return result; + } + } + } +} diff --git a/test/transform/resource/after-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java index 9d6bced1..a86837e3 100644 --- a/test/transform/resource/after-ecj/DataOnLocalClass.java +++ b/test/transform/resource/after-ecj/DataOnLocalClass.java @@ -73,7 +73,7 @@ class DataOnLocalClass2 { return true; if ((! (o instanceof Local.InnerLocal))) return false; - final InnerLocal other = (InnerLocal) o; + final Local.InnerLocal other = (Local.InnerLocal) o; if ((! other.canEqual((java.lang.Object) this))) return false; final java.lang.Object this$name = this.getName(); diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java b/test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java new file mode 100644 index 00000000..5af6e9d8 --- /dev/null +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java @@ -0,0 +1,58 @@ +interface EqualsAndHashCodeNestedShadow { + interface Foo { + } + class Bar { + public static @lombok.EqualsAndHashCode(callSuper = false) class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo { + public Foo() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof EqualsAndHashCodeNestedShadow.Bar.Foo))) + return false; + final EqualsAndHashCodeNestedShadow.Bar.Foo other = (EqualsAndHashCodeNestedShadow.Bar.Foo) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { + return (other instanceof EqualsAndHashCodeNestedShadow.Bar.Foo); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { + int result = 1; + return result; + } + } + Bar() { + super(); + } + } + class Baz { + public static @lombok.EqualsAndHashCode(callSuper = false) class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo { + public Foo() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof EqualsAndHashCodeNestedShadow.Baz.Foo))) + return false; + final EqualsAndHashCodeNestedShadow.Baz.Foo other = (EqualsAndHashCodeNestedShadow.Baz.Foo) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { + return (other instanceof EqualsAndHashCodeNestedShadow.Baz.Foo); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { + int result = 1; + return result; + } + } + Baz() { + super(); + } + } +} \ No newline at end of file diff --git a/test/transform/resource/before/EqualsAndHashCodeNestedShadow.java b/test/transform/resource/before/EqualsAndHashCodeNestedShadow.java new file mode 100644 index 00000000..2b0c4fa3 --- /dev/null +++ b/test/transform/resource/before/EqualsAndHashCodeNestedShadow.java @@ -0,0 +1,15 @@ +interface EqualsAndHashCodeNestedShadow { + interface Foo { + } + class Bar { + @lombok.EqualsAndHashCode(callSuper=false) + public static class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo { + } + } + + class Baz { + @lombok.EqualsAndHashCode(callSuper=false) + public static class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo { + } + } +} \ No newline at end of file -- cgit From fc7d32af36f3913e13b2827780326a9a5c728fb2 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 10 Feb 2017 03:09:59 +0100 Subject: Updated ShadowClassLoader’s finding of ‘self’; it failed exactly once on me and I’d like to know the classloader when that happens (error condition was loading lombok.jar as an AP in eclipse which normally you don’t even do, so it’s not a big deal). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/launch/lombok/launch/ShadowClassLoader.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/launch/lombok/launch/ShadowClassLoader.java b/src/launch/lombok/launch/ShadowClassLoader.java index 2bcf46b5..72f006e8 100644 --- a/src/launch/lombok/launch/ShadowClassLoader.java +++ b/src/launch/lombok/launch/ShadowClassLoader.java @@ -118,12 +118,16 @@ class ShadowClassLoader extends ClassLoader { SELF_BASE = selfBase; SELF_BASE_LENGTH = selfBase.length(); } else { - String sclClassUrl = ShadowClassLoader.class.getResource("ShadowClassLoader.class").toString(); - if (!sclClassUrl.endsWith(SELF_NAME)) throw new InternalError("ShadowLoader can't find itself."); - SELF_BASE_LENGTH = sclClassUrl.length() - SELF_NAME.length(); + URL sclClassUrl = ShadowClassLoader.class.getResource("ShadowClassLoader.class"); + String sclClassStr = sclClassUrl == null ? null : sclClassUrl.toString(); + if (sclClassStr == null || !sclClassStr.endsWith(SELF_NAME)) { + ClassLoader cl = ShadowClassLoader.class.getClassLoader(); + throw new RuntimeException("ShadowLoader can't find itself. SCL loader type: " + (cl == null ? "*NULL*" : cl.getClass().toString())); + } + SELF_BASE_LENGTH = sclClassStr.length() - SELF_NAME.length(); String decoded; try { - decoded = URLDecoder.decode(sclClassUrl.substring(0, SELF_BASE_LENGTH), "UTF-8"); + decoded = URLDecoder.decode(sclClassStr.substring(0, SELF_BASE_LENGTH), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new InternalError("UTF-8 not available"); } -- cgit From 87822a7142e9f91da8557467d27b5854e0ebe2ec Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 10 Feb 2017 03:20:27 +0100 Subject: pre-release version bump. --- doc/changelog.markdown | 2 +- src/core/lombok/core/Version.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 1f5218d9..2656a1ef 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -1,7 +1,7 @@ Lombok Changelog ---------------- -### v1.16.13 "Edgy Guinea Pig" +### v1.16.14 (February 10th, 2017) * v1.16.12 is the latest stable release of Project Lombok. * FEATURE: Generated classes, methods and fields can now also annotated with `@lombok.Generated` [Issue #1014](https://github.com/rzwitserloot/lombok/issues/1014)
    * PLATFORM: Lombok can now be used together with other annotation processors that are looking for lombok-generated methods, but only if lombok is the first annotation processor executed. The most commonly used annotation processor affected by this change is [MapStruct](http://mapstruct.org/); we've worked with the mapstruct team specifically to allow any order. Other annotation processors might follow the framework we've built to make this possible; point the authors of any such processor to us and we'll get it sorted [MapStruct issue #510](https://github.com/mapstruct/mapstruct/issues/510) [Lombok issue #973](https://github.com/rzwitserloot/lombok/issues/973) diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index 4fdb7216..c6dc83fa 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -30,9 +30,9 @@ public class Version { // ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries). // Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example. // Official builds always end in an even number. (Since 0.10.2). - private static final String VERSION = "1.16.13"; - private static final String RELEASE_NAME = "Edgy Guinea Pig"; -// private static final String RELEASE_NAME = "Candid Duck"; + private static final String VERSION = "1.16.14"; +// private static final String RELEASE_NAME = "Edgy Guinea Pig"; + private static final String RELEASE_NAME = "Candid Duck"; private Version() { //Prevent instantiation -- cgit From 5eaf74ec22879e8fabc3f9d86a520fc04a097dc3 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 10 Feb 2017 04:06:01 +0100 Subject: Post-release version bump. --- doc/changelog.markdown | 4 +++- src/core/lombok/core/Version.java | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 2656a1ef..d218639d 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -1,8 +1,10 @@ Lombok Changelog ---------------- +### v1.16.15 "Edgy Guinea Pig" +* v1.16.14 is the latest stable release of Project Lombok. + ### v1.16.14 (February 10th, 2017) -* v1.16.12 is the latest stable release of Project Lombok. * FEATURE: Generated classes, methods and fields can now also annotated with `@lombok.Generated` [Issue #1014](https://github.com/rzwitserloot/lombok/issues/1014)
    * PLATFORM: Lombok can now be used together with other annotation processors that are looking for lombok-generated methods, but only if lombok is the first annotation processor executed. The most commonly used annotation processor affected by this change is [MapStruct](http://mapstruct.org/); we've worked with the mapstruct team specifically to allow any order. Other annotation processors might follow the framework we've built to make this possible; point the authors of any such processor to us and we'll get it sorted [MapStruct issue #510](https://github.com/mapstruct/mapstruct/issues/510) [Lombok issue #973](https://github.com/rzwitserloot/lombok/issues/973) * PLATFORM: Eclipse: Refactor script 'rename field' when lombok has also generated getters and/or setters for this field is nicer now [Issue #210](https://github.com/rzwitserloot/lombok/issues/210) diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index c6dc83fa..a50b72d5 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -30,9 +30,9 @@ public class Version { // ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries). // Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example. // Official builds always end in an even number. (Since 0.10.2). - private static final String VERSION = "1.16.14"; -// private static final String RELEASE_NAME = "Edgy Guinea Pig"; - private static final String RELEASE_NAME = "Candid Duck"; + private static final String VERSION = "1.16.15"; + private static final String RELEASE_NAME = "Edgy Guinea Pig"; +// private static final String RELEASE_NAME = "Candid Duck"; private Version() { //Prevent instantiation -- cgit From 9491bce6021d22c98dd615821d5dbb9fdf5e3fc5 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 13 Feb 2017 20:40:03 +0100 Subject: [trivial] Added a suppress warnings (to suppress an expected and in this case analysed to be harmless, intentional use of our own deprecated API) --- src/core/lombok/core/handlers/HandlerUtil.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/core/lombok/core/handlers/HandlerUtil.java b/src/core/lombok/core/handlers/HandlerUtil.java index 7e6d6d66..6c3a0b79 100644 --- a/src/core/lombok/core/handlers/HandlerUtil.java +++ b/src/core/lombok/core/handlers/HandlerUtil.java @@ -109,6 +109,7 @@ public class HandlerUtil { } } + @SuppressWarnings("deprecation") public static boolean shouldAddGenerated(LombokNode node) { Boolean add = node.getAst().readConfiguration(ConfigurationKeys.ADD_JAVAX_GENERATED_ANNOTATIONS); if (add != null) return add; -- cgit From ad4bd36274d2bfe8dcf74977d921a114739386b1 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 13 Feb 2017 21:47:48 +0100 Subject: Now searches through any subdir of any dir containing the string ‘eclipse’ (or STS or whatnot), to any depth, instead of requiring each subdir to be searched to again contain ‘eclipse’ or some variant thereof. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mac installer installs to /Applications/eclipse/java-neon, for example, by default, so it wasn’t being found. --- .../lombok/installer/eclipse/EclipseProductLocationProvider.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/installer/lombok/installer/eclipse/EclipseProductLocationProvider.java b/src/installer/lombok/installer/eclipse/EclipseProductLocationProvider.java index 3710d7d9..b807f02b 100644 --- a/src/installer/lombok/installer/eclipse/EclipseProductLocationProvider.java +++ b/src/installer/lombok/installer/eclipse/EclipseProductLocationProvider.java @@ -288,10 +288,10 @@ public class EclipseProductLocationProvider implements IdeLocationProvider { abstract String findEclipseOnPlatform(File dir); void recurseDirectory(List locations, List problems, File dir) { - recurseDirectory0(locations, problems, dir, 0); + recurseDirectory0(locations, problems, dir, 0, false); } - private void recurseDirectory0(List locations, List problems, File f, int loopCounter) { + private void recurseDirectory0(List locations, List problems, File f, int loopCounter, boolean nameFound) { //Various try/catch/ignore statements are in this for loop. Weird conditions on the disk can cause exceptions, //such as an unformatted drive causing a NullPointerException on listFiles. Best action is almost invariably to just //continue onwards. @@ -301,9 +301,9 @@ public class EclipseProductLocationProvider implements IdeLocationProvider { for (File dir : listFiles) { if (!dir.isDirectory()) continue; try { - if (dir.getName().toLowerCase().contains(descriptor.getDirectoryName())) { + if (nameFound || dir.getName().toLowerCase().contains(descriptor.getDirectoryName())) { findEclipse(locations, problems, dir); - if (loopCounter < 50) recurseDirectory0(locations, problems, dir, loopCounter + 1); + if (loopCounter < 50) recurseDirectory0(locations, problems, dir, loopCounter + 1, true); } } catch (Exception ignore) {} } -- cgit From 627e9dc8a7f381ace59f91c9ee4a023733d4717e Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 13 Feb 2017 21:48:40 +0100 Subject: Updated the text to also mention rebuilding projects. Also fixed various size issues with swing’s… peculiar layouting mechanism. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/installer/lombok/installer/InstallerGUI.java | 28 ++++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/installer/lombok/installer/InstallerGUI.java b/src/installer/lombok/installer/InstallerGUI.java index ff89df89..b96fec9c 100644 --- a/src/installer/lombok/installer/InstallerGUI.java +++ b/src/installer/lombok/installer/InstallerGUI.java @@ -192,11 +192,15 @@ public class InstallerGUI { GridBagConstraints constraints = new GridBagConstraints(); constraints.anchor = GridBagConstraints.WEST; - container.add(new JLabel(SUCCESS_TITLE), constraints); + JLabel title; + container.add(title = new JLabel(SUCCESS_TITLE), constraints); + title.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 20)); constraints.gridy = 1; constraints.insets = new Insets(8, 0, 0, 16); container.add(successExplanation = new JLabel(SUCCESS_EXPLANATION), constraints); + successExplanation.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 175)); + successExplanation.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 175)); constraints.gridy++; constraints.fill = GridBagConstraints.BOTH; @@ -212,13 +216,13 @@ public class InstallerGUI { Font font = UIManager.getFont("Label.font"); String bodyRule = "body { font-family: " + font.getFamily() + "; font-size: " + font.getSize() + "pt; }"; - ((HTMLDocument)notes.getDocument()).getStyleSheet().addRule(bodyRule); - + ((HTMLDocument) notes.getDocument()).getStyleSheet().addRule(bodyRule); JScrollPane scroller = new JScrollPane(notes); container.add(scroller, constraints); - scroller.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 240)); - + scroller.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 200)); + scroller.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 200)); container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415)); + container.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415)); return container; } @@ -372,11 +376,11 @@ public class InstallerGUI { if (locations.size() + problems.size() == 0) { JOptionPane.showMessageDialog(appWindow, - "I can't find any IDEs on your computer.\n" + - "If you have IDEs installed on this computer, please use the " + - "'Specify Location...' button to manually point out the \n" + - "location of your IDE installation to me. Thanks!", - "Can't find IDE", JOptionPane.INFORMATION_MESSAGE); + "I can't find any IDEs on your computer.\n" + + "If you have IDEs installed on this computer, please use the " + + "'Specify Location...' button to manually point out the \n" + + "location of your IDE installation to me. Thanks!", + "Can't find IDE", JOptionPane.INFORMATION_MESSAGE); } } }); @@ -929,8 +933,8 @@ public class InstallerGUI { private static final String SUCCESS_TITLE = "Install successful "; private static final String SUCCESS_EXPLANATION = "Lombok has been installed on the selected IDE installations.
    " + - "Don't forget to add lombok.jar to your projects, and exit and start your IDE!%%%"; - + "Don't forget to:
    • add lombok.jar to your projects,
    • exit and start your IDE,
    • rebuild all projects!
    %%%"; + private static class JHyperLink extends JButton { private static final long serialVersionUID = 1L; -- cgit From 1d32894ca316dd83c873d1e46746ee6ca37f8059 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 14 Feb 2017 00:19:14 +0100 Subject: Fixes issue #1287 - if a field gets marked as static via `@UtilityClass`, don’t make it final via `@FieldDefaults`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/lombok/eclipse/handlers/HandleUtilityClass.java | 2 ++ src/core/lombok/javac/handlers/HandleUtilityClass.java | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/core/lombok/eclipse/handlers/HandleUtilityClass.java b/src/core/lombok/eclipse/handlers/HandleUtilityClass.java index 199ce102..959c1d20 100644 --- a/src/core/lombok/eclipse/handlers/HandleUtilityClass.java +++ b/src/core/lombok/eclipse/handlers/HandleUtilityClass.java @@ -49,6 +49,7 @@ import org.mangosdk.spi.ProviderFor; import lombok.ConfigurationKeys; import lombok.core.AnnotationValues; +import lombok.core.HandlerPriority; import lombok.core.AST.Kind; import lombok.eclipse.EclipseAnnotationHandler; import lombok.eclipse.EclipseNode; @@ -57,6 +58,7 @@ import lombok.experimental.UtilityClass; /** * Handles the {@code lombok.experimental.UtilityClass} annotation for eclipse. */ +@HandlerPriority(-4096) //-2^12; to ensure @FieldDefaults picks up on the 'static' we set here. @ProviderFor(EclipseAnnotationHandler.class) public class HandleUtilityClass extends EclipseAnnotationHandler { @Override public void handle(AnnotationValues annotation, Annotation ast, EclipseNode annotationNode) { diff --git a/src/core/lombok/javac/handlers/HandleUtilityClass.java b/src/core/lombok/javac/handlers/HandleUtilityClass.java index 6d3ec63b..ee8081d6 100644 --- a/src/core/lombok/javac/handlers/HandleUtilityClass.java +++ b/src/core/lombok/javac/handlers/HandleUtilityClass.java @@ -44,6 +44,7 @@ import com.sun.tools.javac.util.Name; import lombok.ConfigurationKeys; import lombok.core.AST.Kind; import lombok.core.AnnotationValues; +import lombok.core.HandlerPriority; import lombok.experimental.UtilityClass; import lombok.javac.Javac; import lombok.javac.JavacAnnotationHandler; @@ -53,6 +54,7 @@ import lombok.javac.JavacTreeMaker; /** * Handles the {@code @UtilityClass} annotation for javac. */ +@HandlerPriority(-4096) //-2^12; to ensure @FieldDefaults picks up on the 'static' we set here. @ProviderFor(JavacAnnotationHandler.class) public class HandleUtilityClass extends JavacAnnotationHandler { @Override public void handle(AnnotationValues annotation, JCAnnotation ast, JavacNode annotationNode) { -- cgit From 05f93771e9aeb6ad0c884f22df4b9fa8c1f6cc2f Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Tue, 14 Feb 2017 00:36:00 +0100 Subject: [jdk9] Create FileObjects for jdk9 --- .../javac/apt/Javac9BaseFileObjectWrapper.java | 113 +++++++++++++++++++++ src/core/lombok/javac/apt/LombokFileObjects.java | 78 ++++++++++---- .../com/sun/tools/javac/file/BaseFileManager.java | 8 ++ .../com/sun/tools/javac/file/PathFileObject.java | 12 +++ 4 files changed, 189 insertions(+), 22 deletions(-) create mode 100644 src/core/lombok/javac/apt/Javac9BaseFileObjectWrapper.java create mode 100644 src/stubs/com/sun/tools/javac/file/BaseFileManager.java create mode 100644 src/stubs/com/sun/tools/javac/file/PathFileObject.java (limited to 'src') diff --git a/src/core/lombok/javac/apt/Javac9BaseFileObjectWrapper.java b/src/core/lombok/javac/apt/Javac9BaseFileObjectWrapper.java new file mode 100644 index 00000000..f9fe2a7d --- /dev/null +++ b/src/core/lombok/javac/apt/Javac9BaseFileObjectWrapper.java @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2010-2017 The Project Lombok Authors. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package lombok.javac.apt; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; +import java.net.URI; +import java.nio.file.Path; + +import javax.lang.model.element.Modifier; +import javax.lang.model.element.NestingKind; + +import com.sun.tools.javac.file.BaseFileManager; + +class Javac9BaseFileObjectWrapper extends com.sun.tools.javac.file.PathFileObject { + private final LombokFileObject delegate; + + public Javac9BaseFileObjectWrapper(BaseFileManager fileManager, Path path, LombokFileObject delegate) { + super(fileManager, path); + this.delegate = delegate; + } + + @Override public boolean isNameCompatible(String simpleName, Kind kind) { + return delegate.isNameCompatible(simpleName, kind); + } + + @Override public URI toUri() { + return delegate.toUri(); + } + + @SuppressWarnings("all") + @Override public String getName() { + return delegate.getName(); + } + + @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException { + return delegate.getCharContent(ignoreEncodingErrors); + } + + @Override public InputStream openInputStream() throws IOException { + return delegate.openInputStream(); + } + + @Override public Reader openReader(boolean ignoreEncodingErrors) throws IOException { + return delegate.openReader(ignoreEncodingErrors); + } + + @Override public Writer openWriter() throws IOException { + return delegate.openWriter(); + } + + @Override public OutputStream openOutputStream() throws IOException { + return delegate.openOutputStream(); + } + + @Override public long getLastModified() { + return delegate.getLastModified(); + } + + @Override public boolean delete() { + return delegate.delete(); + } + + @Override public Kind getKind() { + return delegate.getKind(); + } + + @Override public NestingKind getNestingKind() { + return delegate.getNestingKind(); + } + + @Override public Modifier getAccessLevel() { + return delegate.getAccessLevel(); + } + + @Override public boolean equals(Object obj) { + if (!(obj instanceof Javac9BaseFileObjectWrapper)) { + return false; + } + return delegate.equals(((Javac9BaseFileObjectWrapper)obj).delegate); + } + + @Override public int hashCode() { + return delegate.hashCode(); + } + + @Override public String toString() { + return delegate.toString(); + } +} \ No newline at end of file diff --git a/src/core/lombok/javac/apt/LombokFileObjects.java b/src/core/lombok/javac/apt/LombokFileObjects.java index 412e449b..7e818cab 100644 --- a/src/core/lombok/javac/apt/LombokFileObjects.java +++ b/src/core/lombok/javac/apt/LombokFileObjects.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 The Project Lombok Authors. + * Copyright (C) 2010-2017 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,19 +23,24 @@ package lombok.javac.apt; import java.lang.reflect.Method; +import java.net.URI; +import java.nio.file.Paths; import java.util.concurrent.atomic.AtomicBoolean; import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; import javax.tools.JavaFileObject.Kind; +import com.sun.tools.javac.file.BaseFileManager; + import lombok.core.DiagnosticsReceiver; //Can't use SimpleJavaFileObject so we copy/paste most of its content here, because javac doesn't follow the interface, //and casts to its own BaseFileObject type. D'oh! final class LombokFileObjects { - enum Compiler { - JAVAC6 { + + interface Compiler { + Compiler JAVAC6 = new Compiler() { private Method decoderMethod = null; private final AtomicBoolean decoderIsSet = new AtomicBoolean(); @@ -46,13 +51,13 @@ final class LombokFileObjects { @Override public Method getDecoderMethod() { synchronized (decoderIsSet) { if (decoderIsSet.get()) return decoderMethod; - decoderMethod = getDecoderMethod("com.sun.tools.javac.util.BaseFileObject"); + decoderMethod = LombokFileObjects.getDecoderMethod("com.sun.tools.javac.util.BaseFileObject"); decoderIsSet.set(true); return decoderMethod; } } - }, - JAVAC7 { + }; + Compiler JAVAC7 = new Compiler() { private Method decoderMethod = null; private final AtomicBoolean decoderIsSet = new AtomicBoolean(); @@ -63,28 +68,28 @@ final class LombokFileObjects { @Override public Method getDecoderMethod() { synchronized (decoderIsSet) { if (decoderIsSet.get()) return decoderMethod; - decoderMethod = getDecoderMethod("com.sun.tools.javac.file.BaseFileObject"); + decoderMethod = LombokFileObjects.getDecoderMethod("com.sun.tools.javac.file.BaseFileObject"); decoderIsSet.set(true); return decoderMethod; } } }; - static Method getDecoderMethod(String className) { - Method m = null; - try { - m = Class.forName(className).getDeclaredMethod("getDecoder", boolean.class); - m.setAccessible(true); - } catch (NoSuchMethodException e) { - // Intentional fallthrough - getDecoder(boolean) is not always present. - } catch (ClassNotFoundException e) { - // Intentional fallthrough - getDecoder(boolean) is not always present. - } - return m; - } + JavaFileObject wrap(LombokFileObject fileObject); + Method getDecoderMethod(); + } - abstract JavaFileObject wrap(LombokFileObject fileObject); - abstract Method getDecoderMethod(); + static Method getDecoderMethod(String className) { + Method m = null; + try { + m = Class.forName(className).getDeclaredMethod("getDecoder", boolean.class); + m.setAccessible(true); + } catch (NoSuchMethodException e) { + // Intentional fallthrough - getDecoder(boolean) is not always present. + } catch (ClassNotFoundException e) { + // Intentional fallthrough - getDecoder(boolean) is not always present. + } + return m; } private LombokFileObjects() {} @@ -93,7 +98,16 @@ final class LombokFileObjects { String jfmClassName = jfm != null ? jfm.getClass().getName() : "null"; if (jfmClassName.equals("com.sun.tools.javac.util.DefaultFileManager")) return Compiler.JAVAC6; if (jfmClassName.equals("com.sun.tools.javac.util.JavacFileManager")) return Compiler.JAVAC6; - if (jfmClassName.equals("com.sun.tools.javac.file.JavacFileManager")) return Compiler.JAVAC7; + if (jfmClassName.equals("com.sun.tools.javac.file.JavacFileManager")) { + try { + Class superType = Class.forName("com.sun.tools.javac.file.BaseFileManager"); + if (superType.isInstance(jfm)) { + return new Java9Compiler(jfm); + } + } + catch (Exception e) {} + return Compiler.JAVAC7; + } try { if (Class.forName("com.sun.tools.javac.file.BaseFileObject") == null) throw new NullPointerException(); return Compiler.JAVAC7; @@ -112,4 +126,24 @@ final class LombokFileObjects { static JavaFileObject createIntercepting(Compiler compiler, JavaFileObject delegate, String fileName, DiagnosticsReceiver diagnostics) { return compiler.wrap(new InterceptingJavaFileObject(delegate, fileName, diagnostics, compiler.getDecoderMethod())); } + + static class Java9Compiler implements Compiler { + private final BaseFileManager fileManager; + + public Java9Compiler(JavaFileManager jfm) { + fileManager = (BaseFileManager) jfm; + } + + @Override public JavaFileObject wrap(LombokFileObject fileObject) { + URI uri = fileObject.toUri(); + if (uri.getScheme() == null) { + uri = URI.create("file://" + uri); + } + return new Javac9BaseFileObjectWrapper(fileManager, Paths.get(uri), fileObject); + } + + @Override public Method getDecoderMethod() { + throw new UnsupportedOperationException(); + } + } } diff --git a/src/stubs/com/sun/tools/javac/file/BaseFileManager.java b/src/stubs/com/sun/tools/javac/file/BaseFileManager.java new file mode 100644 index 00000000..7a2293d5 --- /dev/null +++ b/src/stubs/com/sun/tools/javac/file/BaseFileManager.java @@ -0,0 +1,8 @@ +/* + * These are stub versions of various bits of javac-internal API (for various different versions of javac). Lombok is compiled against these. + */ +package com.sun.tools.javac.file; + +import javax.tools.JavaFileManager; + +public abstract class BaseFileManager implements JavaFileManager{} diff --git a/src/stubs/com/sun/tools/javac/file/PathFileObject.java b/src/stubs/com/sun/tools/javac/file/PathFileObject.java new file mode 100644 index 00000000..c1ee6074 --- /dev/null +++ b/src/stubs/com/sun/tools/javac/file/PathFileObject.java @@ -0,0 +1,12 @@ +/* + * These are stub versions of various bits of javac-internal API (for various different versions of javac). Lombok is compiled against these. + */ +package com.sun.tools.javac.file; + +import java.nio.file.Path; + +import javax.tools.JavaFileObject; + +public abstract class PathFileObject implements JavaFileObject { + protected PathFileObject(BaseFileManager fileManager, Path path) {} +} -- cgit From e3a86782e590e11291e1f208417d5ca61aac4fac Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Tue, 14 Feb 2017 01:21:27 +0100 Subject: [jdk9] Fix members_field error --- .../lombok/javac/handlers/JavacHandlerUtil.java | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index af8289a3..918d23f1 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -894,16 +894,20 @@ public class JavacHandlerUtil { static class ClassSymbolMembersField { private static final Field membersField; private static final Method removeMethod; + private static final Method enterMethod; static { Field f = null; - Method m = null; + Method r = null; + Method e = null; try { f = ClassSymbol.class.getField("members_field"); - m = f.getType().getMethod("remove", Symbol.class); - } catch (Exception e) {} + r = f.getType().getMethod("remove", Symbol.class); + e = f.getType().getMethod("enter", Symbol.class); + } catch (Exception ex) {} membersField = f; - removeMethod = m; + removeMethod = r; + enterMethod = r; } static void remove(ClassSymbol from, Symbol toRemove) { @@ -914,6 +918,15 @@ public class JavacHandlerUtil { removeMethod.invoke(scope, toRemove); } catch (Exception e) {} } + + static void enter(ClassSymbol from, Symbol toEnter) { + if (from == null) return; + try { + Scope scope = (Scope) membersField.get(from); + if (scope == null) return; + enterMethod.invoke(scope, toEnter); + } catch (Exception e) {} + } } public static void injectMethod(JavacNode typeNode, JCMethodDecl method) { @@ -959,7 +972,7 @@ public class JavacHandlerUtil { if (typeMirror == null || paramTypes == null || returnType == null) return; ClassSymbol cs = (ClassSymbol) typeMirror; MethodSymbol methodSymbol = new MethodSymbol(access, methodName, new MethodType(paramTypes, returnType, List.nil(), Symtab.instance(context).methodClass), cs); - cs.members_field.enter(methodSymbol); + ClassSymbolMembersField.enter(cs, methodSymbol); } /** -- cgit From 06ddfd4e656255dadaf4a47c9070e3765ea57d8e Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 16 Feb 2017 23:32:39 +0100 Subject: A stray debug variant of an error message left in the source. --- src/core/lombok/javac/handlers/HandleBuilder.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java index 8588fc16..d37e1f79 100644 --- a/src/core/lombok/javac/handlers/HandleBuilder.java +++ b/src/core/lombok/javac/handlers/HandleBuilder.java @@ -270,8 +270,7 @@ public class HandleBuilder extends JavacAnnotationHandler { } if (pos == -1 || tpOnType.size() <= pos) { - annotationNode.addError("**" + returnType.getClass().toString()); -// annotationNode.addError("@Builder(toBuilder=true) requires that each type parameter on the static method is part of the typeargs of the return value. Type parameter " + tp.name + " is not part of the return type."); + annotationNode.addError("@Builder(toBuilder=true) requires that each type parameter on the static method is part of the typeargs of the return value. Type parameter " + tp.name + " is not part of the return type."); return; } typeArgsForToBuilder.add(tpOnType.get(pos).name); -- cgit From 272b33a6ffb7c8697148b4e3de405dbaf59fedfa Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 16 Feb 2017 23:32:58 +0100 Subject: bugfix for JDK9: The enterMethod was erroneously hooked up to the remove method. whoops. --- src/core/lombok/javac/handlers/JavacHandlerUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index 918d23f1..2b67118e 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -907,7 +907,7 @@ public class JavacHandlerUtil { } catch (Exception ex) {} membersField = f; removeMethod = r; - enterMethod = r; + enterMethod = e; } static void remove(ClassSymbol from, Symbol toRemove) { -- cgit From 74603cd9d355353f5373deb167988c5eaf015346 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 16 Feb 2017 23:32:17 +0100 Subject: Fixing issue #1298: `@Builder` with recursive generics didn’t work in javac/delombok. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/lombok/javac/handlers/HandleBuilder.java | 13 ++- .../lombok/javac/handlers/JavacHandlerUtil.java | 17 +++- .../before/I1298BuilderWithGenerics.java | 15 ---- .../BuilderWithRecursiveGenerics.java | 100 +++++++++++++++++++++ .../after-ecj/BuilderWithRecursiveGenerics.java | 78 ++++++++++++++++ .../before/BuilderWithRecursiveGenerics.java | 13 +++ 6 files changed, 212 insertions(+), 24 deletions(-) delete mode 100644 test/transform/knownBroken/before/I1298BuilderWithGenerics.java create mode 100644 test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java create mode 100644 test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java create mode 100644 test/transform/resource/before/BuilderWithRecursiveGenerics.java (limited to 'src') diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java index d37e1f79..2704981b 100644 --- a/src/core/lombok/javac/handlers/HandleBuilder.java +++ b/src/core/lombok/javac/handlers/HandleBuilder.java @@ -297,7 +297,7 @@ public class HandleBuilder extends JavacAnnotationHandler { JavacNode builderType = findInnerClass(tdParent, builderClassName); if (builderType == null) { - builderType = makeBuilderClass(isStatic, tdParent, builderClassName, typeParams, ast); + builderType = makeBuilderClass(isStatic, annotationNode, tdParent, builderClassName, typeParams, ast); } else { JCClassDecl builderTypeDeclaration = (JCClassDecl) builderType.get(); if (isStatic && !builderTypeDeclaration.getModifiers().getFlags().contains(Modifier.STATIC)) { @@ -319,7 +319,6 @@ public class HandleBuilder extends JavacAnnotationHandler { } } } - } for (BuilderFieldData bfd : builderFields) { @@ -374,7 +373,7 @@ public class HandleBuilder extends JavacAnnotationHandler { if (addCleaning) injectMethod(builderType, generateCleanMethod(builderFields, builderType, ast)); if (methodExists(builderMethodName, tdParent, -1) == MemberExistsResult.NOT_EXISTS) { - JCMethodDecl md = generateBuilderMethod(isStatic, builderMethodName, builderClassName, tdParent, typeParams); + JCMethodDecl md = generateBuilderMethod(isStatic, builderMethodName, builderClassName, annotationNode, tdParent, typeParams); recursiveSetGeneratedBy(md, ast, annotationNode.getContext()); if (md != null) injectMethod(tdParent, md); } @@ -549,7 +548,7 @@ public class HandleBuilder extends JavacAnnotationHandler { return maker.MethodDef(maker.Modifiers(Flags.PUBLIC), type.toName(buildName), returnType, List.nil(), List.nil(), thrownExceptions, body, null); } - public JCMethodDecl generateBuilderMethod(boolean isStatic, String builderMethodName, String builderClassName, JavacNode type, List typeParams) { + public JCMethodDecl generateBuilderMethod(boolean isStatic, String builderMethodName, String builderClassName, JavacNode source, JavacNode type, List typeParams) { JavacTreeMaker maker = type.getTreeMaker(); ListBuffer typeArgs = new ListBuffer(); @@ -563,7 +562,7 @@ public class HandleBuilder extends JavacAnnotationHandler { JCBlock body = maker.Block(0, List.of(statement)); int modifiers = Flags.PUBLIC; if (isStatic) modifiers |= Flags.STATIC; - return maker.MethodDef(maker.Modifiers(modifiers), type.toName(builderMethodName), namePlusTypeParamsToTypeReference(maker, type.toName(builderClassName), typeParams), copyTypeParams(maker, typeParams), List.nil(), List.nil(), body, null); + return maker.MethodDef(maker.Modifiers(modifiers), type.toName(builderMethodName), namePlusTypeParamsToTypeReference(maker, type.toName(builderClassName), typeParams), copyTypeParams(source, typeParams), List.nil(), List.nil(), body, null); } public void generateBuilderFields(JavacNode builderType, java.util.List builderFields, JCTree source) { @@ -628,12 +627,12 @@ public class HandleBuilder extends JavacAnnotationHandler { return null; } - public JavacNode makeBuilderClass(boolean isStatic, JavacNode tdParent, String builderClassName, List typeParams, JCAnnotation ast) { + public JavacNode makeBuilderClass(boolean isStatic, JavacNode source, JavacNode tdParent, String builderClassName, List typeParams, JCAnnotation ast) { JavacTreeMaker maker = tdParent.getTreeMaker(); int modifiers = Flags.PUBLIC; if (isStatic) modifiers |= Flags.STATIC; JCModifiers mods = maker.Modifiers(modifiers); - JCClassDecl builder = maker.ClassDef(mods, tdParent.toName(builderClassName), copyTypeParams(maker, typeParams), null, List.nil(), List.nil()); + JCClassDecl builder = maker.ClassDef(mods, tdParent.toName(builderClassName), copyTypeParams(source, typeParams), null, List.nil(), List.nil()); return injectType(tdParent, builder); } diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index 2b67118e..27289108 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -92,6 +92,7 @@ import com.sun.tools.javac.tree.JCTree.JCTypeParameter; import com.sun.tools.javac.tree.JCTree.JCVariableDecl; import com.sun.tools.javac.tree.JCTree.JCWildcard; import com.sun.tools.javac.tree.JCTree.TypeBoundKind; +import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.tree.TreeScanner; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; @@ -1317,10 +1318,22 @@ public class JavacHandlerUtil { return result.toList(); } - public static List copyTypeParams(JavacTreeMaker maker, List params) { + public static List copyTypeParams(JavacNode source, List params) { if (params == null || params.isEmpty()) return params; ListBuffer out = new ListBuffer(); - for (JCTypeParameter tp : params) out.append(maker.TypeParameter(tp.name, tp.bounds)); + JavacTreeMaker maker = source.getTreeMaker(); + Context context = source.getContext(); + for (JCTypeParameter tp : params) { + List bounds = tp.bounds; + if (bounds != null && !bounds.isEmpty()) { + ListBuffer boundsCopy = new ListBuffer(); + for (JCExpression expr : tp.bounds) { + boundsCopy.append(cloneType(maker, expr, source.get(), context)); + } + bounds = boundsCopy.toList(); + } + out.append(maker.TypeParameter(tp.name, bounds)); + } return out.toList(); } diff --git a/test/transform/knownBroken/before/I1298BuilderWithGenerics.java b/test/transform/knownBroken/before/I1298BuilderWithGenerics.java deleted file mode 100644 index af154d42..00000000 --- a/test/transform/knownBroken/before/I1298BuilderWithGenerics.java +++ /dev/null @@ -1,15 +0,0 @@ -import java.util.Set; -import lombok.Builder; -import lombok.Value; - -public class I1298BuilderWithGenerics { - interface Inter> {} - - @Builder @Value public static class Test< - Foo, - Bar extends Set, - Quz extends Inter> { - Foo foo; - Bar bar; - } -} diff --git a/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java b/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java new file mode 100644 index 00000000..edc1e3c6 --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderWithRecursiveGenerics.java @@ -0,0 +1,100 @@ +import java.util.Set; +public class BuilderWithRecursiveGenerics { + interface Inter> { + } + public static final class Test, Quz extends Inter> { + private final Foo foo; + private final Bar bar; + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + Test(final Foo foo, final Bar bar) { + this.foo = foo; + this.bar = bar; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public static class TestBuilder, Quz extends Inter> { + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + private Foo foo; + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + private Bar bar; + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + TestBuilder() { + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public TestBuilder foo(final Foo foo) { + this.foo = foo; + return this; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public TestBuilder bar(final Bar bar) { + this.bar = bar; + return this; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public Test build() { + return new Test(foo, bar); + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public java.lang.String toString() { + return "BuilderWithRecursiveGenerics.Test.TestBuilder(foo=" + this.foo + ", bar=" + this.bar + ")"; + } + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public static , Quz extends Inter> TestBuilder builder() { + return new TestBuilder(); + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public Foo getFoo() { + return this.foo; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public Bar getBar() { + return this.bar; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public boolean equals(final java.lang.Object o) { + if (o == this) return true; + if (!(o instanceof BuilderWithRecursiveGenerics.Test)) return false; + final BuilderWithRecursiveGenerics.Test other = (BuilderWithRecursiveGenerics.Test) o; + final java.lang.Object this$foo = this.getFoo(); + final java.lang.Object other$foo = other.getFoo(); + if (this$foo == null ? other$foo != null : !this$foo.equals(other$foo)) return false; + final java.lang.Object this$bar = this.getBar(); + final java.lang.Object other$bar = other.getBar(); + if (this$bar == null ? other$bar != null : !this$bar.equals(other$bar)) return false; + return true; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public int hashCode() { + final int PRIME = 59; + int result = 1; + final java.lang.Object $foo = this.getFoo(); + result = result * PRIME + ($foo == null ? 43 : $foo.hashCode()); + final java.lang.Object $bar = this.getBar(); + result = result * PRIME + ($bar == null ? 43 : $bar.hashCode()); + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public java.lang.String toString() { + return "BuilderWithRecursiveGenerics.Test(foo=" + this.getFoo() + ", bar=" + this.getBar() + ")"; + } + } +} diff --git a/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java b/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java new file mode 100644 index 00000000..f13b8b9b --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderWithRecursiveGenerics.java @@ -0,0 +1,78 @@ +import java.util.Set; +import lombok.Builder; +import lombok.Value; +public class BuilderWithRecursiveGenerics { + interface Inter> { + } + public static final @Builder @Value class Test, Quz extends Inter> { + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class TestBuilder, Quz extends Inter> { + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Foo foo; + private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Bar bar; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") TestBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") TestBuilder foo(final Foo foo) { + this.foo = foo; + return this; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") TestBuilder bar(final Bar bar) { + this.bar = bar; + return this; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Test build() { + return new Test(foo, bar); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { + return (((("BuilderWithRecursiveGenerics.Test.TestBuilder(foo=" + this.foo) + ", bar=") + this.bar) + ")"); + } + } + private final Foo foo; + private final Bar bar; + @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Test(final Foo foo, final Bar bar) { + super(); + this.foo = foo; + this.bar = bar; + } + public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") , Quz extends Inter>TestBuilder builder() { + return new TestBuilder(); + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Foo getFoo() { + return this.foo; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Bar getBar() { + return this.bar; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof BuilderWithRecursiveGenerics.Test))) + return false; + final BuilderWithRecursiveGenerics.Test other = (BuilderWithRecursiveGenerics.Test) o; + final java.lang.Object this$foo = this.getFoo(); + final java.lang.Object other$foo = other.getFoo(); + if (((this$foo == null) ? (other$foo != null) : (! this$foo.equals(other$foo)))) + return false; + final java.lang.Object this$bar = this.getBar(); + final java.lang.Object other$bar = other.getBar(); + if (((this$bar == null) ? (other$bar != null) : (! this$bar.equals(other$bar)))) + return false; + return true; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { + final int PRIME = 59; + int result = 1; + final java.lang.Object $foo = this.getFoo(); + result = ((result * PRIME) + (($foo == null) ? 43 : $foo.hashCode())); + final java.lang.Object $bar = this.getBar(); + result = ((result * PRIME) + (($bar == null) ? 43 : $bar.hashCode())); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() { + return (((("BuilderWithRecursiveGenerics.Test(foo=" + this.getFoo()) + ", bar=") + this.getBar()) + ")"); + } + } + public BuilderWithRecursiveGenerics() { + super(); + } +} + diff --git a/test/transform/resource/before/BuilderWithRecursiveGenerics.java b/test/transform/resource/before/BuilderWithRecursiveGenerics.java new file mode 100644 index 00000000..041da414 --- /dev/null +++ b/test/transform/resource/before/BuilderWithRecursiveGenerics.java @@ -0,0 +1,13 @@ +//issue #1298 +import java.util.Set; +import lombok.Builder; +import lombok.Value; + +public class BuilderWithRecursiveGenerics { + interface Inter> {} + + @Builder @Value public static class Test, Quz extends Inter> { + Foo foo; + Bar bar; + } +} -- cgit From d05d03743316e45abfd0d00397999d7eb959eb64 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 6 Mar 2017 23:34:23 +0100 Subject: Fixed issue #778: problems with onX if the annotation to be added has named args. --- doc/changelog.markdown | 1 + src/core/lombok/AllArgsConstructor.java | 7 +- src/core/lombok/EqualsAndHashCode.java | 9 +- src/core/lombok/Getter.java | 9 +- src/core/lombok/NoArgsConstructor.java | 7 +- src/core/lombok/RequiredArgsConstructor.java | 7 +- src/core/lombok/Setter.java | 14 +++- .../eclipse/handlers/EclipseHandlerUtil.java | 91 +++++++++++++------- .../lombok/eclipse/handlers/HandleConstructor.java | 6 +- .../eclipse/handlers/HandleEqualsAndHashCode.java | 2 +- src/core/lombok/eclipse/handlers/HandleGetter.java | 2 +- src/core/lombok/eclipse/handlers/HandleSetter.java | 4 +- src/core/lombok/eclipse/handlers/HandleWither.java | 4 +- src/core/lombok/experimental/Wither.java | 14 +++- .../lombok/javac/handlers/HandleConstructor.java | 6 +- .../javac/handlers/HandleEqualsAndHashCode.java | 2 +- src/core/lombok/javac/handlers/HandleGetter.java | 2 +- src/core/lombok/javac/handlers/HandleSetter.java | 4 +- src/core/lombok/javac/handlers/HandleWither.java | 4 +- .../lombok/javac/handlers/JavacHandlerUtil.java | 97 +++++++++++++--------- .../resource/after-delombok/OnXJava7Style.java | 43 ++++++++++ .../resource/after-delombok/OnXJava8Style.java | 43 ++++++++++ .../resource/after-ecj/OnXJava7Style.java | 31 +++++++ .../resource/after-ecj/OnXJava7StyleOn8.java | 31 +++++++ .../resource/after-ecj/OnXJava8Style.java | 31 +++++++ .../resource/after-ecj/OnXJava8StyleOn7.java | 31 +++++++ .../resource/before/GetterOnMethodErrors2.java | 1 + test/transform/resource/before/OnXJava7Style.java | 16 ++++ .../resource/before/OnXJava7StyleOn8.java | 18 ++++ test/transform/resource/before/OnXJava8Style.java | 16 ++++ .../resource/before/OnXJava8StyleOn7.java | 18 ++++ .../GetterOnMethodErrors2.java.messages | 8 +- .../GetterOnMethodErrors2.java.messages | 8 +- usage_examples/experimental/onXExample_pre.jpage | 6 +- website/features/experimental/onX.html | 6 +- 35 files changed, 488 insertions(+), 111 deletions(-) create mode 100644 test/transform/resource/after-delombok/OnXJava7Style.java create mode 100644 test/transform/resource/after-delombok/OnXJava8Style.java create mode 100644 test/transform/resource/after-ecj/OnXJava7Style.java create mode 100644 test/transform/resource/after-ecj/OnXJava7StyleOn8.java create mode 100644 test/transform/resource/after-ecj/OnXJava8Style.java create mode 100644 test/transform/resource/after-ecj/OnXJava8StyleOn7.java create mode 100644 test/transform/resource/before/OnXJava7Style.java create mode 100644 test/transform/resource/before/OnXJava7StyleOn8.java create mode 100644 test/transform/resource/before/OnXJava8Style.java create mode 100644 test/transform/resource/before/OnXJava8StyleOn7.java (limited to 'src') diff --git a/doc/changelog.markdown b/doc/changelog.markdown index eba0c595..6fc3af38 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -4,6 +4,7 @@ Lombok Changelog ### v1.16.15 "Edgy Guinea Pig" * v1.16.14 is the latest stable release of Project Lombok. * PLATFORM: Improved jdk9 support, work in progress. +* BUGFIX: The `onX` feature (which lets you add annotations to generated methods) did not work if the annotation you added contained named parameters, and you are compiling with JDK8's javac. We can't fix this (it's a bug in javac), but we have provided an alternate, prettier way to do `onX` on javac8+. [Issue #778](https://github.com/rzwitserloot/lombok/issues/778) [onX documentation](https://projectlombok.org/features/experimental/onX.html) ### v1.16.14 (February 10th, 2017) * FEATURE: Generated classes, methods and fields can now also annotated with `@lombok.Generated` [Issue #1014](https://github.com/rzwitserloot/lombok/issues/1014)
    diff --git a/src/core/lombok/AllArgsConstructor.java b/src/core/lombok/AllArgsConstructor.java index 3037c9db..45ae897c 100644 --- a/src/core/lombok/AllArgsConstructor.java +++ b/src/core/lombok/AllArgsConstructor.java @@ -49,7 +49,12 @@ public @interface AllArgsConstructor { String staticName() default ""; /** - * Any annotations listed here are put on the generated constructor. The syntax for this feature is: {@code @AllArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))} + * Any annotations listed here are put on the generated constructor. + * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).
    + * up to JDK7:
    + * {@code @AllArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))}
    + * from JDK8:
    + * {@code @AllArgsConstructor(onConstructor_={@AnnotationsGohere})} // note the underscore after {@code onConstructor}. */ AnyAnnotation[] onConstructor() default {}; diff --git a/src/core/lombok/EqualsAndHashCode.java b/src/core/lombok/EqualsAndHashCode.java index 605815ed..34f4ffc6 100644 --- a/src/core/lombok/EqualsAndHashCode.java +++ b/src/core/lombok/EqualsAndHashCode.java @@ -63,8 +63,13 @@ public @interface EqualsAndHashCode { boolean doNotUseGetters() default false; /** - * Any annotations listed here are put on the generated parameter of {@code equals} and {@code canEqual}. The syntax for this feature is: {@code @EqualsAndHashCode(onParam=@__({@AnnotationsGoHere}))} - * This is useful to add for example a {@code Nullable} annotation. + * Any annotations listed here are put on the generated parameter of {@code equals} and {@code canEqual}. + * This is useful to add for example a {@code Nullable} annotation.
    + * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).
    + * up to JDK7:
    + * {@code @EqualsAndHashCode(onParam=@__({@AnnotationsGoHere}))}
    + * from JDK8:
    + * {@code @EqualsAndHashCode(onParam_={@AnnotationsGohere})} // note the underscore after {@code onParam}. */ AnyAnnotation[] onParam() default {}; diff --git a/src/core/lombok/Getter.java b/src/core/lombok/Getter.java index 906ae60f..5a4056fa 100644 --- a/src/core/lombok/Getter.java +++ b/src/core/lombok/Getter.java @@ -58,9 +58,14 @@ public @interface Getter { lombok.AccessLevel value() default lombok.AccessLevel.PUBLIC; /** - * Any annotations listed here are put on the generated method. The syntax for this feature is: {@code @Getter(onMethod=@__({@AnnotationsGoHere}))} + * Any annotations listed here are put on the generated method. + * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).
    + * up to JDK7:
    + * {@code @Getter(onMethod=@__({@AnnotationsGoHere}))}
    + * from JDK8:
    + * {@code @Getter(onMethod_={@AnnotationsGohere})} // note the underscore after {@code onMethod}. */ - AnyAnnotation[] onMethod() default @AnyAnnotation; + AnyAnnotation[] onMethod() default {}; boolean lazy() default false; diff --git a/src/core/lombok/NoArgsConstructor.java b/src/core/lombok/NoArgsConstructor.java index ff437bba..5f2268a8 100644 --- a/src/core/lombok/NoArgsConstructor.java +++ b/src/core/lombok/NoArgsConstructor.java @@ -51,7 +51,12 @@ public @interface NoArgsConstructor { String staticName() default ""; /** - * Any annotations listed here are put on the generated constructor. The syntax for this feature is: {@code @NoArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))} + * Any annotations listed here are put on the generated constructor. + * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).
    + * up to JDK7:
    + * {@code @NoArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))}
    + * from JDK8:
    + * {@code @NoArgsConstructor(onConstructor_={@AnnotationsGohere})} // note the underscore after {@code onConstructor}. */ AnyAnnotation[] onConstructor() default {}; diff --git a/src/core/lombok/RequiredArgsConstructor.java b/src/core/lombok/RequiredArgsConstructor.java index 7a9da3f9..abfdd55c 100644 --- a/src/core/lombok/RequiredArgsConstructor.java +++ b/src/core/lombok/RequiredArgsConstructor.java @@ -49,7 +49,12 @@ public @interface RequiredArgsConstructor { String staticName() default ""; /** - * Any annotations listed here are put on the generated constructor. The syntax for this feature is: {@code @RequiredArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))} + * Any annotations listed here are put on the generated constructor. + * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).
    + * up to JDK7:
    + * {@code @RequiredArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))}
    + * from JDK8:
    + * {@code @RequiredArgsConstructor(onConstructor_={@AnnotationsGohere})} // note the underscore after {@code onConstructor}. */ AnyAnnotation[] onConstructor() default {}; diff --git a/src/core/lombok/Setter.java b/src/core/lombok/Setter.java index ba9e9759..f2ebe5b3 100644 --- a/src/core/lombok/Setter.java +++ b/src/core/lombok/Setter.java @@ -59,12 +59,22 @@ public @interface Setter { lombok.AccessLevel value() default lombok.AccessLevel.PUBLIC; /** - * Any annotations listed here are put on the generated method. The syntax for this feature is: {@code @Setter(onMethod=@__({@AnnotationsGoHere}))} + * Any annotations listed here are put on the generated method. + * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).
    + * up to JDK7:
    + * {@code @Setter(onMethod=@__({@AnnotationsGoHere}))}
    + * from JDK8:
    + * {@code @Setter(onMethod_={@AnnotationsGohere})} // note the underscore after {@code onMethod}. */ AnyAnnotation[] onMethod() default {}; /** - * Any annotations listed here are put on the generated method's parameter. The syntax for this feature is: {@code @Setter(onParam=@__({@AnnotationsGoHere}))} + * Any annotations listed here are put on the generated method's parameter. + * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).
    + * up to JDK7:
    + * {@code @Setter(onParam=@__({@AnnotationsGoHere}))}
    + * from JDK8:
    + * {@code @Setter(onParam_={@AnnotationsGohere})} // note the underscore after {@code onParam}. */ AnyAnnotation[] onParam() default {}; diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java index ab4ca27b..4726b17e 100644 --- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java +++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java @@ -1616,6 +1616,14 @@ public class EclipseHandlerUtil { return true; } + public static void addError(String errorName, EclipseNode node) { + if (node.getLatestJavaSpecSupported() < 8) { + node.addError("The correct format is " + errorName + "_={@SomeAnnotation, @SomeOtherAnnotation})"); + } else { + node.addError("The correct format is " + errorName + "=@__({@SomeAnnotation, @SomeOtherAnnotation}))"); + } + } + public static List unboxAndRemoveAnnotationParameter(Annotation annotation, String annotationName, String errorName, EclipseNode errorNode) { if ("value".equals(annotationName)) { // We can't unbox this, because SingleMemberAnnotation REQUIRES a value, and this method @@ -1638,51 +1646,70 @@ public class EclipseHandlerUtil { char[] nameAsCharArray = annotationName.toCharArray(); + top: for (int i = 0; i < pairs.length; i++) { - if (pairs[i].name == null || !Arrays.equals(nameAsCharArray, pairs[i].name)) continue; + boolean allowRaw; + char[] name = pairs[i].name; + if (name == null) continue; + if (name.length < nameAsCharArray.length) continue; + for (int j = 0; j < nameAsCharArray.length; j++) { + if (name[j] != nameAsCharArray[j]) continue top; + } + allowRaw = name.length > nameAsCharArray.length; + for (int j = nameAsCharArray.length; j < name.length; j++) { + if (name[j] != '_') continue top; + } + // If we're still here it's the targeted annotation param. Expression value = pairs[i].value; MemberValuePair[] newPairs = new MemberValuePair[pairs.length - 1]; if (i > 0) System.arraycopy(pairs, 0, newPairs, 0, i); if (i < pairs.length - 1) System.arraycopy(pairs, i + 1, newPairs, i, pairs.length - i - 1); normalAnnotation.memberValuePairs = newPairs; - // We have now removed the annotation parameter and stored '@__({... annotations ...})', - // which we must now unbox. - if (!(value instanceof Annotation)) { - errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); - return Collections.emptyList(); - } - - Annotation atDummyIdentifier = (Annotation) value; - if (!(atDummyIdentifier.type instanceof SingleTypeReference) || - !isAllValidOnXCharacters(((SingleTypeReference) atDummyIdentifier.type).token)) { - errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); - return Collections.emptyList(); - } - - if (atDummyIdentifier instanceof MarkerAnnotation) { - // It's @Getter(onMethod=@__). This is weird, but fine. - return Collections.emptyList(); - } + // We have now removed the annotation parameter and stored the value, + // which we must now unbox. It's either annotations, or @__(annotations). Expression content = null; - if (atDummyIdentifier instanceof NormalAnnotation) { - MemberValuePair[] mvps = ((NormalAnnotation) atDummyIdentifier).memberValuePairs; - if (mvps == null || mvps.length == 0) { - // It's @Getter(onMethod=@__()). This is weird, but fine. + if (value instanceof ArrayInitializer) { + if (!allowRaw) { + addError(errorName, errorNode); return Collections.emptyList(); } - if (mvps.length == 1 && Arrays.equals("value".toCharArray(), mvps[0].name)) { - content = mvps[0].value; + content = value; + } else if (!(value instanceof Annotation)) { + addError(errorName, errorNode); + return Collections.emptyList(); + } else { + Annotation atDummyIdentifier = (Annotation) value; + if (atDummyIdentifier.type instanceof SingleTypeReference && isAllValidOnXCharacters(((SingleTypeReference) atDummyIdentifier.type).token)) { + if (atDummyIdentifier instanceof MarkerAnnotation) { + return Collections.emptyList(); + } else if (atDummyIdentifier instanceof NormalAnnotation) { + MemberValuePair[] mvps = ((NormalAnnotation) atDummyIdentifier).memberValuePairs; + if (mvps == null || mvps.length == 0) { + return Collections.emptyList(); + } + if (mvps.length == 1 && Arrays.equals("value".toCharArray(), mvps[0].name)) { + content = mvps[0].value; + } + } else if (atDummyIdentifier instanceof SingleMemberAnnotation) { + content = ((SingleMemberAnnotation) atDummyIdentifier).memberValue; + } else { + addError(errorName, errorNode); + return Collections.emptyList(); + } + } else { + if (allowRaw) { + content = atDummyIdentifier; + } else { + addError(errorName, errorNode); + return Collections.emptyList(); + } } } - if (atDummyIdentifier instanceof SingleMemberAnnotation) { - content = ((SingleMemberAnnotation) atDummyIdentifier).memberValue; - } - if (content == null) { - errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); + addError(errorName, errorNode); return Collections.emptyList(); } @@ -1694,13 +1721,13 @@ public class EclipseHandlerUtil { if (expressions != null) for (Expression ex : expressions) { if (ex instanceof Annotation) result.add((Annotation) ex); else { - errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); + addError(errorName, errorNode); return Collections.emptyList(); } } return result; } else { - errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); + addError(errorName, errorNode); return Collections.emptyList(); } } diff --git a/src/core/lombok/eclipse/handlers/HandleConstructor.java b/src/core/lombok/eclipse/handlers/HandleConstructor.java index a3b0585d..2aed4a4e 100644 --- a/src/core/lombok/eclipse/handlers/HandleConstructor.java +++ b/src/core/lombok/eclipse/handlers/HandleConstructor.java @@ -93,7 +93,7 @@ public class HandleConstructor { boolean force = ann.force(); List fields = force ? findFinalFields(typeNode) : Collections.emptyList(); - List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@NoArgsConstructor(onConstructor=", annotationNode); + List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@NoArgsConstructor(onConstructor", annotationNode); new HandleConstructor().generateConstructor(typeNode, level, fields, force, staticName, SkipIfConstructorExists.NO, null, onConstructor, annotationNode); } @@ -117,7 +117,7 @@ public class HandleConstructor { suppressConstructorProperties = suppress; } - List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@RequiredArgsConstructor(onConstructor=", annotationNode); + List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@RequiredArgsConstructor(onConstructor", annotationNode); new HandleConstructor().generateConstructor( typeNode, level, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO, @@ -179,7 +179,7 @@ public class HandleConstructor { suppressConstructorProperties = suppress; } - List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@AllArgsConstructor(onConstructor=", annotationNode); + List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@AllArgsConstructor(onConstructor", annotationNode); new HandleConstructor().generateConstructor( typeNode, level, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO, diff --git a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java index bc25ae2a..ceef3d3c 100644 --- a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java +++ b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java @@ -129,7 +129,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler includes = Arrays.asList(ann.of()); EclipseNode typeNode = annotationNode.up(); - List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@EqualsAndHashCode(onParam=", annotationNode); + List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@EqualsAndHashCode(onParam", annotationNode); checkForBogusFieldNames(typeNode, annotation); Boolean callSuper = ann.callSuper(); diff --git a/src/core/lombok/eclipse/handlers/HandleGetter.java b/src/core/lombok/eclipse/handlers/HandleGetter.java index 77d678f2..c11303f3 100644 --- a/src/core/lombok/eclipse/handlers/HandleGetter.java +++ b/src/core/lombok/eclipse/handlers/HandleGetter.java @@ -148,7 +148,7 @@ public class HandleGetter extends EclipseAnnotationHandler { if (node == null) return; - List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Getter(onMethod=", annotationNode); + List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Getter(onMethod", annotationNode); switch (node.getKind()) { case FIELD: diff --git a/src/core/lombok/eclipse/handlers/HandleSetter.java b/src/core/lombok/eclipse/handlers/HandleSetter.java index 1fcf751d..7e7ea121 100644 --- a/src/core/lombok/eclipse/handlers/HandleSetter.java +++ b/src/core/lombok/eclipse/handlers/HandleSetter.java @@ -125,8 +125,8 @@ public class HandleSetter extends EclipseAnnotationHandler { AccessLevel level = annotation.getInstance().value(); if (level == AccessLevel.NONE || node == null) return; - List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Setter(onMethod=", annotationNode); - List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Setter(onParam=", annotationNode); + List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Setter(onMethod", annotationNode); + List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Setter(onParam", annotationNode); switch (node.getKind()) { case FIELD: diff --git a/src/core/lombok/eclipse/handlers/HandleWither.java b/src/core/lombok/eclipse/handlers/HandleWither.java index d8ac8df6..200ebde7 100644 --- a/src/core/lombok/eclipse/handlers/HandleWither.java +++ b/src/core/lombok/eclipse/handlers/HandleWither.java @@ -127,8 +127,8 @@ public class HandleWither extends EclipseAnnotationHandler { AccessLevel level = annotation.getInstance().value(); if (level == AccessLevel.NONE || node == null) return; - List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Wither(onMethod=", annotationNode); - List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Wither(onParam=", annotationNode); + List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Wither(onMethod", annotationNode); + List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Wither(onParam", annotationNode); switch (node.getKind()) { case FIELD: diff --git a/src/core/lombok/experimental/Wither.java b/src/core/lombok/experimental/Wither.java index b4131187..3fb767d1 100644 --- a/src/core/lombok/experimental/Wither.java +++ b/src/core/lombok/experimental/Wither.java @@ -60,12 +60,22 @@ public @interface Wither { AccessLevel value() default AccessLevel.PUBLIC; /** - * Any annotations listed here are put on the generated method. The syntax for this feature is: {@code @Setter(onMethod=@__({@AnnotationsGoHere}))} + * Any annotations listed here are put on the generated method. + * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).
    + * up to JDK7:
    + * {@code @Wither(onMethod=@__({@AnnotationsGoHere}))}
    + * from JDK8:
    + * {@code @Wither(onMethod_={@AnnotationsGohere})} // note the underscore after {@code onMethod}. */ AnyAnnotation[] onMethod() default {}; /** - * Any annotations listed here are put on the generated method's parameter. The syntax for this feature is: {@code @Setter(onParam=@__({@AnnotationsGoHere}))} + * Any annotations listed here are put on the generated method's parameter. + * The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).
    + * up to JDK7:
    + * {@code @Wither(onParam=@__({@AnnotationsGoHere}))}
    + * from JDK8:
    + * {@code @Wither(onParam_={@AnnotationsGohere})} // note the underscore after {@code onParam}. */ AnyAnnotation[] onParam() default {}; diff --git a/src/core/lombok/javac/handlers/HandleConstructor.java b/src/core/lombok/javac/handlers/HandleConstructor.java index ef4ba088..617ec0d1 100644 --- a/src/core/lombok/javac/handlers/HandleConstructor.java +++ b/src/core/lombok/javac/handlers/HandleConstructor.java @@ -71,7 +71,7 @@ public class HandleConstructor { deleteImportFromCompilationUnit(annotationNode, "lombok.AccessLevel"); JavacNode typeNode = annotationNode.up(); if (!checkLegality(typeNode, annotationNode, NoArgsConstructor.class.getSimpleName())) return; - List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@NoArgsConstructor(onConstructor=", annotationNode); + List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@NoArgsConstructor(onConstructor", annotationNode); NoArgsConstructor ann = annotation.getInstance(); AccessLevel level = ann.access(); if (level == AccessLevel.NONE) return; @@ -91,7 +91,7 @@ public class HandleConstructor { deleteImportFromCompilationUnit(annotationNode, "lombok.AccessLevel"); JavacNode typeNode = annotationNode.up(); if (!checkLegality(typeNode, annotationNode, RequiredArgsConstructor.class.getSimpleName())) return; - List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@RequiredArgsConstructor(onConstructor=", annotationNode); + List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@RequiredArgsConstructor(onConstructor", annotationNode); RequiredArgsConstructor ann = annotation.getInstance(); AccessLevel level = ann.access(); if (level == AccessLevel.NONE) return; @@ -141,7 +141,7 @@ public class HandleConstructor { deleteImportFromCompilationUnit(annotationNode, "lombok.AccessLevel"); JavacNode typeNode = annotationNode.up(); if (!checkLegality(typeNode, annotationNode, AllArgsConstructor.class.getSimpleName())) return; - List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@AllArgsConstructor(onConstructor=", annotationNode); + List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@AllArgsConstructor(onConstructor", annotationNode); AllArgsConstructor ann = annotation.getInstance(); AccessLevel level = ann.access(); if (level == AccessLevel.NONE) return; diff --git a/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java index 8e868bca..6df56ed6 100644 --- a/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java +++ b/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java @@ -95,7 +95,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler excludes = List.from(ann.exclude()); List includes = List.from(ann.of()); JavacNode typeNode = annotationNode.up(); - List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@EqualsAndHashCode(onParam=", annotationNode); + List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@EqualsAndHashCode(onParam", annotationNode); checkForBogusFieldNames(typeNode, annotation); Boolean callSuper = ann.callSuper(); diff --git a/src/core/lombok/javac/handlers/HandleGetter.java b/src/core/lombok/javac/handlers/HandleGetter.java index 60dbe8ee..5a2e1993 100644 --- a/src/core/lombok/javac/handlers/HandleGetter.java +++ b/src/core/lombok/javac/handlers/HandleGetter.java @@ -147,7 +147,7 @@ public class HandleGetter extends JavacAnnotationHandler { if (node == null) return; - List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Getter(onMethod=", annotationNode); + List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Getter(onMethod", annotationNode); switch (node.getKind()) { case FIELD: diff --git a/src/core/lombok/javac/handlers/HandleSetter.java b/src/core/lombok/javac/handlers/HandleSetter.java index 02cc3775..e766127a 100644 --- a/src/core/lombok/javac/handlers/HandleSetter.java +++ b/src/core/lombok/javac/handlers/HandleSetter.java @@ -129,8 +129,8 @@ public class HandleSetter extends JavacAnnotationHandler { if (level == AccessLevel.NONE || node == null) return; - List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Setter(onMethod=", annotationNode); - List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Setter(onParam=", annotationNode); + List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Setter(onMethod", annotationNode); + List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Setter(onParam", annotationNode); switch (node.getKind()) { case FIELD: diff --git a/src/core/lombok/javac/handlers/HandleWither.java b/src/core/lombok/javac/handlers/HandleWither.java index 8aec0240..987a3d34 100644 --- a/src/core/lombok/javac/handlers/HandleWither.java +++ b/src/core/lombok/javac/handlers/HandleWither.java @@ -131,8 +131,8 @@ public class HandleWither extends JavacAnnotationHandler { if (level == AccessLevel.NONE || node == null) return; - List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Wither(onMethod=", annotationNode); - List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Wither(onParam=", annotationNode); + List onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Wither(onMethod", annotationNode); + List onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Wither(onParam", annotationNode); switch (node.getKind()) { case FIELD: diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index 27289108..56e666f7 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -1240,19 +1240,9 @@ public class JavacHandlerUtil { ListBuffer params = new ListBuffer(); ListBuffer result = new ListBuffer(); - try { - for (JCExpression arg : ast.args) { - String argName = "value"; - if (arg instanceof JCAssign) { - JCAssign as = (JCAssign) arg; - argName = as.lhs.toString(); - } - if (!argName.equals(parameterName)) continue; - } - } catch (Exception ignore) {} - outer: for (JCExpression param : ast.args) { + boolean allowRaw; String nameOfParam = "value"; JCExpression valueOfParam = null; if (param instanceof JCAssign) { @@ -1264,6 +1254,15 @@ public class JavacHandlerUtil { valueOfParam = assign.rhs; } + /* strip trailing underscores */ { + int lastIdx; + for (lastIdx = nameOfParam.length() ; lastIdx > 0; lastIdx--) { + if (nameOfParam.charAt(lastIdx - 1) != '_') break; + } + allowRaw = lastIdx < nameOfParam.length(); + nameOfParam = nameOfParam.substring(0, lastIdx); + } + if (!parameterName.equals(nameOfParam)) { params.append(param); continue outer; @@ -1276,48 +1275,68 @@ public class JavacHandlerUtil { String dummyAnnotationName = ((JCAnnotation) valueOfParam).annotationType.toString(); dummyAnnotationName = dummyAnnotationName.replace("_", "").replace("$", "").replace("x", "").replace("X", ""); if (dummyAnnotationName.length() > 0) { - annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); - continue outer; - } - for (JCExpression expr : ((JCAnnotation) valueOfParam).args) { - if (expr instanceof JCAssign && ((JCAssign) expr).lhs instanceof JCIdent) { - JCIdent id = (JCIdent) ((JCAssign) expr).lhs; - if ("value".equals(id.name.toString())) { - expr = ((JCAssign) expr).rhs; - } else { - annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); - continue outer; - } + if (allowRaw) { + result.append((JCAnnotation) valueOfParam); + } else { + addError(errorName, annotationNode); + continue outer; } - - if (expr instanceof JCAnnotation) { - result.append((JCAnnotation) expr); - } else if (expr instanceof JCNewArray) { - for (JCExpression expr2 : ((JCNewArray) expr).elems) { - if (expr2 instanceof JCAnnotation) { - result.append((JCAnnotation) expr2); + } else { + for (JCExpression expr : ((JCAnnotation) valueOfParam).args) { + if (expr instanceof JCAssign && ((JCAssign) expr).lhs instanceof JCIdent) { + JCIdent id = (JCIdent) ((JCAssign) expr).lhs; + if ("value".equals(id.name.toString())) { + expr = ((JCAssign) expr).rhs; } else { - annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); - continue outer; + addError(errorName, annotationNode); } } - } else { - annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); - continue outer; + + if (expr instanceof JCAnnotation) { + result.append((JCAnnotation) expr); + } else if (expr instanceof JCNewArray) { + for (JCExpression expr2 : ((JCNewArray) expr).elems) { + if (expr2 instanceof JCAnnotation) { + result.append((JCAnnotation) expr2); + } else { + addError(errorName, annotationNode); + continue outer; + } + } + } else { + addError(errorName, annotationNode); + continue outer; + } } } - } else { - if (valueOfParam instanceof JCNewArray && ((JCNewArray) valueOfParam).elems.isEmpty()) { - // Then we just remove it and move on (it's onMethod={} for example). + } else if (valueOfParam instanceof JCNewArray) { + JCNewArray arr = (JCNewArray) valueOfParam; + if (arr.elems.isEmpty()) { + // Just remove it, this is always fine. + } else if (allowRaw) { + for (JCExpression jce : arr.elems) { + if (jce instanceof JCAnnotation) result.append((JCAnnotation) jce); + else addError(errorName, annotationNode); + } } else { - annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))"); + addError(errorName, annotationNode); } + } else { + addError(errorName, annotationNode); } } ast.args = params.toList(); return result.toList(); } + private static void addError(String errorName, JavacNode node) { + if (node.getLatestJavaSpecSupported() < 8) { + node.addError("The correct format up to JDK7 is " + errorName + "=@__({@SomeAnnotation, @SomeOtherAnnotation}))"); + } else { + node.addError("The correct format for JDK8+ is " + errorName + "_={@SomeAnnotation, @SomeOtherAnnotation})"); + } + } + public static List copyTypeParams(JavacNode source, List params) { if (params == null || params.isEmpty()) return params; ListBuffer out = new ListBuffer(); diff --git a/test/transform/resource/after-delombok/OnXJava7Style.java b/test/transform/resource/after-delombok/OnXJava7Style.java new file mode 100644 index 00000000..f3a58d79 --- /dev/null +++ b/test/transform/resource/after-delombok/OnXJava7Style.java @@ -0,0 +1,43 @@ +//version :7 +public class OnXJava7Style { + @interface Foo { + String value() default ""; + } + @interface Bar { + String stuff() default ""; + } + String a; + String b; + String c; + String d; + String e; + @Foo + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public String getA() { + return this.a; + } + @Foo + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void setB(final String b) { + this.b = b; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void setC(@Foo("a") final String c) { + this.c = c; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void setD(@Bar(stuff = "b") final String d) { + this.d = d; + } + @Foo("c") + @Bar(stuff = "d") + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public String getE() { + return this.e; + } +} diff --git a/test/transform/resource/after-delombok/OnXJava8Style.java b/test/transform/resource/after-delombok/OnXJava8Style.java new file mode 100644 index 00000000..b0ea96d6 --- /dev/null +++ b/test/transform/resource/after-delombok/OnXJava8Style.java @@ -0,0 +1,43 @@ +//version 8: +public class OnXJava8Style { + @interface Foo { + String value() default ""; + } + @interface Bar { + String stuff() default ""; + } + String a; + String b; + String c; + String d; + String e; + @Foo + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public String getA() { + return this.a; + } + @Foo + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void setB(final String b) { + this.b = b; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void setC(@Foo("a") final String c) { + this.c = c; + } + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public void setD(@Bar(stuff = "b") final String d) { + this.d = d; + } + @Foo("c") + @Bar(stuff = "d") + @java.lang.SuppressWarnings("all") + @javax.annotation.Generated("lombok") + public String getE() { + return this.e; + } +} diff --git a/test/transform/resource/after-ecj/OnXJava7Style.java b/test/transform/resource/after-ecj/OnXJava7Style.java new file mode 100644 index 00000000..415234d8 --- /dev/null +++ b/test/transform/resource/after-ecj/OnXJava7Style.java @@ -0,0 +1,31 @@ +public class OnXJava7Style { + @interface Foo { + String value() default ""; + } + @interface Bar { + String stuff() default ""; + } + @lombok.Getter() String a; + @lombok.Setter() String b; + @lombok.Setter() String c; + @lombok.Setter() String d; + @lombok.Getter() String e; + public OnXJava7Style() { + super(); + } + public @Foo @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getA() { + return this.a; + } + public @Foo() @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setB(final String b) { + this.b = b; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setC(final @Foo("a") String c) { + this.c = c; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setD(final @Bar(stuff = "b") String d) { + this.d = d; + } + public @Foo(value = "c") @Bar(stuff = "d") @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getE() { + return this.e; + } +} diff --git a/test/transform/resource/after-ecj/OnXJava7StyleOn8.java b/test/transform/resource/after-ecj/OnXJava7StyleOn8.java new file mode 100644 index 00000000..da51a5f0 --- /dev/null +++ b/test/transform/resource/after-ecj/OnXJava7StyleOn8.java @@ -0,0 +1,31 @@ +public class OnXJava7StyleOn8 { + @interface Foo { + String value() default ""; + } + @interface Bar { + String stuff() default ""; + } + @lombok.Getter() String a; + @lombok.Setter() String b; + @lombok.Setter() String c; + @lombok.Setter() String d; + @lombok.Getter() String e; + public OnXJava7StyleOn8() { + super(); + } + public @Foo @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getA() { + return this.a; + } + public @Foo() @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setB(final String b) { + this.b = b; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setC(final @Foo("a") String c) { + this.c = c; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setD(final @Bar(stuff = "b") String d) { + this.d = d; + } + public @Foo(value = "c") @Bar(stuff = "d") @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getE() { + return this.e; + } +} diff --git a/test/transform/resource/after-ecj/OnXJava8Style.java b/test/transform/resource/after-ecj/OnXJava8Style.java new file mode 100644 index 00000000..0e95a20b --- /dev/null +++ b/test/transform/resource/after-ecj/OnXJava8Style.java @@ -0,0 +1,31 @@ +public class OnXJava8Style { + @interface Foo { + String value() default ""; + } + @interface Bar { + String stuff() default ""; + } + @lombok.Getter() String a; + @lombok.Setter() String b; + @lombok.Setter() String c; + @lombok.Setter() String d; + @lombok.Getter() String e; + public OnXJava8Style() { + super(); + } + public @Foo @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getA() { + return this.a; + } + public @Foo() @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setB(final String b) { + this.b = b; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setC(final @Foo("a") String c) { + this.c = c; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setD(final @Bar(stuff = "b") String d) { + this.d = d; + } + public @Foo(value = "c") @Bar(stuff = "d") @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getE() { + return this.e; + } +} diff --git a/test/transform/resource/after-ecj/OnXJava8StyleOn7.java b/test/transform/resource/after-ecj/OnXJava8StyleOn7.java new file mode 100644 index 00000000..28afb5a7 --- /dev/null +++ b/test/transform/resource/after-ecj/OnXJava8StyleOn7.java @@ -0,0 +1,31 @@ +public class OnXJava8StyleOn7 { + @interface Foo { + String value() default ""; + } + @interface Bar { + String stuff() default ""; + } + @lombok.Getter() String a; + @lombok.Setter() String b; + @lombok.Setter() String c; + @lombok.Setter() String d; + @lombok.Getter() String e; + public OnXJava8StyleOn7() { + super(); + } + public @Foo @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getA() { + return this.a; + } + public @Foo() @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setB(final String b) { + this.b = b; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setC(final @Foo("a") String c) { + this.c = c; + } + public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setD(final @Bar(stuff = "b") String d) { + this.d = d; + } + public @Foo(value = "c") @Bar(stuff = "d") @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String getE() { + return this.e; + } +} diff --git a/test/transform/resource/before/GetterOnMethodErrors2.java b/test/transform/resource/before/GetterOnMethodErrors2.java index 2fd98c83..08ef13c6 100644 --- a/test/transform/resource/before/GetterOnMethodErrors2.java +++ b/test/transform/resource/before/GetterOnMethodErrors2.java @@ -1,3 +1,4 @@ +//version 8: class GetterOnMethodErrors2 { @lombok.Getter(onMethod=@_A_(@Deprecated)) private int bad1; @lombok.Getter(onMethod=@__(5)) private int bad2; diff --git a/test/transform/resource/before/OnXJava7Style.java b/test/transform/resource/before/OnXJava7Style.java new file mode 100644 index 00000000..6a3c35ff --- /dev/null +++ b/test/transform/resource/before/OnXJava7Style.java @@ -0,0 +1,16 @@ +//version :7 +public class OnXJava7Style { + @interface Foo { + String value() default ""; + } + + @interface Bar { + String stuff() default ""; + } + + @lombok.Getter(onMethod=@__(@Foo)) String a; + @lombok.Setter(onMethod=@__(@Foo())) String b; + @lombok.Setter(onParam=@__(@Foo("a"))) String c; + @lombok.Setter(onParam=@__(@Bar(stuff="b"))) String d; + @lombok.Getter(onMethod=@__({@Foo(value="c"), @Bar(stuff="d")})) String e; +} diff --git a/test/transform/resource/before/OnXJava7StyleOn8.java b/test/transform/resource/before/OnXJava7StyleOn8.java new file mode 100644 index 00000000..582fe6ce --- /dev/null +++ b/test/transform/resource/before/OnXJava7StyleOn8.java @@ -0,0 +1,18 @@ +//platform ecj +//version 8: + +public class OnXJava7StyleOn8 { + @interface Foo { + String value() default ""; + } + + @interface Bar { + String stuff() default ""; + } + + @lombok.Getter(onMethod=@__(@Foo)) String a; + @lombok.Setter(onMethod=@__(@Foo())) String b; + @lombok.Setter(onParam=@__(@Foo("a"))) String c; + @lombok.Setter(onParam=@__(@Bar(stuff="b"))) String d; + @lombok.Getter(onMethod=@__({@Foo(value="c"), @Bar(stuff="d")})) String e; +} diff --git a/test/transform/resource/before/OnXJava8Style.java b/test/transform/resource/before/OnXJava8Style.java new file mode 100644 index 00000000..ffb91727 --- /dev/null +++ b/test/transform/resource/before/OnXJava8Style.java @@ -0,0 +1,16 @@ +//version 8: +public class OnXJava8Style { + @interface Foo { + String value() default ""; + } + + @interface Bar { + String stuff() default ""; + } + + @lombok.Getter(onMethod_=@Foo) String a; + @lombok.Setter(onMethod_=@Foo()) String b; + @lombok.Setter(onParam_=@Foo("a")) String c; + @lombok.Setter(onParam_=@Bar(stuff="b")) String d; + @lombok.Getter(onMethod_={@Foo(value="c"), @Bar(stuff="d")}) String e; +} diff --git a/test/transform/resource/before/OnXJava8StyleOn7.java b/test/transform/resource/before/OnXJava8StyleOn7.java new file mode 100644 index 00000000..c006e468 --- /dev/null +++ b/test/transform/resource/before/OnXJava8StyleOn7.java @@ -0,0 +1,18 @@ +//platform ecj +//version :7 + +public class OnXJava8StyleOn7 { + @interface Foo { + String value() default ""; + } + + @interface Bar { + String stuff() default ""; + } + + @lombok.Getter(onMethod_=@Foo) String a; + @lombok.Setter(onMethod_=@Foo()) String b; + @lombok.Setter(onParam_=@Foo("a")) String c; + @lombok.Setter(onParam_=@Bar(stuff="b")) String d; + @lombok.Getter(onMethod_={@Foo(value="c"), @Bar(stuff="d")}) String e; +} diff --git a/test/transform/resource/messages-delombok/GetterOnMethodErrors2.java.messages b/test/transform/resource/messages-delombok/GetterOnMethodErrors2.java.messages index 53a9b9ad..6a181265 100644 --- a/test/transform/resource/messages-delombok/GetterOnMethodErrors2.java.messages +++ b/test/transform/resource/messages-delombok/GetterOnMethodErrors2.java.messages @@ -1,4 +1,4 @@ -2 The correct format is @Getter(onMethod=@__({@SomeAnnotation, @SomeOtherAnnotation})) -3 The correct format is @Getter(onMethod=@__({@SomeAnnotation, @SomeOtherAnnotation})) -4 The correct format is @Getter(onMethod=@__({@SomeAnnotation, @SomeOtherAnnotation})) -5 The correct format is @Getter(onMethod=@__({@SomeAnnotation, @SomeOtherAnnotation})) +2 The correct format is @Getter(onMethod_={@SomeAnnotation, @SomeOtherAnnotation}) +3 The correct format is @Getter(onMethod_={@SomeAnnotation, @SomeOtherAnnotation}) +4 The correct format is @Getter(onMethod_={@SomeAnnotation, @SomeOtherAnnotation}) +5 The correct format is @Getter(onMethod_={@SomeAnnotation, @SomeOtherAnnotation}) diff --git a/test/transform/resource/messages-ecj/GetterOnMethodErrors2.java.messages b/test/transform/resource/messages-ecj/GetterOnMethodErrors2.java.messages index 53a9b9ad..6a181265 100644 --- a/test/transform/resource/messages-ecj/GetterOnMethodErrors2.java.messages +++ b/test/transform/resource/messages-ecj/GetterOnMethodErrors2.java.messages @@ -1,4 +1,4 @@ -2 The correct format is @Getter(onMethod=@__({@SomeAnnotation, @SomeOtherAnnotation})) -3 The correct format is @Getter(onMethod=@__({@SomeAnnotation, @SomeOtherAnnotation})) -4 The correct format is @Getter(onMethod=@__({@SomeAnnotation, @SomeOtherAnnotation})) -5 The correct format is @Getter(onMethod=@__({@SomeAnnotation, @SomeOtherAnnotation})) +2 The correct format is @Getter(onMethod_={@SomeAnnotation, @SomeOtherAnnotation}) +3 The correct format is @Getter(onMethod_={@SomeAnnotation, @SomeOtherAnnotation}) +4 The correct format is @Getter(onMethod_={@SomeAnnotation, @SomeOtherAnnotation}) +5 The correct format is @Getter(onMethod_={@SomeAnnotation, @SomeOtherAnnotation}) diff --git a/usage_examples/experimental/onXExample_pre.jpage b/usage_examples/experimental/onXExample_pre.jpage index f8fcb435..e54371ae 100644 --- a/usage_examples/experimental/onXExample_pre.jpage +++ b/usage_examples/experimental/onXExample_pre.jpage @@ -9,7 +9,9 @@ import javax.validation.constraints.Max; @AllArgsConstructor(onConstructor=@__(@Inject)) public class OnXExample { - @Getter(onMethod=@__({@Id, @Column(name="unique-id")})) - @Setter(onParam=@__(@Max(10000))) +// @Getter(onMethod=@__({@Id, @Column(name="unique-id")})) //JDK7 +// @Setter(onParam=@__(@Max(10000))) //JDK7 + @Getter(onMethod_={@Id, @Column(name="unique-id")}) //JDK8 + @Setter(onParam_=@Max(10000)) //JDK8 private long unid; } diff --git a/website/features/experimental/onX.html b/website/features/experimental/onX.html index d4260dd5..39faa1bf 100644 --- a/website/features/experimental/onX.html +++ b/website/features/experimental/onX.html @@ -42,7 +42,9 @@

    @Setter and @Wither support onParam in addition to onMethod; annotations listed will be put on the only parameter that the generated method has. @EqualsAndHashCode also supports onParam; the listed annotation(s) will be placed on the single parameter of the generated equals method, as well as any generated canEqual method.

    - The syntax is a little strange; to use any of the 3 onX features, you must wrap the annotations to be applied to the constructor / method / parameter in @__(@AnnotationGoesHere). To apply multiple annotations, use @__({@Annotation1, @Annotation2}). The annotations can themselves obviously have parameters as well. + The syntax is a little strange and depends on the javac you are using.
    + On javac7, to use any of the 3 onX features, you must wrap the annotations to be applied to the constructor / method / parameter in @__(@AnnotationGoesHere). To apply multiple annotations, use @__({@Annotation1, @Annotation2}). The annotations can themselves obviously have parameters as well.
    + On javac8 and up, you add an underscore after onMethod, onParam, or onConstructor.

    @@ -62,6 +64,8 @@

    The reason of the weird syntax is to make this feature work in javac 7 compilers; the @__ type is an annotation reference to the annotation type __ (double underscore) which doesn't actually exist; this makes javac 7 delay aborting the compilation process due to an error because it is possible an annotation processor will later create the __ type. Instead, lombok applies the annotations and removes the references so that the error will never actually occur. The point is: The __ type must not exist, otherwise the feature does not work. In the rare case that the __ type does exist (and is imported or in the package), you can simply add more underscores. Technically any non-existent type would work, but to maintain consistency and readability and catch erroneous use, lombok considers it an error if the 'wrapper' annotation is anything but a series of underscores.

    + In javac8, the above feature should work but due to a bug in javac8 it does not. However, starting in javac8, if the parameter name does not exist in the annotation type, compilation proceeds to a phase where lombok can fix it. +

    To reiterate: This feature can disappear at any time; if you use this feature, be prepared to adjust your code when we find a nicer way of implementing this feature, or, if a future version of javac forces us to remove this feature entirely with no alternative.

    The onX parameter is not legal on any type-wide variant. For example, a @Getter annotation on a class does not support onMethod. -- cgit From a2c10c70fa8e2c8736464a5c3d445e2ca6e8a296 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 7 Mar 2017 01:10:18 +0100 Subject: removed the suppressConstructorProperties param. --- src/core/lombok/AllArgsConstructor.java | 10 ------ src/core/lombok/RequiredArgsConstructor.java | 10 ------ .../lombok/eclipse/handlers/HandleBuilder.java | 4 +-- .../lombok/eclipse/handlers/HandleConstructor.java | 37 +++++++++------------ src/core/lombok/javac/handlers/HandleBuilder.java | 4 +-- .../lombok/javac/handlers/HandleConstructor.java | 38 +++++++++------------- .../after-delombok/ConstructorsConfiguration.java | 9 ----- .../after-ecj/ConstructorsConfiguration.java | 7 ---- .../resource/before/ConstructorsConfiguration.java | 4 --- 9 files changed, 35 insertions(+), 88 deletions(-) (limited to 'src') diff --git a/src/core/lombok/AllArgsConstructor.java b/src/core/lombok/AllArgsConstructor.java index 45ae897c..75f87211 100644 --- a/src/core/lombok/AllArgsConstructor.java +++ b/src/core/lombok/AllArgsConstructor.java @@ -63,16 +63,6 @@ public @interface AllArgsConstructor { */ AccessLevel access() default lombok.AccessLevel.PUBLIC; - /** - * Constructors are generated with the {@link java.beans.ConstructorProperties} annotation. - * However, this annotation is new in 1.6 which means those compiling for 1.5 will need - * to set this value to true. - * - * @deprecated THIS FEATURE WILL BE REMOVED after March 31st 2015. Use configuration key {@link ConfigurationKeys#ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES} instead. - */ - @Deprecated - boolean suppressConstructorProperties() default false; - /** * Placeholder annotation to enable the placement of annotations on the generated code. * @deprecated Don't use this annotation, ever - Read the documentation. diff --git a/src/core/lombok/RequiredArgsConstructor.java b/src/core/lombok/RequiredArgsConstructor.java index abfdd55c..2f4d0aaf 100644 --- a/src/core/lombok/RequiredArgsConstructor.java +++ b/src/core/lombok/RequiredArgsConstructor.java @@ -63,16 +63,6 @@ public @interface RequiredArgsConstructor { */ AccessLevel access() default lombok.AccessLevel.PUBLIC; - /** - * Constructors are generated with the {@link java.beans.ConstructorProperties} annotation. - * However, this annotation is new in 1.6 which means those compiling for 1.5 will need - * to set this value to true. - * - * @deprecated THIS FEATURE WILL BE REMOVED after March 31st 2015. Use configuration key {@link ConfigurationKeys#ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES} instead. - */ - @Deprecated - boolean suppressConstructorProperties() default false; - /** * Placeholder annotation to enable the placement of annotations on the generated code. * @deprecated Don't use this annotation, ever - Read the documentation. diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java index afa03538..8c200a94 100644 --- a/src/core/lombok/eclipse/handlers/HandleBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java @@ -189,7 +189,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { allFields.add(fieldNode); } - new HandleConstructor().generateConstructor(tdParent, AccessLevel.PACKAGE, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER, null, + new HandleConstructor().generateConstructor(tdParent, AccessLevel.PACKAGE, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER, Collections.emptyList(), annotationNode); returnType = namePlusTypeParamsToTypeReference(td.name, td.typeParameters, p); @@ -395,7 +395,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { if (constructorExists(builderType) == MemberExistsResult.NOT_EXISTS) { ConstructorDeclaration cd = HandleConstructor.createConstructor( - AccessLevel.PACKAGE, builderType, Collections.emptyList(), false, null, + AccessLevel.PACKAGE, builderType, Collections.emptyList(), false, annotationNode, Collections.emptyList()); if (cd != null) injectMethod(builderType, cd); } diff --git a/src/core/lombok/eclipse/handlers/HandleConstructor.java b/src/core/lombok/eclipse/handlers/HandleConstructor.java index 2aed4a4e..49b09231 100644 --- a/src/core/lombok/eclipse/handlers/HandleConstructor.java +++ b/src/core/lombok/eclipse/handlers/HandleConstructor.java @@ -95,7 +95,7 @@ public class HandleConstructor { List fields = force ? findFinalFields(typeNode) : Collections.emptyList(); List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@NoArgsConstructor(onConstructor", annotationNode); - new HandleConstructor().generateConstructor(typeNode, level, fields, force, staticName, SkipIfConstructorExists.NO, null, onConstructor, annotationNode); + new HandleConstructor().generateConstructor(typeNode, level, fields, force, staticName, SkipIfConstructorExists.NO, onConstructor, annotationNode); } } @@ -110,18 +110,15 @@ public class HandleConstructor { AccessLevel level = ann.access(); if (level == AccessLevel.NONE) return; String staticName = ann.staticName(); - Boolean suppressConstructorProperties = null; if (annotation.isExplicit("suppressConstructorProperties")) { - @SuppressWarnings("deprecation") - boolean suppress = ann.suppressConstructorProperties(); - suppressConstructorProperties = suppress; + annotationNode.addError("This deprecated feature is no longer supported. Remove it; you can create a lombok.config file with 'lombok.anyConstructor.suppressConstructorProperties = true'."); } List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@RequiredArgsConstructor(onConstructor", annotationNode); new HandleConstructor().generateConstructor( typeNode, level, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO, - suppressConstructorProperties, onConstructor, annotationNode); + onConstructor, annotationNode); } } @@ -172,18 +169,15 @@ public class HandleConstructor { AccessLevel level = ann.access(); if (level == AccessLevel.NONE) return; String staticName = ann.staticName(); - Boolean suppressConstructorProperties = null; if (annotation.isExplicit("suppressConstructorProperties")) { - @SuppressWarnings("deprecation") - boolean suppress = ann.suppressConstructorProperties(); - suppressConstructorProperties = suppress; + annotationNode.addError("This deprecated feature is no longer supported. Remove it; you can create a lombok.config file with 'lombok.anyConstructor.suppressConstructorProperties = true'."); } List onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@AllArgsConstructor(onConstructor", annotationNode); new HandleConstructor().generateConstructor( typeNode, level, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO, - suppressConstructorProperties, onConstructor, annotationNode); + onConstructor, annotationNode); } } @@ -205,14 +199,14 @@ public class HandleConstructor { EclipseNode typeNode, AccessLevel level, String staticName, SkipIfConstructorExists skipIfConstructorExists, List onConstructor, EclipseNode sourceNode) { - generateConstructor(typeNode, level, findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, null, onConstructor, sourceNode); + generateConstructor(typeNode, level, findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, onConstructor, sourceNode); } public void generateAllArgsConstructor( EclipseNode typeNode, AccessLevel level, String staticName, SkipIfConstructorExists skipIfConstructorExists, List onConstructor, EclipseNode sourceNode) { - generateConstructor(typeNode, level, findAllFields(typeNode), false, staticName, skipIfConstructorExists, null, onConstructor, sourceNode); + generateConstructor(typeNode, level, findAllFields(typeNode), false, staticName, skipIfConstructorExists, onConstructor, sourceNode); } public enum SkipIfConstructorExists { @@ -221,7 +215,7 @@ public class HandleConstructor { public void generateConstructor( EclipseNode typeNode, AccessLevel level, List fields, boolean allToDefault, String staticName, SkipIfConstructorExists skipIfConstructorExists, - Boolean suppressConstructorProperties, List onConstructor, EclipseNode sourceNode) { + List onConstructor, EclipseNode sourceNode) { ASTNode source = sourceNode.get(); boolean staticConstrRequired = staticName != null && !staticName.equals(""); @@ -256,7 +250,7 @@ public class HandleConstructor { ConstructorDeclaration constr = createConstructor( staticConstrRequired ? AccessLevel.PRIVATE : level, typeNode, fields, allToDefault, - suppressConstructorProperties, sourceNode, onConstructor); + sourceNode, onConstructor); injectMethod(typeNode, constr); if (staticConstrRequired) { MethodDeclaration staticConstr = createStaticConstructor(level, staticName, typeNode, allToDefault ? Collections.emptyList() : fields, source); @@ -298,7 +292,7 @@ public class HandleConstructor { public static ConstructorDeclaration createConstructor( AccessLevel level, EclipseNode type, Collection fields, boolean allToDefault, - Boolean suppressConstructorProperties, EclipseNode sourceNode, List onConstructor) { + EclipseNode sourceNode, List onConstructor) { ASTNode source = sourceNode.get(); TypeDeclaration typeDeclaration = ((TypeDeclaration) type.get()); @@ -308,12 +302,11 @@ public class HandleConstructor { if (isEnum) level = AccessLevel.PRIVATE; - if (suppressConstructorProperties == null) { - if (fields.isEmpty()) { - suppressConstructorProperties = false; - } else { - suppressConstructorProperties = Boolean.TRUE.equals(type.getAst().readConfiguration(ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES)); - } + boolean suppressConstructorProperties; + if (fields.isEmpty()) { + suppressConstructorProperties = false; + } else { + suppressConstructorProperties = Boolean.TRUE.equals(type.getAst().readConfiguration(ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES)); } ConstructorDeclaration constructor = new ConstructorDeclaration(((CompilationUnitDeclaration) type.top().get()).compilationResult); diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java index 2704981b..4c670433 100644 --- a/src/core/lombok/javac/handlers/HandleBuilder.java +++ b/src/core/lombok/javac/handlers/HandleBuilder.java @@ -155,7 +155,7 @@ public class HandleBuilder extends JavacAnnotationHandler { allFields.append(fieldNode); } - new HandleConstructor().generateConstructor(tdParent, AccessLevel.PACKAGE, List.nil(), allFields.toList(), false, null, SkipIfConstructorExists.I_AM_BUILDER, null, annotationNode); + new HandleConstructor().generateConstructor(tdParent, AccessLevel.PACKAGE, List.nil(), allFields.toList(), false, null, SkipIfConstructorExists.I_AM_BUILDER, annotationNode); returnType = namePlusTypeParamsToTypeReference(tdParent.getTreeMaker(), td.name, td.typarams); typeParams = td.typarams; @@ -348,7 +348,7 @@ public class HandleBuilder extends JavacAnnotationHandler { } if (constructorExists(builderType) == MemberExistsResult.NOT_EXISTS) { - JCMethodDecl cd = HandleConstructor.createConstructor(AccessLevel.PACKAGE, List.nil(), builderType, List.nil(), false, null, annotationNode); + JCMethodDecl cd = HandleConstructor.createConstructor(AccessLevel.PACKAGE, List.nil(), builderType, List.nil(), false, annotationNode); if (cd != null) injectMethod(builderType, cd); } diff --git a/src/core/lombok/javac/handlers/HandleConstructor.java b/src/core/lombok/javac/handlers/HandleConstructor.java index 617ec0d1..4e90b639 100644 --- a/src/core/lombok/javac/handlers/HandleConstructor.java +++ b/src/core/lombok/javac/handlers/HandleConstructor.java @@ -78,7 +78,7 @@ public class HandleConstructor { String staticName = ann.staticName(); boolean force = ann.force(); List fields = force ? findFinalFields(typeNode) : List.nil(); - new HandleConstructor().generateConstructor(typeNode, level, onConstructor, fields, force, staticName, SkipIfConstructorExists.NO, null, annotationNode); + new HandleConstructor().generateConstructor(typeNode, level, onConstructor, fields, force, staticName, SkipIfConstructorExists.NO, annotationNode); } } @@ -96,14 +96,11 @@ public class HandleConstructor { AccessLevel level = ann.access(); if (level == AccessLevel.NONE) return; String staticName = ann.staticName(); - Boolean suppressConstructorProperties = null; if (annotation.isExplicit("suppressConstructorProperties")) { - @SuppressWarnings("deprecation") - boolean suppress = ann.suppressConstructorProperties(); - suppressConstructorProperties = suppress; + annotationNode.addError("This deprecated feature is no longer supported. Remove it; you can create a lombok.config file with 'lombok.anyConstructor.suppressConstructorProperties = true'."); } - new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO, suppressConstructorProperties, annotationNode); + new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO, annotationNode); } } @@ -146,13 +143,10 @@ public class HandleConstructor { AccessLevel level = ann.access(); if (level == AccessLevel.NONE) return; String staticName = ann.staticName(); - Boolean suppressConstructorProperties = null; if (annotation.isExplicit("suppressConstructorProperties")) { - @SuppressWarnings("deprecation") - boolean suppress = ann.suppressConstructorProperties(); - suppressConstructorProperties = suppress; + annotationNode.addError("This deprecated feature is no longer supported. Remove it; you can create a lombok.config file with 'lombok.anyConstructor.suppressConstructorProperties = true'."); } - new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO, suppressConstructorProperties, annotationNode); + new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO, annotationNode); } } @@ -188,7 +182,7 @@ public class HandleConstructor { } public void generateRequiredArgsConstructor(JavacNode typeNode, AccessLevel level, String staticName, SkipIfConstructorExists skipIfConstructorExists, JavacNode source) { - generateConstructor(typeNode, level, List.nil(), findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, null, source); + generateConstructor(typeNode, level, List.nil(), findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, source); } public enum SkipIfConstructorExists { @@ -196,10 +190,10 @@ public class HandleConstructor { } public void generateAllArgsConstructor(JavacNode typeNode, AccessLevel level, String staticName, SkipIfConstructorExists skipIfConstructorExists, JavacNode source) { - generateConstructor(typeNode, level, List.nil(), findAllFields(typeNode), false, staticName, skipIfConstructorExists, null, source); + generateConstructor(typeNode, level, List.nil(), findAllFields(typeNode), false, staticName, skipIfConstructorExists, source); } - public void generateConstructor(JavacNode typeNode, AccessLevel level, List onConstructor, List fields, boolean allToDefault, String staticName, SkipIfConstructorExists skipIfConstructorExists, Boolean suppressConstructorProperties, JavacNode source) { + public void generateConstructor(JavacNode typeNode, AccessLevel level, List onConstructor, List fields, boolean allToDefault, String staticName, SkipIfConstructorExists skipIfConstructorExists, JavacNode source) { boolean staticConstrRequired = staticName != null && !staticName.equals(""); if (skipIfConstructorExists != SkipIfConstructorExists.NO && constructorExists(typeNode) != MemberExistsResult.NOT_EXISTS) return; @@ -228,7 +222,7 @@ public class HandleConstructor { } } - JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, onConstructor, typeNode, fields, allToDefault, suppressConstructorProperties, source); + JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, onConstructor, typeNode, fields, allToDefault, source); ListBuffer argTypes = new ListBuffer(); for (JavacNode fieldNode : fields) { Type mirror = getMirrorForFieldType(fieldNode); @@ -262,18 +256,18 @@ public class HandleConstructor { mods.annotations = mods.annotations.append(annotation); } - public static JCMethodDecl createConstructor(AccessLevel level, List onConstructor, JavacNode typeNode, List fields, boolean allToDefault, Boolean suppressConstructorProperties, JavacNode source) { + public static JCMethodDecl createConstructor(AccessLevel level, List onConstructor, JavacNode typeNode, List fields, boolean allToDefault, JavacNode source) { JavacTreeMaker maker = typeNode.getTreeMaker(); boolean isEnum = (((JCClassDecl) typeNode.get()).mods.flags & Flags.ENUM) != 0; if (isEnum) level = AccessLevel.PRIVATE; - if (suppressConstructorProperties == null) { - if (fields.isEmpty()) { - suppressConstructorProperties = false; - } else { - suppressConstructorProperties = Boolean.TRUE.equals(typeNode.getAst().readConfiguration(ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES)); - } + boolean suppressConstructorProperties; + + if (fields.isEmpty()) { + suppressConstructorProperties = false; + } else { + suppressConstructorProperties = Boolean.TRUE.equals(typeNode.getAst().readConfiguration(ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES)); } ListBuffer nullChecks = new ListBuffer(); diff --git a/test/transform/resource/after-delombok/ConstructorsConfiguration.java b/test/transform/resource/after-delombok/ConstructorsConfiguration.java index effc51b8..40189911 100644 --- a/test/transform/resource/after-delombok/ConstructorsConfiguration.java +++ b/test/transform/resource/after-delombok/ConstructorsConfiguration.java @@ -6,12 +6,3 @@ class ConstructorsConfiguration { this.x = x; } } -class ConstructorsConfigurationExplicit { - int x; - @java.beans.ConstructorProperties({"x"}) - @java.lang.SuppressWarnings("all") - @javax.annotation.Generated("lombok") - public ConstructorsConfigurationExplicit(final int x) { - this.x = x; - } -} diff --git a/test/transform/resource/after-ecj/ConstructorsConfiguration.java b/test/transform/resource/after-ecj/ConstructorsConfiguration.java index 33a95181..3ca13844 100644 --- a/test/transform/resource/after-ecj/ConstructorsConfiguration.java +++ b/test/transform/resource/after-ecj/ConstructorsConfiguration.java @@ -5,10 +5,3 @@ this.x = x; } } -@lombok.AllArgsConstructor(suppressConstructorProperties = false) class ConstructorsConfigurationExplicit { - int x; - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorsConfigurationExplicit(final int x) { - super(); - this.x = x; - } -} diff --git a/test/transform/resource/before/ConstructorsConfiguration.java b/test/transform/resource/before/ConstructorsConfiguration.java index 8fae10fc..4d0e8bd9 100644 --- a/test/transform/resource/before/ConstructorsConfiguration.java +++ b/test/transform/resource/before/ConstructorsConfiguration.java @@ -3,7 +3,3 @@ class ConstructorsConfiguration { int x; } -@lombok.AllArgsConstructor(suppressConstructorProperties=false) -class ConstructorsConfigurationExplicit { - int x; -} -- cgit