diff options
Diffstat (limited to 'src/core/lombok/javac/handlers')
12 files changed, 69 insertions, 3 deletions
diff --git a/src/core/lombok/javac/handlers/HandleCleanup.java b/src/core/lombok/javac/handlers/HandleCleanup.java index 779dd3ea..7210c5e7 100644 --- a/src/core/lombok/javac/handlers/HandleCleanup.java +++ b/src/core/lombok/javac/handlers/HandleCleanup.java @@ -1,5 +1,5 @@ /* - * Copyright © 2009 Reinier Zwitserloot and Roel Spilker. + * Copyright © 2009-2010 Reinier Zwitserloot and Roel Spilker. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -154,4 +154,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 2087c133..682b7fe4 100644 --- a/src/core/lombok/javac/handlers/HandleData.java +++ b/src/core/lombok/javac/handlers/HandleData.java @@ -63,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 c5475fb1..376823cf 100644 --- a/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java +++ b/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java @@ -479,4 +479,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 ac3a16a1..65694dde 100644 --- a/src/core/lombok/javac/handlers/HandleGetter.java +++ b/src/core/lombok/javac/handlers/HandleGetter.java @@ -202,4 +202,8 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> { return treeMaker.MethodDef(treeMaker.Modifiers(access, nonNulls.appendList(nullables)), methodName, methodType, methodGenericParams, parameters, throwsClauses, methodBody, annotationMethodDefaultValue); } + + @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 98b68e4a..9c7a233a 100644 --- a/src/core/lombok/javac/handlers/HandleSetter.java +++ b/src/core/lombok/javac/handlers/HandleSetter.java @@ -238,4 +238,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 e3cb0294..f52602c3 100644 --- a/src/core/lombok/javac/handlers/HandleToString.java +++ b/src/core/lombok/javac/handlers/HandleToString.java @@ -247,4 +247,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..983f2d86 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 @@ -31,8 +31,10 @@ import org.mangosdk.spi.ProviderFor; import com.sun.tools.javac.code.Flags; import com.sun.tools.javac.code.Type; import com.sun.tools.javac.tree.JCTree; +import com.sun.tools.javac.tree.JCTree.JCClassDecl; import com.sun.tools.javac.tree.JCTree.JCEnhancedForLoop; import com.sun.tools.javac.tree.JCTree.JCExpression; +import com.sun.tools.javac.tree.JCTree.JCMethodDecl; import com.sun.tools.javac.tree.JCTree.JCNewArray; import com.sun.tools.javac.tree.JCTree.JCVariableDecl; |