diff options
author | Maarten Mulders <m.th.mulders@xs4all.nl> | 2014-02-08 14:43:48 +0100 |
---|---|---|
committer | Maarten Mulders <m.th.mulders@xs4all.nl> | 2014-02-08 15:18:30 +0100 |
commit | f13191e02c1b8e8e8857cadfcf29cfd15dd1f1ad (patch) | |
tree | 4ee01b6d70e52baee3d8a049c54fcda3bdf7270c /src/core/lombok | |
parent | c38a64a5564996b552d88448bfb00722403bf194 (diff) | |
download | lombok-f13191e02c1b8e8e8857cadfcf29cfd15dd1f1ad.tar.gz lombok-f13191e02c1b8e8e8857cadfcf29cfd15dd1f1ad.tar.bz2 lombok-f13191e02c1b8e8e8857cadfcf29cfd15dd1f1ad.zip |
Handlers and testcases for @CommonsLog
Diffstat (limited to 'src/core/lombok')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleLog.java | 2 | ||||
-rw-r--r-- | src/core/lombok/extern/apachecommons/CommonsLog.java | 4 | ||||
-rw-r--r-- | src/core/lombok/javac/handlers/HandleLog.java | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleLog.java b/src/core/lombok/eclipse/handlers/HandleLog.java index ee9986b1..0f77bf76 100644 --- a/src/core/lombok/eclipse/handlers/HandleLog.java +++ b/src/core/lombok/eclipse/handlers/HandleLog.java @@ -161,7 +161,7 @@ public class HandleLog { @ProviderFor(EclipseAnnotationHandler.class) public static class HandleCommonsLog extends EclipseAnnotationHandler<lombok.extern.apachecommons.CommonsLog> { @Override public void handle(AnnotationValues<lombok.extern.apachecommons.CommonsLog> annotation, Annotation source, EclipseNode annotationNode) { - processAnnotation(LoggingFramework.COMMONS, annotation, source, annotationNode, ""); + processAnnotation(LoggingFramework.COMMONS, annotation, source, annotationNode, annotation.getInstance().value()); } } diff --git a/src/core/lombok/extern/apachecommons/CommonsLog.java b/src/core/lombok/extern/apachecommons/CommonsLog.java index 024e3744..34ac0fe6 100644 --- a/src/core/lombok/extern/apachecommons/CommonsLog.java +++ b/src/core/lombok/extern/apachecommons/CommonsLog.java @@ -59,4 +59,8 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface CommonsLog { + /** + * Sets the category of the constructed Logger. By default, it will use the type where the annotation is placed. + */ + String value() default ""; }
\ No newline at end of file diff --git a/src/core/lombok/javac/handlers/HandleLog.java b/src/core/lombok/javac/handlers/HandleLog.java index 12aa07fb..2ad16b80 100644 --- a/src/core/lombok/javac/handlers/HandleLog.java +++ b/src/core/lombok/javac/handlers/HandleLog.java @@ -111,7 +111,7 @@ public class HandleLog { @ProviderFor(JavacAnnotationHandler.class) public static class HandleCommonsLog extends JavacAnnotationHandler<lombok.extern.apachecommons.CommonsLog> { @Override public void handle(AnnotationValues<lombok.extern.apachecommons.CommonsLog> annotation, JCAnnotation ast, JavacNode annotationNode) { - processAnnotation(LoggingFramework.COMMONS, annotation, annotationNode, ""); + processAnnotation(LoggingFramework.COMMONS, annotation, annotationNode, annotation.getInstance().value()); } } |