diff options
author | Roel Spilker <r.spilker@gmail.com> | 2010-11-11 02:03:38 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2010-11-11 02:03:38 +0100 |
commit | ddf54dcfaea71e50ae32b45785b8624b9137843b (patch) | |
tree | b43f5733c138eb9602b0db2b0f88270ce5fc633b /src/core/lombok | |
parent | 1c323332493148f0aaa936e668e1b0da5d09c8be (diff) | |
parent | eae3e45ae7dd965cc642d7f03b833574e974fc1b (diff) | |
download | lombok-ddf54dcfaea71e50ae32b45785b8624b9137843b.tar.gz lombok-ddf54dcfaea71e50ae32b45785b8624b9137843b.tar.bz2 lombok-ddf54dcfaea71e50ae32b45785b8624b9137843b.zip |
Merge branch 'master' into lazyinit
Conflicts:
src/core/lombok/javac/handlers/HandleGetter.java
Diffstat (limited to 'src/core/lombok')
21 files changed, 226 insertions, 43 deletions
diff --git a/src/core/lombok/Delegate.java b/src/core/lombok/Delegate.java new file mode 100644 index 00000000..0bbaed0d --- /dev/null +++ b/src/core/lombok/Delegate.java @@ -0,0 +1,26 @@ +/* + * Copyright © 2010 Reinier Zwitserloot, Roel Spilker and Robbert Jan Grootjans. + * + * 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; + +public @interface Delegate { + Class<?> value() default java.lang.Object.class; +} diff --git a/src/core/lombok/eclipse/handlers/HandleVal.java b/src/core/lombok/eclipse/handlers/HandleVal.java index b3cfa879..7f4f36fb 100644 --- a/src/core/lombok/eclipse/handlers/HandleVal.java +++ b/src/core/lombok/eclipse/handlers/HandleVal.java @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2010 Reinier Zwitserloot, Roel Spilker and Robbert Jan Grootjans. + * Copyright © 2010 Reinier Zwitserloot, Roel Spilker and Robbert Jan Grootjans. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/core/lombok/javac/HandlerLibrary.java b/src/core/lombok/javac/HandlerLibrary.java index 5b792874..8eb7be9f 100644 --- a/src/core/lombok/javac/HandlerLibrary.java +++ b/src/core/lombok/javac/HandlerLibrary.java @@ -51,7 +51,7 @@ public class HandlerLibrary { private final Map<String, AnnotationHandlerContainer<?>> annotationHandlers = new HashMap<String, AnnotationHandlerContainer<?>>(); private final Collection<JavacASTVisitor> visitorHandlers = new ArrayList<JavacASTVisitor>(); private final Messager messager; - private boolean skipPrintAST = true; + private int phase = 0; /** * Creates a new HandlerLibrary that will report any problems or errors to the provided messager. @@ -70,6 +70,10 @@ public class HandlerLibrary { this.annotationClass = annotationClass; } + public boolean isResolutionBased() { + return handler.isResolutionBased(); + } + public boolean handle(final JavacNode node) { return handler.handle(Javac.createAnnotation(annotationClass, node), (JCAnnotation)node.get(), node); } @@ -160,12 +164,14 @@ public class HandlerLibrary { boolean handled = false; for (String fqn : resolver.findTypeMatches(node, rawType)) { boolean isPrintAST = fqn.equals(PrintAST.class.getName()); - if (isPrintAST == skipPrintAST) continue; + if (isPrintAST && phase != 2) continue; + if (!isPrintAST && phase == 2) continue; AnnotationHandlerContainer<?> container = annotationHandlers.get(fqn); if (container == null) continue; try { - handled |= container.handle(node); + if (container.isResolutionBased() && phase == 1) handled |= container.handle(node); + if (!container.isResolutionBased() && phase == 0) handled |= container.handle(node); } catch (AnnotationValueDecodeFail fail) { fail.owner.setError(fail.getMessage(), fail.idx); } catch (Throwable t) { @@ -183,13 +189,8 @@ public class HandlerLibrary { */ public void callASTVisitors(JavacAST ast) { for (JavacASTVisitor visitor : visitorHandlers) try { - if (!visitor.isResolutionBased()) ast.traverse(visitor); - } catch (Throwable t) { - javacError(String.format("Lombok visitor handler %s failed", visitor.getClass()), t); - } - - for (JavacASTVisitor visitor : visitorHandlers) try { - if (visitor.isResolutionBased()) ast.traverse(visitor); + if (!visitor.isResolutionBased() && phase == 0) ast.traverse(visitor); + if (visitor.isResolutionBased() && phase == 1) ast.traverse(visitor); } catch (Throwable t) { javacError(String.format("Lombok visitor handler %s failed", visitor.getClass()), t); } @@ -197,17 +198,17 @@ public class HandlerLibrary { /** * Lombok does not currently support triggering annotations in a specified order; the order is essentially - * random right now. This lack of order is particularly annoying for the {@code PrintAST} annotation, - * which is almost always intended to run last. Hence, this hack, which lets it in fact run last. - * - * @see #skipAllButPrintAST() + * random right now. As a temporary hack we've identified 3 important phases. */ - public void skipPrintAST() { - skipPrintAST = true; + public void setPreResolutionPhase() { + phase = 0; + } + + public void setPostResolutionPhase() { + phase = 1; } - /** @see #skipPrintAST() */ - public void skipAllButPrintAST() { - skipPrintAST = false; + public void setPrintASTPhase() { + phase = 2; } } diff --git a/src/core/lombok/javac/JavacAnnotationHandler.java b/src/core/lombok/javac/JavacAnnotationHandler.java index 5b6fe4ce..ee330ecb 100644 --- a/src/core/lombok/javac/JavacAnnotationHandler.java +++ b/src/core/lombok/javac/JavacAnnotationHandler.java @@ -55,4 +55,9 @@ public interface JavacAnnotationHandler<T extends Annotation> { * compile session (you've handled it), or {@code false} to indicate you aren't done yet. */ boolean handle(AnnotationValues<T> annotation, JCAnnotation ast, JavacNode annotationNode); + + /** + * Return true if this handler requires resolution. + */ + boolean isResolutionBased(); } diff --git a/src/core/lombok/javac/JavacResolution.java b/src/core/lombok/javac/JavacResolution.java index e0eb436d..2845328d 100644 --- a/src/core/lombok/javac/JavacResolution.java +++ b/src/core/lombok/javac/JavacResolution.java @@ -325,6 +325,8 @@ public class JavacResolution { // NB: There's such a thing as maker.Type(type), but this doesn't work very well; it screws up anonymous classes, captures, and adds an extra prefix dot for some reason too. // -- so we write our own take on that here. + if (type.tag == TypeTags.BOT) return createJavaLangObject(maker, ast); + if (type.isPrimitive()) return primitiveToJCTree(type.getKind(), maker); if (type.isErroneous()) throw new TypeNotConvertibleException("Type cannot be resolved"); diff --git a/src/core/lombok/javac/JavacTransformer.java b/src/core/lombok/javac/JavacTransformer.java index 5f145460..f9757894 100644 --- a/src/core/lombok/javac/JavacTransformer.java +++ b/src/core/lombok/javac/JavacTransformer.java @@ -22,7 +22,6 @@ package lombok.javac; import java.util.ArrayList; -import java.util.List; import javax.annotation.processing.Messager; @@ -32,6 +31,7 @@ import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; import com.sun.tools.javac.tree.JCTree.JCMethodDecl; import com.sun.tools.javac.tree.JCTree.JCVariableDecl; import com.sun.tools.javac.util.Context; +import com.sun.tools.javac.util.List; public class JavacTransformer { private final HandlerLibrary handlers; @@ -42,26 +42,46 @@ public class JavacTransformer { this.handlers = HandlerLibrary.load(messager); } - public boolean transform(Context context, Iterable<JCCompilationUnit> compilationUnits) { - List<JavacAST> asts = new ArrayList<JavacAST>(); + public void transform(boolean postResolution, Context context, java.util.List<JCCompilationUnit> compilationUnitsRaw) { + List<JCCompilationUnit> compilationUnits; + if (compilationUnitsRaw instanceof List<?>) { + compilationUnits = (List<JCCompilationUnit>)compilationUnitsRaw; + } else { + compilationUnits = List.nil(); + for (int i = compilationUnitsRaw.size() -1; i >= 0; i--) { + compilationUnits = compilationUnits.prepend(compilationUnitsRaw.get(i)); + } + } + + java.util.List<JavacAST> asts = new ArrayList<JavacAST>(); for (JCCompilationUnit unit : compilationUnits) asts.add(new JavacAST(messager, context, unit)); - handlers.skipPrintAST(); - for (JavacAST ast : asts) { - ast.traverse(new AnnotationVisitor()); - handlers.callASTVisitors(ast); + if (!postResolution) { + handlers.setPreResolutionPhase(); + for (JavacAST ast : asts) { + ast.traverse(new AnnotationVisitor()); + handlers.callASTVisitors(ast); + } } - handlers.skipAllButPrintAST(); - for (JavacAST ast : asts) { - ast.traverse(new AnnotationVisitor()); + if (postResolution) { + handlers.setPostResolutionPhase(); + for (JavacAST ast : asts) { + ast.traverse(new AnnotationVisitor()); + handlers.callASTVisitors(ast); + } + + handlers.setPrintASTPhase(); + for (JavacAST ast : asts) { + ast.traverse(new AnnotationVisitor()); + } } - for (JavacAST ast : asts) { - if (ast.isChanged()) return true; + TrackChangedAsts changes = context.get(TrackChangedAsts.class); + if (changes != null) for (JavacAST ast : asts) { + if (ast.isChanged()) changes.changed.add((JCCompilationUnit) ast.top().get()); } - return false; } private class AnnotationVisitor extends JavacASTAdapter { diff --git a/src/core/lombok/javac/TrackChangedAsts.java b/src/core/lombok/javac/TrackChangedAsts.java new file mode 100644 index 00000000..fa6c0f18 --- /dev/null +++ b/src/core/lombok/javac/TrackChangedAsts.java @@ -0,0 +1,10 @@ +package lombok.javac; + +import java.util.HashSet; +import java.util.Set; + +import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; + +public class TrackChangedAsts { + public final Set<JCCompilationUnit> changed = new HashSet<JCCompilationUnit>(); +}
\ No newline at end of file diff --git a/src/core/lombok/javac/apt/InterceptingJavaFileManager.java b/src/core/lombok/javac/apt/InterceptingJavaFileManager.java index 2b570eb0..738804ea 100644 --- a/src/core/lombok/javac/apt/InterceptingJavaFileManager.java +++ b/src/core/lombok/javac/apt/InterceptingJavaFileManager.java @@ -21,13 +21,19 @@ */ package lombok.javac.apt; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URI; import java.util.Iterator; import java.util.Set; import javax.tools.FileObject; import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; +import javax.tools.SimpleJavaFileObject; import javax.tools.JavaFileObject.Kind; import lombok.core.DiagnosticsReceiver; @@ -42,6 +48,22 @@ final class InterceptingJavaFileManager implements JavaFileManager { } @Override public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling) throws IOException { + if (className.startsWith("lombok.dummy.ForceNewRound")) { + String name = className.replace(".", "/") + kind.extension; + return new SimpleJavaFileObject(URI.create(name), kind) { + @Override public OutputStream openOutputStream() throws IOException { + return new ByteArrayOutputStream(); + } + + @Override public InputStream openInputStream() throws IOException { + return new ByteArrayInputStream(new byte[0]); + } + + @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException { + return ""; + } + }; + } JavaFileObject fileObject = delegate.getJavaFileForOutput(location, className, kind, sibling); if (kind != Kind.CLASS) { return fileObject; diff --git a/src/core/lombok/javac/apt/Processor.java b/src/core/lombok/javac/apt/Processor.java index 037f5ba5..b5d5c81c 100644 --- a/src/core/lombok/javac/apt/Processor.java +++ b/src/core/lombok/javac/apt/Processor.java @@ -23,9 +23,11 @@ package lombok.javac.apt; import java.io.IOException; import java.io.InputStream; +import java.io.Writer; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.net.URL; +import java.util.ArrayList; import java.util.Enumeration; import java.util.IdentityHashMap; import java.util.Map; @@ -40,7 +42,9 @@ import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; +import javax.tools.Diagnostic.Kind; import javax.tools.JavaFileManager; +import javax.tools.JavaFileObject; import lombok.Lombok; import lombok.core.DiagnosticsReceiver; @@ -48,6 +52,7 @@ import lombok.javac.JavacTransformer; import com.sun.source.util.TreePath; import com.sun.source.util.Trees; +import com.sun.tools.javac.processing.JavacFiler; import com.sun.tools.javac.processing.JavacProcessingEnvironment; import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; import com.sun.tools.javac.util.Context; @@ -74,12 +79,12 @@ public class Processor extends AbstractProcessor { @Override public void init(ProcessingEnvironment procEnv) { super.init(procEnv); this.processingEnv = (JavacProcessingEnvironment) procEnv; - placePostCompileHook(); + placePostCompileAndDontMakeForceRoundDummiesHook(); transformer = new JavacTransformer(procEnv.getMessager()); trees = Trees.instance(procEnv); } - private void placePostCompileHook() { + private void placePostCompileAndDontMakeForceRoundDummiesHook() { stopJavacProcessingEnvironmentFromClosingOurClassloader(); Context context = processingEnv.getContext(); @@ -100,6 +105,9 @@ public class Processor extends AbstractProcessor { JavaFileManager newFiler = new InterceptingJavaFileManager(originalFiler, receiver); ht.put(key, newFiler); + Field filerFileManagerField = JavacFiler.class.getDeclaredField("fileManager"); + filerFileManagerField.setAccessible(true); + filerFileManagerField.set(processingEnv.getFiler(), newFiler); } } catch (Exception e) { throw Lombok.sneakyThrow(e); @@ -164,15 +172,43 @@ public class Processor extends AbstractProcessor { } } + private final IdentityHashMap<JCCompilationUnit, Void> rootsAtPhase0 = new IdentityHashMap<JCCompilationUnit, Void>(); + private final IdentityHashMap<JCCompilationUnit, Void> rootsAtPhase1 = new IdentityHashMap<JCCompilationUnit, Void>(); + private int dummyCount = 0; + /** {@inheritDoc} */ @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { - IdentityHashMap<JCCompilationUnit, Void> units = new IdentityHashMap<JCCompilationUnit, Void>(); + if (roundEnv.processingOver()) return false; + + if (!rootsAtPhase0.isEmpty()) { + ArrayList<JCCompilationUnit> cus = new ArrayList<JCCompilationUnit>(rootsAtPhase0.keySet()); + transformer.transform(true, processingEnv.getContext(), cus); + rootsAtPhase1.putAll(rootsAtPhase0); + rootsAtPhase0.clear(); + } + for (Element element : roundEnv.getRootElements()) { JCCompilationUnit unit = toUnit(element); - if (unit != null) units.put(unit, null); + if (unit != null) { + if (!rootsAtPhase1.containsKey(unit)) rootsAtPhase0.put(unit, null); + } } - transformer.transform(processingEnv.getContext(), units.keySet()); + if (!rootsAtPhase0.isEmpty()) { + ArrayList<JCCompilationUnit> cus = new ArrayList<JCCompilationUnit>(rootsAtPhase0.keySet()); + transformer.transform(false, processingEnv.getContext(), cus); + JavacFiler filer = (JavacFiler) processingEnv.getFiler(); + if (!filer.newFiles()) { + try { + JavaFileObject dummy = filer.createSourceFile("lombok.dummy.ForceNewRound" + (dummyCount++)); + Writer w = dummy.openWriter(); + w.close(); + } catch (Exception e) { + processingEnv.getMessager().printMessage(Kind.WARNING, + "Can't force a new processing round. Lombok features that require resolution won't work."); + } + } + } return false; } diff --git a/src/core/lombok/javac/handlers/HandleCleanup.java b/src/core/lombok/javac/handlers/HandleCleanup.java index d72898b8..cbbdc007 100644 --- a/src/core/lombok/javac/handlers/HandleCleanup.java +++ b/src/core/lombok/javac/handlers/HandleCleanup.java @@ -156,4 +156,8 @@ public class HandleCleanup implements JavacAnnotationHandler<Cleanup> { } } } + + @Override public boolean isResolutionBased() { + return false; + } } diff --git a/src/core/lombok/javac/handlers/HandleConstructor.java b/src/core/lombok/javac/handlers/HandleConstructor.java index c2332974..d56c976f 100644 --- a/src/core/lombok/javac/handlers/HandleConstructor.java +++ b/src/core/lombok/javac/handlers/HandleConstructor.java @@ -69,6 +69,10 @@ public class HandleConstructor { new HandleConstructor().generateConstructor(typeNode, level, fields, staticName, false, false); return true; } + + @Override public boolean isResolutionBased() { + return false; + } } @ProviderFor(JavacAnnotationHandler.class) @@ -86,6 +90,10 @@ public class HandleConstructor { new HandleConstructor().generateConstructor(typeNode, level, findRequiredFields(typeNode), staticName, false, suppressConstructorProperties); return true; } + + @Override public boolean isResolutionBased() { + return false; + } } private static List<JavacNode> findRequiredFields(JavacNode typeNode) { @@ -131,6 +139,10 @@ public class HandleConstructor { new HandleConstructor().generateConstructor(typeNode, level, fields, staticName, false, suppressConstructorProperties); return true; } + + @Override public boolean isResolutionBased() { + return false; + } } public void generateRequiredArgsConstructor(JavacNode typeNode, AccessLevel level, String staticName, boolean skipIfConstructorExists) { diff --git a/src/core/lombok/javac/handlers/HandleData.java b/src/core/lombok/javac/handlers/HandleData.java index 6767f073..682b7fe4 100644 --- a/src/core/lombok/javac/handlers/HandleData.java +++ b/src/core/lombok/javac/handlers/HandleData.java @@ -33,8 +33,6 @@ import org.mangosdk.spi.ProviderFor; import com.sun.tools.javac.code.Flags; import com.sun.tools.javac.tree.JCTree.JCAnnotation; import com.sun.tools.javac.tree.JCTree.JCClassDecl; -import com.sun.tools.javac.tree.JCTree.JCExpression; -import com.sun.tools.javac.util.List; /** * Handles the {@code lombok.Data} annotation for javac. @@ -65,4 +63,8 @@ public class HandleData implements JavacAnnotationHandler<Data> { return true; } + + @Override public boolean isResolutionBased() { + return false; + } } diff --git a/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java index e076b295..8799f2e1 100644 --- a/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java +++ b/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java @@ -483,4 +483,8 @@ public class HandleEqualsAndHashCode implements JavacAnnotationHandler<EqualsAnd private JCStatement returnBool(TreeMaker maker, boolean bool) { return maker.Return(maker.Literal(TypeTags.BOOLEAN, bool ? 1 : 0)); } + + @Override public boolean isResolutionBased() { + return false; + } } diff --git a/src/core/lombok/javac/handlers/HandleGetter.java b/src/core/lombok/javac/handlers/HandleGetter.java index ab4bcb60..be1bc49a 100644 --- a/src/core/lombok/javac/handlers/HandleGetter.java +++ b/src/core/lombok/javac/handlers/HandleGetter.java @@ -221,7 +221,6 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> { return true; } - private JCMethodDecl createGetter(long access, JavacNode field, TreeMaker treeMaker, List<JCExpression> onMethod, boolean lazy) { JCVariableDecl fieldNode = (JCVariableDecl) field.get(); @@ -367,4 +366,8 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> { private JCExpression copyType(TreeMaker treeMaker, JCVariableDecl fieldNode) { return fieldNode.type != null ? treeMaker.Type(fieldNode.type) : fieldNode.vartype; } + + @Override public boolean isResolutionBased() { + return false; + } } diff --git a/src/core/lombok/javac/handlers/HandleLog.java b/src/core/lombok/javac/handlers/HandleLog.java index 03e40d7f..c72892cc 100644 --- a/src/core/lombok/javac/handlers/HandleLog.java +++ b/src/core/lombok/javac/handlers/HandleLog.java @@ -121,6 +121,10 @@ public class HandleLog { @Override public boolean handle(AnnotationValues<lombok.extern.apachecommons.Log> annotation, JCAnnotation ast, JavacNode annotationNode) { return processAnnotation(LoggingFramework.COMMONS, annotation, annotationNode); } + + @Override public boolean isResolutionBased() { + return false; + } } /** @@ -131,7 +135,11 @@ public class HandleLog { @Override public boolean handle(AnnotationValues<lombok.extern.jul.Log> annotation, JCAnnotation ast, JavacNode annotationNode) { return processAnnotation(LoggingFramework.JUL, annotation, annotationNode); } - } + + @Override public boolean isResolutionBased() { + return false; + } + } /** * Handles the {@link lombok.extern.log4j.Log} annotation for javac. @@ -141,6 +149,10 @@ public class HandleLog { @Override public boolean handle(AnnotationValues<lombok.extern.log4j.Log> annotation, JCAnnotation ast, JavacNode annotationNode) { return processAnnotation(LoggingFramework.LOG4J, annotation, annotationNode); } + + @Override public boolean isResolutionBased() { + return false; + } } /** @@ -151,6 +163,10 @@ public class HandleLog { @Override public boolean handle(AnnotationValues<lombok.extern.slf4j.Log> annotation, JCAnnotation ast, JavacNode annotationNode) { return processAnnotation(LoggingFramework.SLF4J, annotation, annotationNode); } + + @Override public boolean isResolutionBased() { + return false; + } } enum LoggingFramework { diff --git a/src/core/lombok/javac/handlers/HandlePrintAST.java b/src/core/lombok/javac/handlers/HandlePrintAST.java index 4c25694b..61b877d6 100644 --- a/src/core/lombok/javac/handlers/HandlePrintAST.java +++ b/src/core/lombok/javac/handlers/HandlePrintAST.java @@ -54,4 +54,8 @@ public class HandlePrintAST implements JavacAnnotationHandler<PrintAST> { return true; } + + @Override public boolean isResolutionBased() { + return false; + } } diff --git a/src/core/lombok/javac/handlers/HandleSetter.java b/src/core/lombok/javac/handlers/HandleSetter.java index e6a39577..875c63dd 100644 --- a/src/core/lombok/javac/handlers/HandleSetter.java +++ b/src/core/lombok/javac/handlers/HandleSetter.java @@ -250,4 +250,8 @@ public class HandleSetter implements JavacAnnotationHandler<Setter> { return v.visitNoType(this, p); } } + + @Override public boolean isResolutionBased() { + return false; + } } diff --git a/src/core/lombok/javac/handlers/HandleSneakyThrows.java b/src/core/lombok/javac/handlers/HandleSneakyThrows.java index b2337f67..0f37a80e 100644 --- a/src/core/lombok/javac/handlers/HandleSneakyThrows.java +++ b/src/core/lombok/javac/handlers/HandleSneakyThrows.java @@ -110,4 +110,8 @@ public class HandleSneakyThrows implements JavacAnnotationHandler<SneakyThrows> return maker.Try(tryBlock, List.of(maker.Catch(catchParam, catchBody)), null); } + + @Override public boolean isResolutionBased() { + return false; + } } diff --git a/src/core/lombok/javac/handlers/HandleSynchronized.java b/src/core/lombok/javac/handlers/HandleSynchronized.java index a095aaf1..b1394b02 100644 --- a/src/core/lombok/javac/handlers/HandleSynchronized.java +++ b/src/core/lombok/javac/handlers/HandleSynchronized.java @@ -107,4 +107,8 @@ public class HandleSynchronized implements JavacAnnotationHandler<Synchronized> return true; } + + @Override public boolean isResolutionBased() { + return false; + } } diff --git a/src/core/lombok/javac/handlers/HandleToString.java b/src/core/lombok/javac/handlers/HandleToString.java index 64200904..82e32c06 100644 --- a/src/core/lombok/javac/handlers/HandleToString.java +++ b/src/core/lombok/javac/handlers/HandleToString.java @@ -250,4 +250,8 @@ public class HandleToString implements JavacAnnotationHandler<ToString> { } return typeName; } + + @Override public boolean isResolutionBased() { + return false; + } } diff --git a/src/core/lombok/javac/handlers/HandleVal.java b/src/core/lombok/javac/handlers/HandleVal.java index 5da6fec0..bf938362 100644 --- a/src/core/lombok/javac/handlers/HandleVal.java +++ b/src/core/lombok/javac/handlers/HandleVal.java @@ -1,5 +1,5 @@ /* - * Copyright © 2010 Reinier Zwitserloot and Roel Spilker. + * Copyright © 2010 Reinier Zwitserloot, Roel Spilker and Robbert Jan Grootjans. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal |