From 9a50da2d092f86eef6e00e0f518039ad3ef53ec8 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 14 Feb 2012 17:11:15 +0100 Subject: ecj tests and eclipse tests are now effectively doing the same thing, except the ecj tests are written in a slightly more close-to-reality way, and do work for 'val'. eclipse test aspect removed. --- test/core/src/lombok/DirectoryRunner.java | 4 +- test/core/src/lombok/RunTestsViaEclipse.java | 316 --------------------- .../after-eclipse/ClassNamedAfterGetter.java | 9 - .../resource/after-eclipse/CleanupName.java | 33 --- .../resource/after-eclipse/CleanupPlain.java | 35 --- .../after-eclipse/CommentsInterspersed.java | 12 - .../resource/after-eclipse/Constructors.java | 43 --- .../resource/after-eclipse/DataExtended.java | 36 --- .../resource/after-eclipse/DataIgnore.java | 35 --- .../resource/after-eclipse/DataOnEnum.java | 16 -- .../resource/after-eclipse/DataOnLocalClass.java | 134 --------- .../resource/after-eclipse/DataPlain.java | 208 -------------- .../resource/after-eclipse/DataWithGetter.java | 54 ---- .../resource/after-eclipse/DataWithGetterNone.java | 45 --- .../resource/after-eclipse/DelegateOnGetter.java | 40 --- .../after-eclipse/DelegateOnGetterNone.java | 19 -- .../resource/after-eclipse/DelegateOnMethods.java | 13 - .../after-eclipse/DelegateTypesAndExcludes.java | 36 --- .../resource/after-eclipse/EqualsAndHashCode.java | 109 ------- .../EqualsAndHashCodeWithExistingMethods.java | 27 -- .../resource/after-eclipse/GetterAccessLevel.java | 43 --- .../after-eclipse/GetterAlreadyExists.java | 192 ------------- .../resource/after-eclipse/GetterBoolean.java | 38 --- .../resource/after-eclipse/GetterLazy.java | 27 -- .../after-eclipse/GetterLazyEahcToString.java | 53 ---- .../resource/after-eclipse/GetterLazyInvalid.java | 40 --- .../resource/after-eclipse/GetterLazyNative.java | 158 ----------- .../resource/after-eclipse/GetterNone.java | 12 - .../resource/after-eclipse/GetterOnClass.java | 68 ----- .../resource/after-eclipse/GetterOnStatic.java | 15 - .../resource/after-eclipse/GetterPlain.java | 14 - .../resource/after-eclipse/GetterWithDollar.java | 22 -- .../resource/after-eclipse/InjectField.java | 63 ---- .../resource/after-eclipse/LoggerCommons.java | 17 -- .../resource/after-eclipse/LoggerJul.java | 17 -- .../resource/after-eclipse/LoggerLog4j.java | 17 -- .../resource/after-eclipse/LoggerSlf4j.java | 30 -- .../after-eclipse/LoggerSlf4jAlreadyExists.java | 6 - .../after-eclipse/LoggerSlf4jOnNonType.java | 7 - .../resource/after-eclipse/LoggerSlf4jTypes.java | 31 -- .../after-eclipse/LoggerSlf4jWithPackage.java | 22 -- .../resource/after-eclipse/MultiFieldGetter.java | 28 -- .../resource/after-eclipse/NonNullPlain.java | 35 --- .../resource/after-eclipse/SetterAccessLevel.java | 26 -- .../after-eclipse/SetterAlreadyExists.java | 72 ----- .../resource/after-eclipse/SetterOnClass.java | 69 ----- .../resource/after-eclipse/SetterOnStatic.java | 15 - .../resource/after-eclipse/SetterPlain.java | 14 - .../resource/after-eclipse/SetterWithDollar.java | 22 -- .../after-eclipse/SimpleTypeResolution.java | 15 - .../after-eclipse/SneakyThrowsMultiple.java | 63 ---- .../resource/after-eclipse/SneakyThrowsPlain.java | 24 -- .../resource/after-eclipse/SneakyThrowsSingle.java | 35 --- .../resource/after-eclipse/SynchronizedName.java | 36 --- .../resource/after-eclipse/SynchronizedPlain.java | 39 --- .../resource/after-eclipse/ToStringInner.java | 43 --- .../resource/after-eclipse/ToStringPlain.java | 21 -- .../after-eclipse/TrickyTypeResolution.java | 1 - .../after-eclipse/TrickyTypeResolution2.java | 1 - .../resource/after-eclipse/ValComplex.java | 1 - .../resource/after-eclipse/ValErrors.java | 1 - .../transform/resource/after-eclipse/ValInFor.java | 1 - .../resource/after-eclipse/ValLessSimple.java | 1 - .../after-eclipse/ValOutersWithGenerics.java | 25 -- .../resource/after-eclipse/ValSimple.java | 1 - .../resource/after-eclipse/ValWeirdTypes.java | 1 - .../resource/after-eclipse/ValWithLabel.java | 1 - ...alsAndHashCodeWithExistingMethods.java.messages | 3 - .../GetterAlreadyExists.java.messages | 8 - .../messages-eclipse/GetterBoolean.java.messages | 1 - .../GetterLazyInvalid.java.messages | 6 - .../messages-eclipse/GetterOnMethod.java.messages | 2 - .../LoggerSlf4jAlreadyExists.java.messages | 1 - .../LoggerSlf4jOnNonStaticInnerClass.java.messages | 1 - .../LoggerSlf4jOnNonType.java.messages | 2 - .../LoggerSlf4jTypes.java.messages | 2 - .../SetterAlreadyExists.java.messages | 9 - .../messages-eclipse/SetterOnMethod.java.messages | 2 - .../messages-eclipse/SetterOnParam.java.messages | 2 - .../SimpleTypeResolution.java.messages | 1 - .../SynchronizedName.java.messages | 1 - .../src/lombok/transform/RunTransformTests.java | 4 +- .../src/lombok/transform/TestWithEcj.java | 6 +- .../src/lombok/transform/TestWithEclipse.java | 59 ---- 84 files changed, 8 insertions(+), 2809 deletions(-) delete mode 100644 test/core/src/lombok/RunTestsViaEclipse.java delete mode 100644 test/transform/resource/after-eclipse/ClassNamedAfterGetter.java delete mode 100644 test/transform/resource/after-eclipse/CleanupName.java delete mode 100644 test/transform/resource/after-eclipse/CleanupPlain.java delete mode 100644 test/transform/resource/after-eclipse/CommentsInterspersed.java delete mode 100644 test/transform/resource/after-eclipse/Constructors.java delete mode 100644 test/transform/resource/after-eclipse/DataExtended.java delete mode 100644 test/transform/resource/after-eclipse/DataIgnore.java delete mode 100644 test/transform/resource/after-eclipse/DataOnEnum.java delete mode 100644 test/transform/resource/after-eclipse/DataOnLocalClass.java delete mode 100644 test/transform/resource/after-eclipse/DataPlain.java delete mode 100644 test/transform/resource/after-eclipse/DataWithGetter.java delete mode 100644 test/transform/resource/after-eclipse/DataWithGetterNone.java delete mode 100644 test/transform/resource/after-eclipse/DelegateOnGetter.java delete mode 100644 test/transform/resource/after-eclipse/DelegateOnGetterNone.java delete mode 100644 test/transform/resource/after-eclipse/DelegateOnMethods.java delete mode 100644 test/transform/resource/after-eclipse/DelegateTypesAndExcludes.java delete mode 100644 test/transform/resource/after-eclipse/EqualsAndHashCode.java delete mode 100644 test/transform/resource/after-eclipse/EqualsAndHashCodeWithExistingMethods.java delete mode 100644 test/transform/resource/after-eclipse/GetterAccessLevel.java delete mode 100644 test/transform/resource/after-eclipse/GetterAlreadyExists.java delete mode 100644 test/transform/resource/after-eclipse/GetterBoolean.java delete mode 100644 test/transform/resource/after-eclipse/GetterLazy.java delete mode 100644 test/transform/resource/after-eclipse/GetterLazyEahcToString.java delete mode 100644 test/transform/resource/after-eclipse/GetterLazyInvalid.java delete mode 100644 test/transform/resource/after-eclipse/GetterLazyNative.java delete mode 100644 test/transform/resource/after-eclipse/GetterNone.java delete mode 100644 test/transform/resource/after-eclipse/GetterOnClass.java delete mode 100644 test/transform/resource/after-eclipse/GetterOnStatic.java delete mode 100644 test/transform/resource/after-eclipse/GetterPlain.java delete mode 100644 test/transform/resource/after-eclipse/GetterWithDollar.java delete mode 100644 test/transform/resource/after-eclipse/InjectField.java delete mode 100644 test/transform/resource/after-eclipse/LoggerCommons.java delete mode 100644 test/transform/resource/after-eclipse/LoggerJul.java delete mode 100644 test/transform/resource/after-eclipse/LoggerLog4j.java delete mode 100644 test/transform/resource/after-eclipse/LoggerSlf4j.java delete mode 100644 test/transform/resource/after-eclipse/LoggerSlf4jAlreadyExists.java delete mode 100644 test/transform/resource/after-eclipse/LoggerSlf4jOnNonType.java delete mode 100644 test/transform/resource/after-eclipse/LoggerSlf4jTypes.java delete mode 100644 test/transform/resource/after-eclipse/LoggerSlf4jWithPackage.java delete mode 100644 test/transform/resource/after-eclipse/MultiFieldGetter.java delete mode 100644 test/transform/resource/after-eclipse/NonNullPlain.java delete mode 100644 test/transform/resource/after-eclipse/SetterAccessLevel.java delete mode 100644 test/transform/resource/after-eclipse/SetterAlreadyExists.java delete mode 100644 test/transform/resource/after-eclipse/SetterOnClass.java delete mode 100644 test/transform/resource/after-eclipse/SetterOnStatic.java delete mode 100644 test/transform/resource/after-eclipse/SetterPlain.java delete mode 100644 test/transform/resource/after-eclipse/SetterWithDollar.java delete mode 100644 test/transform/resource/after-eclipse/SimpleTypeResolution.java delete mode 100644 test/transform/resource/after-eclipse/SneakyThrowsMultiple.java delete mode 100644 test/transform/resource/after-eclipse/SneakyThrowsPlain.java delete mode 100644 test/transform/resource/after-eclipse/SneakyThrowsSingle.java delete mode 100644 test/transform/resource/after-eclipse/SynchronizedName.java delete mode 100644 test/transform/resource/after-eclipse/SynchronizedPlain.java delete mode 100644 test/transform/resource/after-eclipse/ToStringInner.java delete mode 100644 test/transform/resource/after-eclipse/ToStringPlain.java delete mode 100644 test/transform/resource/after-eclipse/TrickyTypeResolution.java delete mode 100644 test/transform/resource/after-eclipse/TrickyTypeResolution2.java delete mode 100644 test/transform/resource/after-eclipse/ValComplex.java delete mode 100644 test/transform/resource/after-eclipse/ValErrors.java delete mode 100644 test/transform/resource/after-eclipse/ValInFor.java delete mode 100644 test/transform/resource/after-eclipse/ValLessSimple.java delete mode 100644 test/transform/resource/after-eclipse/ValOutersWithGenerics.java delete mode 100644 test/transform/resource/after-eclipse/ValSimple.java delete mode 100644 test/transform/resource/after-eclipse/ValWeirdTypes.java delete mode 100644 test/transform/resource/after-eclipse/ValWithLabel.java delete mode 100644 test/transform/resource/messages-eclipse/EqualsAndHashCodeWithExistingMethods.java.messages delete mode 100644 test/transform/resource/messages-eclipse/GetterAlreadyExists.java.messages delete mode 100644 test/transform/resource/messages-eclipse/GetterBoolean.java.messages delete mode 100644 test/transform/resource/messages-eclipse/GetterLazyInvalid.java.messages delete mode 100644 test/transform/resource/messages-eclipse/GetterOnMethod.java.messages delete mode 100644 test/transform/resource/messages-eclipse/LoggerSlf4jAlreadyExists.java.messages delete mode 100644 test/transform/resource/messages-eclipse/LoggerSlf4jOnNonStaticInnerClass.java.messages delete mode 100644 test/transform/resource/messages-eclipse/LoggerSlf4jOnNonType.java.messages delete mode 100644 test/transform/resource/messages-eclipse/LoggerSlf4jTypes.java.messages delete mode 100644 test/transform/resource/messages-eclipse/SetterAlreadyExists.java.messages delete mode 100644 test/transform/resource/messages-eclipse/SetterOnMethod.java.messages delete mode 100644 test/transform/resource/messages-eclipse/SetterOnParam.java.messages delete mode 100644 test/transform/resource/messages-eclipse/SimpleTypeResolution.java.messages delete mode 100644 test/transform/resource/messages-eclipse/SynchronizedName.java.messages delete mode 100644 test/transform/src/lombok/transform/TestWithEclipse.java diff --git a/test/core/src/lombok/DirectoryRunner.java b/test/core/src/lombok/DirectoryRunner.java index c7dd1cb4..93458310 100644 --- a/test/core/src/lombok/DirectoryRunner.java +++ b/test/core/src/lombok/DirectoryRunner.java @@ -37,7 +37,7 @@ import org.junit.runner.notification.RunNotifier; public class DirectoryRunner extends Runner { public enum Compiler { - DELOMBOK, JAVAC, ECJ, ECLIPSE; + DELOMBOK, JAVAC, ECJ; } public interface TestParams { @@ -119,8 +119,6 @@ public class DirectoryRunner extends Runner { switch (params.getCompiler()) { case DELOMBOK: return new RunTestsViaDelombok().compareFile(params, file); - case ECLIPSE: - return new RunTestsViaEclipse().compareFile(params, file); case ECJ: return new RunTestsViaEcj().compareFile(params, file); default: diff --git a/test/core/src/lombok/RunTestsViaEclipse.java b/test/core/src/lombok/RunTestsViaEclipse.java deleted file mode 100644 index 10fcdc98..00000000 --- a/test/core/src/lombok/RunTestsViaEclipse.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright (C) 2011 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; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.StringWriter; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; - -import org.eclipse.jdt.core.compiler.CategorizedProblem; -import org.eclipse.jdt.internal.compiler.Compiler; -import org.eclipse.jdt.internal.compiler.CompilationResult; -import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies; -import org.eclipse.jdt.internal.compiler.ICompilerRequestor; -import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy; -import org.eclipse.jdt.internal.compiler.IProblemFactory; -import org.eclipse.jdt.internal.compiler.ISourceElementRequestor; -import org.eclipse.jdt.internal.compiler.SourceElementParser; -import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; -import org.eclipse.jdt.internal.compiler.ast.Expression; -import org.eclipse.jdt.internal.compiler.ast.ImportReference; -import org.eclipse.jdt.internal.compiler.batch.CompilationUnit; -import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; -import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader; -import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException; -import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; -import org.eclipse.jdt.internal.compiler.env.INameEnvironment; -import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer; -import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; -import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory; - -/** - * Simulates more or less what happens in eclipse - */ -public class RunTestsViaEclipse extends AbstractRunTests { - protected static CompilerOptions ecjCompilerOptions() { - CompilerOptions options = new CompilerOptions(); - options.complianceLevel = ClassFileConstants.JDK1_6; - options.sourceLevel = ClassFileConstants.JDK1_6; - options.targetJDK = ClassFileConstants.JDK1_6; - options.parseLiteralExpressionsAsConstants = true; - return options; - } - - @Override public void transformCode(final StringBuilder messages, StringWriter result, File file) throws Throwable { - // setup parser and compiler - final IErrorHandlingPolicy policy = DefaultErrorHandlingPolicies.proceedWithAllProblems(); - final IProblemFactory problemFactory = new DefaultProblemFactory(Locale.ENGLISH); - final INameEnvironment nameEnvironment = new LombokTestNameEnvironment(); - final ICompilerRequestor compilerRequestor = new LombokTestCompilerRequestor(); - final ISourceElementRequestor sourceElementRequestor = new LombokTestSourceElementRequestor(); - final CompilerOptions options = ecjCompilerOptions(); - final LombokTestCompiler jdtCompiler = new LombokTestCompiler(nameEnvironment, policy, options, compilerRequestor, problemFactory); - final SourceElementParser parser = new SourceElementParser(sourceElementRequestor, problemFactory, options, true, true); - - // read the file - final String source = readFile(file); - final CompilationUnit sourceUnit = new CompilationUnit(source.toCharArray(), file.getName(), "UTF-8"); - - - // parse - final CompilationUnitDeclaration cud = parser.parseCompilationUnit(sourceUnit, true, null); - // build - jdtCompiler.lookupEnvironment.buildTypeBindings(cud, null); - jdtCompiler.lookupEnvironment.completeTypeBindings(cud, true); - // process - if (cud.scope != null) cud.scope.verifyMethods(jdtCompiler.lookupEnvironment.methodVerifier()); - - // handle problems - final CategorizedProblem[] problems = cud.compilationResult.getAllProblems(); - - if (problems != null) for (CategorizedProblem p : problems) { - messages.append(String.format("%d %s %s\n", p.getSourceLineNumber(), p.isError() ? "error" : p.isWarning() ? "warning" : "unknown", p.getMessage())); - } - - // set transformed code - result.append(cud.toString()); - } - - private static class LombokTestCompiler extends Compiler { - public LombokTestCompiler(INameEnvironment nameEnvironment, IErrorHandlingPolicy policy, CompilerOptions ecjCompilerOptions, ICompilerRequestor requestor, IProblemFactory problemFactory) { - super(nameEnvironment, policy, ecjCompilerOptions, requestor, problemFactory); - } - - @Override protected void handleInternalException(Throwable e, CompilationUnitDeclaration ud, CompilationResult result) { - throw new RuntimeException(e); - } - - @Override public void beginToCompile(ICompilationUnit[] sourceUnits) { - super.beginToCompile(sourceUnits); - } - }; - - private static class LombokTestCompilerRequestor implements ICompilerRequestor { - public void acceptResult(CompilationResult result) { - } - } - - private static class LombokTestSourceElementRequestor implements ISourceElementRequestor { - - @Override public void acceptAnnotationTypeReference(char[][] annotation, int sourceStart, int sourceEnd) { - // do nothing - } - - @Override public void acceptAnnotationTypeReference(char[] annotation, int sourcePosition) { - // do nothing - } - - @Override public void acceptConstructorReference(char[] typeName, int argCount, int sourcePosition) { - // do nothing - } - - @Override public void acceptFieldReference(char[] fieldName, int sourcePosition) { - // do nothing - } - - @Override public void acceptImport(int declarationStart, int declarationEnd, char[][] tokens, boolean onDemand, int modifiers) { - // do nothing - } - - @Override public void acceptLineSeparatorPositions(int[] positions) { - // do nothing - } - - @Override public void acceptMethodReference(char[] methodName, int argCount, int sourcePosition) { - // do nothing - } - - @Override public void acceptPackage(ImportReference importReference) { - // do nothing - } - - @Override public void acceptProblem(CategorizedProblem problem) { - // do nothing - } - - @Override public void acceptTypeReference(char[][] typeName, int sourceStart, int sourceEnd) { - // do nothing - } - - @Override public void acceptTypeReference(char[] typeName, int sourcePosition) { - // do nothing - } - - @Override public void acceptUnknownReference(char[][] name, int sourceStart, int sourceEnd) { - // do nothing - } - - @Override public void acceptUnknownReference(char[] name, int sourcePosition) { - // do nothing - } - - @Override public void enterCompilationUnit() { - // do nothing - } - - @Override public void enterConstructor(MethodInfo methodInfo) { - // do nothing - } - - @Override public void enterField(FieldInfo fieldInfo) { - // do nothing - } - - @Override public void enterInitializer(int declarationStart, int modifiers) { - // do nothing - } - - @Override public void enterMethod(MethodInfo methodInfo) { - // do nothing - } - - @Override public void enterType(TypeInfo typeInfo) { - // do nothing - } - - @Override public void exitCompilationUnit(int declarationEnd) { - // do nothing - } - - @Override public void exitConstructor(int declarationEnd) { - // do nothing - } - - @Override public void exitField(int initializationStart, int declarationEnd, int declarationSourceEnd) { - // do nothing - } - - @Override public void exitInitializer(int declarationEnd) { - // do nothing - } - - @Override public void exitMethod(int declarationEnd, Expression defaultValue) { - // do nothing - } - - @Override public void exitType(int declarationEnd) { - // do nothing - } - } - - private static class LombokTestNameEnvironment implements INameEnvironment { - Map packagesCache = new HashMap(); - - public LombokTestNameEnvironment() { - packagesCache.put("before", true); - } - - public NameEnvironmentAnswer findType(final char[][] compoundTypeName) { - final StringBuffer result = new StringBuffer(); - for (int i = 0; i < compoundTypeName.length; i++) { - if (i != 0) { - result.append('.'); - } - result.append(compoundTypeName[i]); - } - return findType(result.toString()); - } - - public NameEnvironmentAnswer findType(final char[] typeName, final char[][] packageName) { - final StringBuffer result = new StringBuffer(); - for (int i = 0; i < packageName.length; i++) { - result.append(packageName[i]); - result.append('.'); - } - result.append(typeName); - return findType(result.toString()); - } - - protected byte[] getClassDefinition(String name) { - name = name.replace(".", "/") + ".class"; - InputStream is = this.getClass().getClassLoader().getResourceAsStream(name); - if (is == null) { - return null; - } - try { - ByteArrayOutputStream os = new ByteArrayOutputStream(); - byte[] buffer = new byte[8192]; - int count; - while ((count = is.read(buffer, 0, buffer.length)) > 0) { - os.write(buffer, 0, count); - } - return os.toByteArray(); - } catch (Exception e) { - throw new RuntimeException(e); - } finally { - try { - is.close(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - } - - private NameEnvironmentAnswer findType(final String name) { - try { - byte[] bytes = getClassDefinition(name); - if (bytes != null) { - ClassFileReader classFileReader; - classFileReader = new ClassFileReader(bytes, name.toCharArray(), true); - return new NameEnvironmentAnswer(classFileReader, null); - } - return null; - } catch (ClassFormatException e) { - throw new RuntimeException(e); - } - } - - public boolean isPackage(char[][] parentPackageName, char[] packageName) { - final StringBuilder sb = new StringBuilder(); - if (parentPackageName != null) { - for (char[] p : parentPackageName) { - sb.append(p).append("/"); - } - } - sb.append(packageName); - String name = sb.toString(); - if (packagesCache.containsKey(name)) { - return packagesCache.get(name).booleanValue(); - } - - if (name.startsWith("before") || (getClassDefinition(name) != null)) { - packagesCache.put(name, false); - return false; - } - packagesCache.put(name, true); - return true; - } - - public void cleanup() { - } - } -} diff --git a/test/transform/resource/after-eclipse/ClassNamedAfterGetter.java b/test/transform/resource/after-eclipse/ClassNamedAfterGetter.java deleted file mode 100644 index fb9df0ea..00000000 --- a/test/transform/resource/after-eclipse/ClassNamedAfterGetter.java +++ /dev/null @@ -1,9 +0,0 @@ -class GetFoo { - private @lombok.Getter int foo; - public @java.lang.SuppressWarnings("all") int getFoo() { - return this.foo; - } - GetFoo() { - super(); - } -} diff --git a/test/transform/resource/after-eclipse/CleanupName.java b/test/transform/resource/after-eclipse/CleanupName.java deleted file mode 100644 index f3f725f2..00000000 --- a/test/transform/resource/after-eclipse/CleanupName.java +++ /dev/null @@ -1,33 +0,0 @@ -class CleanupName { - CleanupName() { - super(); - } - void test() { - @lombok.Cleanup("toString") Object o = "Hello World!"; - try - { - System.out.println(o); - } - finally - { - if ((java.util.Collections.singletonList(o).get(0) != null)) - { - o.toString(); - } - } - } - void test2() { - @lombok.Cleanup(value = "toString") Object o = "Hello World too!"; - try - { - System.out.println(o); - } - finally - { - if ((java.util.Collections.singletonList(o).get(0) != null)) - { - o.toString(); - } - } - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/CleanupPlain.java b/test/transform/resource/after-eclipse/CleanupPlain.java deleted file mode 100644 index a9b9eceb..00000000 --- a/test/transform/resource/after-eclipse/CleanupPlain.java +++ /dev/null @@ -1,35 +0,0 @@ -import lombok.Cleanup; -import java.io.*; -class CleanupPlain { - CleanupPlain() { - super(); - } - void test() throws Exception { - @lombok.Cleanup InputStream in = new FileInputStream("in"); - try - { - @Cleanup OutputStream out = new FileOutputStream("out"); - try - { - if (in.markSupported()) - { - out.flush(); - } - } - finally - { - if ((java.util.Collections.singletonList(out).get(0) != null)) - { - out.close(); - } - } - } - finally - { - if ((java.util.Collections.singletonList(in).get(0) != null)) - { - in.close(); - } - } - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/CommentsInterspersed.java b/test/transform/resource/after-eclipse/CommentsInterspersed.java deleted file mode 100644 index 60c69aed..00000000 --- a/test/transform/resource/after-eclipse/CommentsInterspersed.java +++ /dev/null @@ -1,12 +0,0 @@ -import lombok.Getter; -public class CommentsInterspersed { - private int x; - private @Getter String test = "foo"; - public @java.lang.SuppressWarnings("all") String getTest() { - return this.test; - } - public CommentsInterspersed() { - super(); - } - public native void gwtTest(); -} diff --git a/test/transform/resource/after-eclipse/Constructors.java b/test/transform/resource/after-eclipse/Constructors.java deleted file mode 100644 index e47ec8b5..00000000 --- a/test/transform/resource/after-eclipse/Constructors.java +++ /dev/null @@ -1,43 +0,0 @@ -@lombok.RequiredArgsConstructor class RequiredArgsConstructor1 { - final int x; - String name; - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") RequiredArgsConstructor1(final int x) { - super(); - this.x = x; - } -} -@lombok.RequiredArgsConstructor(access = lombok.AccessLevel.PROTECTED) class RequiredArgsConstructorAccess { - final int x; - String name; - protected @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") RequiredArgsConstructorAccess(final int x) { - super(); - this.x = x; - } -} -@lombok.RequiredArgsConstructor(staticName = "staticname") class RequiredArgsConstructorStaticName { - final int x; - String name; - private @java.lang.SuppressWarnings("all") RequiredArgsConstructorStaticName(final int x) { - super(); - this.x = x; - } - public static @java.lang.SuppressWarnings("all") RequiredArgsConstructorStaticName staticname(final int x) { - return new RequiredArgsConstructorStaticName(x); - } -} -@lombok.AllArgsConstructor class AllArgsConstructor1 { - final int x; - String name; - public @java.beans.ConstructorProperties({"x", "name"}) @java.lang.SuppressWarnings("all") AllArgsConstructor1(final int x, final String name) { - super(); - this.x = x; - this.name = name; - } -} -@lombok.NoArgsConstructor class NoArgsConstructor1 { - final int x; - String name; - public @java.lang.SuppressWarnings("all") NoArgsConstructor1() { - super(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/DataExtended.java b/test/transform/resource/after-eclipse/DataExtended.java deleted file mode 100644 index dfc64f2d..00000000 --- a/test/transform/resource/after-eclipse/DataExtended.java +++ /dev/null @@ -1,36 +0,0 @@ -@lombok.Data @lombok.ToString(doNotUseGetters = true) class DataExtended { - int x; - public @java.lang.SuppressWarnings("all") DataExtended() { - super(); - } - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } - public @java.lang.SuppressWarnings("all") void setX(final int x) { - this.x = x; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof DataExtended))) - return false; - final @java.lang.SuppressWarnings("all") DataExtended other = (DataExtended) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((this.getX() != other.getX())) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof DataExtended); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.getX()); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (("DataExtended(x=" + this.x) + ")"); - } -} diff --git a/test/transform/resource/after-eclipse/DataIgnore.java b/test/transform/resource/after-eclipse/DataIgnore.java deleted file mode 100644 index 109bf1d6..00000000 --- a/test/transform/resource/after-eclipse/DataIgnore.java +++ /dev/null @@ -1,35 +0,0 @@ -@lombok.Data class DataIgnore { - final int x; - String $name; - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") DataIgnore(final int x) { - super(); - this.x = x; - } - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof DataIgnore))) - return false; - final @java.lang.SuppressWarnings("all") DataIgnore other = (DataIgnore) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((this.getX() != other.getX())) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof DataIgnore); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.getX()); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (("DataIgnore(x=" + this.getX()) + ")"); - } -} diff --git a/test/transform/resource/after-eclipse/DataOnEnum.java b/test/transform/resource/after-eclipse/DataOnEnum.java deleted file mode 100644 index 8bab5925..00000000 --- a/test/transform/resource/after-eclipse/DataOnEnum.java +++ /dev/null @@ -1,16 +0,0 @@ -public @lombok.Getter @lombok.ToString @lombok.RequiredArgsConstructor enum DataOnEnum { - A("hello"), - private final String someField; - () { - } - private @java.lang.SuppressWarnings("all") DataOnEnum(final String someField) { - super(); - this.someField = someField; - } - public @java.lang.SuppressWarnings("all") String getSomeField() { - return this.someField; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (("DataOnEnum(someField=" + this.getSomeField()) + ")"); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/DataOnLocalClass.java b/test/transform/resource/after-eclipse/DataOnLocalClass.java deleted file mode 100644 index 44ae0ddc..00000000 --- a/test/transform/resource/after-eclipse/DataOnLocalClass.java +++ /dev/null @@ -1,134 +0,0 @@ -import lombok.Data; -class DataOnLocalClass1 { - DataOnLocalClass1() { - super(); - } - public static void main(String[] args) { - @Data class Local { - final int x; - String name; - public @java.lang.SuppressWarnings("all") Local(final int x) { - super(); - this.x = x; - } - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } - public @java.lang.SuppressWarnings("all") String getName() { - return this.name; - } - public @java.lang.SuppressWarnings("all") void setName(final String name) { - this.name = name; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof Local))) - return false; - final @java.lang.SuppressWarnings("all") Local other = (Local) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((this.getX() != other.getX())) - return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof Local); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.getX()); - result = ((result * PRIME) + ((this.getName() == null) ? 0 : this.getName().hashCode())); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((("Local(x=" + this.getX()) + ", name=") + this.getName()) + ")"); - } - } - } -} -class DataOnLocalClass2 { - { - @Data class Local { - @Data class InnerLocal { - @lombok.NonNull String name; - public @java.lang.SuppressWarnings("all") InnerLocal(final @lombok.NonNull String name) { - super(); - if ((name == null)) - throw new java.lang.NullPointerException("name"); - this.name = name; - } - public @lombok.NonNull @java.lang.SuppressWarnings("all") String getName() { - return this.name; - } - public @java.lang.SuppressWarnings("all") 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") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof Local.InnerLocal))) - return false; - final @java.lang.SuppressWarnings("all") InnerLocal other = (InnerLocal) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof Local.InnerLocal); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + ((this.getName() == null) ? 0 : this.getName().hashCode())); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (("Local.InnerLocal(name=" + this.getName()) + ")"); - } - } - final int x; - public @java.lang.SuppressWarnings("all") Local(final int x) { - super(); - this.x = x; - } - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof Local))) - return false; - final @java.lang.SuppressWarnings("all") Local other = (Local) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((this.getX() != other.getX())) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof Local); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.getX()); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (("Local(x=" + this.getX()) + ")"); - } - } - } - DataOnLocalClass2() { - super(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/DataPlain.java b/test/transform/resource/after-eclipse/DataPlain.java deleted file mode 100644 index 0c4a6ab0..00000000 --- a/test/transform/resource/after-eclipse/DataPlain.java +++ /dev/null @@ -1,208 +0,0 @@ -import lombok.Data; -@lombok.Data class Data1 { - final int x; - String name; - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") Data1(final int x) { - super(); - this.x = x; - } - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } - public @java.lang.SuppressWarnings("all") String getName() { - return this.name; - } - public @java.lang.SuppressWarnings("all") void setName(final String name) { - this.name = name; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof Data1))) - return false; - final @java.lang.SuppressWarnings("all") Data1 other = (Data1) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((this.getX() != other.getX())) - return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof Data1); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.getX()); - result = ((result * PRIME) + ((this.getName() == null) ? 0 : this.getName().hashCode())); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((("Data1(x=" + this.getX()) + ", name=") + this.getName()) + ")"); - } -} -@Data class Data2 { - final int x; - String name; - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") Data2(final int x) { - super(); - this.x = x; - } - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } - public @java.lang.SuppressWarnings("all") String getName() { - return this.name; - } - public @java.lang.SuppressWarnings("all") void setName(final String name) { - this.name = name; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof Data2))) - return false; - final @java.lang.SuppressWarnings("all") Data2 other = (Data2) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((this.getX() != other.getX())) - return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof Data2); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.getX()); - result = ((result * PRIME) + ((this.getName() == null) ? 0 : this.getName().hashCode())); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((("Data2(x=" + this.getX()) + ", name=") + this.getName()) + ")"); - } -} -final @Data class Data3 { - final int x; - String name; - public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") Data3(final int x) { - super(); - this.x = x; - } - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } - public @java.lang.SuppressWarnings("all") String getName() { - return this.name; - } - public @java.lang.SuppressWarnings("all") void setName(final String name) { - this.name = name; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof Data3))) - return false; - final @java.lang.SuppressWarnings("all") Data3 other = (Data3) o; - if ((this.getX() != other.getX())) - return false; - if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals((java.lang.Object) other.getName())))) - return false; - return true; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.getX()); - result = ((result * PRIME) + ((this.getName() == null) ? 0 : this.getName().hashCode())); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((("Data3(x=" + this.getX()) + ", name=") + this.getName()) + ")"); - } -} -final @Data @lombok.EqualsAndHashCode(callSuper = true) class Data4 extends java.util.Timer { - final int x; - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (("Data4(x=" + this.getX()) + ")"); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof Data4))) - return false; - final @java.lang.SuppressWarnings("all") Data4 other = (Data4) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((! super.equals(o))) - return false; - if ((this.getX() != other.getX())) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof Data4); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + super.hashCode()); - result = ((result * PRIME) + this.getX()); - return result; - } - Data4() { - super(); - } -} -@Data class Data5 { - public @java.lang.SuppressWarnings("all") Data5() { - super(); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof Data5))) - return false; - final @java.lang.SuppressWarnings("all") Data5 other = (Data5) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof Data5); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - int result = 1; - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return "Data5()"; - } -} -final @Data class Data6 { - public @java.lang.SuppressWarnings("all") Data6() { - super(); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") 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") int hashCode() { - int result = 1; - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return "Data6()"; - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/DataWithGetter.java b/test/transform/resource/after-eclipse/DataWithGetter.java deleted file mode 100644 index 80e11be4..00000000 --- a/test/transform/resource/after-eclipse/DataWithGetter.java +++ /dev/null @@ -1,54 +0,0 @@ -@lombok.Data @lombok.Getter class DataWithGetter { - private int x; - private int y; - private final String z; - public @java.beans.ConstructorProperties({"z"}) @java.lang.SuppressWarnings("all") DataWithGetter(final String z) { - super(); - this.z = z; - } - public @java.lang.SuppressWarnings("all") void setX(final int x) { - this.x = x; - } - public @java.lang.SuppressWarnings("all") void setY(final int y) { - this.y = y; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof DataWithGetter))) - return false; - final @java.lang.SuppressWarnings("all") DataWithGetter other = (DataWithGetter) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((this.getX() != other.getX())) - return false; - if ((this.getY() != other.getY())) - return false; - if (((this.getZ() == null) ? (other.getZ() != null) : (! this.getZ().equals((java.lang.Object) other.getZ())))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof DataWithGetter); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.getX()); - result = ((result * PRIME) + this.getY()); - result = ((result * PRIME) + ((this.getZ() == null) ? 0 : this.getZ().hashCode())); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { - return (((((("DataWithGetter(x=" + this.getX()) + ", y=") + this.getY()) + ", z=") + this.getZ()) + ")"); - } - public @java.lang.SuppressWarnings("all") int getX() { - return this.x; - } - public @java.lang.SuppressWarnings("all") int getY() { - return this.y; - } - public @java.lang.SuppressWarnings("all") String getZ() { - return this.z; - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/DataWithGetterNone.java b/test/transform/resource/after-eclipse/DataWithGetterNone.java deleted file mode 100644 index a31ebece..00000000 --- a/test/transform/resource/after-eclipse/DataWithGetterNone.java +++ /dev/null @@ -1,45 +0,0 @@ -@lombok.Data @lombok.Getter(lombok.AccessLevel.NONE) class DataWithGetterNone { - private int x; - private int y; - private final String z; - public @java.beans.ConstructorProperties({"z"}) @java.lang.SuppressWarnings("all") DataWithGetterNone(final String z) { - super(); - this.z = z; - } - public @java.lang.SuppressWarnings("all") void setX(final int x) { - this.x = x; - } - public @java.lang.SuppressWarnings("all") void setY(final int y) { - this.y = y; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof DataWithGetterNone))) - return false; - final @java.lang.SuppressWarnings("all") DataWithGetterNone other = (DataWithGetterNone) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((this.x != other.x)) - return false; - if ((this.y != other.y)) - return false; - if (((this.z == null) ? (other.z != null) : (! this.z.equals((java.lang.Object) other.z)))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof DataWithGetterNone); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.x); - result = ((result * PRIME) + this.y); - result = ((result * PRIME) + ((this.z == null) ? 0 : this.z.hashCode())); - return result; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") 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-eclipse/DelegateOnGetter.java b/test/transform/resource/after-eclipse/DelegateOnGetter.java deleted file mode 100644 index 7d5907e0..00000000 --- a/test/transform/resource/after-eclipse/DelegateOnGetter.java +++ /dev/null @@ -1,40 +0,0 @@ -import lombok.Delegate; -import lombok.Getter; -class DelegateOnGetter { - private interface Bar { - void setList(java.util.ArrayList list); - int getInt(); - } - private final @Delegate @Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> bar = new java.util.concurrent.atomic.AtomicReference>(); - public @Delegate @java.lang.SuppressWarnings("all") Bar getBar() { - java.util.concurrent.atomic.AtomicReference value = this.bar.get(); - if ((value == null)) - { - synchronized (this.bar) - { - value = this.bar.get(); - if ((value == null)) - { - value = new java.util.concurrent.atomic.AtomicReference(new Bar() { - public void setList(java.util.ArrayList list) { - } - public int getInt() { - return 42; - } -}); - this.bar.set(value); - } - } - } - return value.get(); - } - public @java.lang.SuppressWarnings("all") int getInt() { - return this.getBar().getInt(); - } - public @java.lang.SuppressWarnings("all") void setList(final java.util.ArrayList list) { - this.getBar().setList(list); - } - DelegateOnGetter() { - super(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/DelegateOnGetterNone.java b/test/transform/resource/after-eclipse/DelegateOnGetterNone.java deleted file mode 100644 index 195797a8..00000000 --- a/test/transform/resource/after-eclipse/DelegateOnGetterNone.java +++ /dev/null @@ -1,19 +0,0 @@ -import lombok.AccessLevel; -import lombok.Delegate; -import lombok.Getter; -@Getter class DelegateOnGetterNone { - private interface Bar { - void setList(java.util.ArrayList list); - int getInt(); - } - private final @Delegate @Getter(AccessLevel.NONE) Bar bar; - public @java.lang.SuppressWarnings("all") int getInt() { - return this.bar.getInt(); - } - public @java.lang.SuppressWarnings("all") void setList(final java.util.ArrayList list) { - this.bar.setList(list); - } - DelegateOnGetterNone() { - super(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/DelegateOnMethods.java b/test/transform/resource/after-eclipse/DelegateOnMethods.java deleted file mode 100644 index 37922e2a..00000000 --- a/test/transform/resource/after-eclipse/DelegateOnMethods.java +++ /dev/null @@ -1,13 +0,0 @@ -import lombok.Delegate; -abstract class DelegateOnMethods { - public static interface Bar { - void bar(java.util.ArrayList list); - } - public @java.lang.SuppressWarnings("all") void bar(final java.util.ArrayList list) { - this.getBar().bar(list); - } - DelegateOnMethods() { - super(); - } - public abstract @Delegate Bar getBar(); -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/DelegateTypesAndExcludes.java b/test/transform/resource/after-eclipse/DelegateTypesAndExcludes.java deleted file mode 100644 index 821c0851..00000000 --- a/test/transform/resource/after-eclipse/DelegateTypesAndExcludes.java +++ /dev/null @@ -1,36 +0,0 @@ -import lombok.Delegate; -class DelegatePlain { - private static class FooImpl implements Foo { - private FooImpl() { - super(); - } - public void foo() { - } - public void bar(java.util.ArrayList list) { - } - } - private static class BarImpl implements Bar { - private BarImpl() { - super(); - } - public void bar(java.util.ArrayList list) { - } - } - private static interface Foo extends Bar { - void foo(); - } - private static interface Bar { - void bar(java.util.ArrayList list); - } - private final @Delegate(types = Bar.class) BarImpl bar = new BarImpl(); - private final @Delegate(types = Foo.class,excludes = Bar.class) FooImpl foo = new FooImpl(); - public @java.lang.SuppressWarnings("all") void bar(final java.util.ArrayList list) { - this.bar.bar(list); - } - public @java.lang.SuppressWarnings("all") void foo() { - this.foo.foo(); - } - DelegatePlain() { - super(); - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/EqualsAndHashCode.java b/test/transform/resource/after-eclipse/EqualsAndHashCode.java deleted file mode 100644 index eeda5867..00000000 --- a/test/transform/resource/after-eclipse/EqualsAndHashCode.java +++ /dev/null @@ -1,109 +0,0 @@ -@lombok.EqualsAndHashCode class EqualsAndHashCode { - int x; - boolean[] y; - Object[] z; - String a; - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof EqualsAndHashCode))) - return false; - final @java.lang.SuppressWarnings("all") EqualsAndHashCode other = (EqualsAndHashCode) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((this.x != other.x)) - return false; - if ((! java.util.Arrays.equals(this.y, other.y))) - return false; - if ((! java.util.Arrays.deepEquals(this.z, other.z))) - return false; - if (((this.a == null) ? (other.a != null) : (! this.a.equals((java.lang.Object) other.a)))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof EqualsAndHashCode); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.x); - result = ((result * PRIME) + java.util.Arrays.hashCode(this.y)); - result = ((result * PRIME) + java.util.Arrays.deepHashCode(this.z)); - result = ((result * PRIME) + ((this.a == null) ? 0 : this.a.hashCode())); - return result; - } - EqualsAndHashCode() { - super(); - } -} -final @lombok.EqualsAndHashCode class EqualsAndHashCode2 { - int x; - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof EqualsAndHashCode2))) - return false; - final @java.lang.SuppressWarnings("all") EqualsAndHashCode2 other = (EqualsAndHashCode2) o; - if ((this.x != other.x)) - return false; - return true; - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + this.x); - return result; - } - EqualsAndHashCode2() { - super(); - } -} -final @lombok.EqualsAndHashCode(callSuper = false) class EqualsAndHashCode3 extends EqualsAndHashCode { - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof EqualsAndHashCode3))) - return false; - final @java.lang.SuppressWarnings("all") EqualsAndHashCode3 other = (EqualsAndHashCode3) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof EqualsAndHashCode3); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - int result = 1; - return result; - } - EqualsAndHashCode3() { - super(); - } -} -@lombok.EqualsAndHashCode(callSuper = true) class EqualsAndHashCode4 extends EqualsAndHashCode { - public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { - if ((o == this)) - return true; - if ((! (o instanceof EqualsAndHashCode4))) - return false; - final @java.lang.SuppressWarnings("all") EqualsAndHashCode4 other = (EqualsAndHashCode4) o; - if ((! other.canEqual((java.lang.Object) this))) - return false; - if ((! super.equals(o))) - return false; - return true; - } - public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { - return (other instanceof EqualsAndHashCode4); - } - public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { - final int PRIME = 31; - int result = 1; - result = ((result * PRIME) + super.hashCode()); - return result; - } - EqualsAndHashCode4() { - super(); - } -} diff --git a/test/transform/resource/after-eclipse/EqualsAndHashCodeWithExistingMethods.java b/test/transform/resource/after-eclipse/EqualsAndHashCodeWithExistingMethods.java deleted file mode 100644 index 50b219f1..00000000 --- a/test/transform/resource/after-eclipse/EqualsAndHashCodeWithExistingMethods.java +++ /dev/null @@ -1,27 +0,0 @@ -@lombok.EqualsAndHashCode class EqualsAndHashCodeWithExistingMethods { - int x; - EqualsAndHashCodeWithExistingMethods() { - super(); - } - public int hashCode() { - return 42; - } -} -final @lombok.EqualsAndHashCode class EqualsAndHashCodeWithExistingMethods2 { - int x; - EqualsAndHashCodeWithExistingMethods2() { - super(); - } - public boolean equals(Object other) { - return false; - } -} -final @lombok.EqualsAndHashCode(callSuper = true) class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithExistingMethods { - int x; - EqualsAndHashCodeWithExistingMethods3() { - super(); - } - public boolean canEqual(Object other) { - return true; - } -} \ No newline at end of file diff --git a/test/transform/resource/after-eclipse/GetterAccessLevel.java b/test/transform/resource/after-eclipse/GetterAccessLevel.java deleted file mode 100644 index f0de95e7..00000000 --- a/test/transform/resource/after-eclipse/GetterAccessLevel.java +++ /dev/null @@ -1,43 +0,0 @@ -class GetterAccessLevel { - @lombok.Getter(lombok.AccessLevel.NONE) boolean isNone; - @lombok.Getter(lombok.AccessLevel.PRIVATE) boolean isPrivate; - @lombok.Getter(lombok.AccessLevel.PACKAGE) boolean isPackage; - @lombok.Getter(lombok.AccessLevel.PROTECTED) boolean isProtected; - @lombok.Getter(lombok.AccessLevel.PUBLIC) boolean isPublic; - @lombok.Getter(lombok.AccessLevel.NONE) String noneString; - @lombok.Getter(lombok.AccessLevel.PRIVATE) String privateString; - @lombok.Getter(lombok.AccessLevel.PACKAGE) String packageString; - @lombok.Getter(lombok.AccessLevel.PROTECTED) String protectedString; - @lombok.Getter(lombok.AccessLevel.PUBLIC) String publicString; - @lombok.Getter(value = lombok.AccessLevel.PUBLIC) String value; - private @java.lang.SuppressWarnings("all") boolean isPrivate() { - return this.isPrivate; - } - @java.lang.SuppressWarnings("all") boolean isPackage() { - return this.isPackage; - } - protected @java.lang.SuppressWarnings("all") boolean isProtected() { - return this.isProtected; - } - public @java.lang.SuppressWarnings("all") boolean isPublic() { - return this.isPublic; - } - private @java.lang.SuppressWarnings("all") String getPrivateString() { - return this.privateString; - } - @java.lang.SuppressWarnings("all") String getPackageString() { - return this.packageString; - } - protected @java.lang.SuppressWarnings("all") String getProtectedString() { - return this.protectedString; - } - public @java.lang.SuppressWarnings("all") String getPublicString() { - return this.publicString; - } - public @java.lang.SuppressWarnings("all") String getValue() { - return this.value; - } - GetterAccessLevel() { - super(); - } -} diff --git a/test/transform/resource/after-eclipse/GetterAlreadyExists.java b/test/transform/resource/after-eclipse/GetterAlreadyExists.java deleted file mode 100644 index d5bb7e60..00000000 --- a/test/transform/resource/after-eclipse/GetterAlreadyExists.java +++ /dev/null @@ -1,192 +0,0 @@ -class Getter1 { - @lombok.Getter boolean foo; - public @java.lang.SuppressWarnings("all") boolean isFoo() { - return this.foo; - } - Getter1() { - super(); - } - boolean hasFoo() { - return true; - } -} -class Getter2 { - @lombok.Getter boolean foo; - Getter2() { - super(); - } - boolean isFoo() { - return true; - } -} -class Getter3 { - @lombok.Getter boolean foo; - Getter3() { - super(); - } - boolean getFoo() { - return true; - } -} -class Getter4 { - @lombok.Getter String foo; - public @java.lang.SuppressWarnings("all") String getFoo() { - return this.foo; - } - Getter4() { - super(); - } - String hasFoo() { - return null; - } -} -class Getter5 { - @lombok.Getter String foo; - public @java.lang.SuppressWarnings("all") String getFoo() { - return this.foo; - } - Getter5() { - super(); - } - String isFoo() { - return null; - } -} -class Getter6 { - @lombok.Getter String foo; - Getter6() { - super(); - } - String getFoo() { - return null; - } -} -class Getter7 { - @lombok.Getter String foo; - public @java.lang.SuppressWarnings("all") String getFoo() { - return this.foo; - } - Getter7() { - super(); - } - boolean hasFoo() { - return false; - } -} -class Getter8 { - @lombok.Getter String foo; - pub