diff options
author | grootjans <grootjans@gmail.com> | 2012-10-29 23:38:06 +0100 |
---|---|---|
committer | grootjans <grootjans@gmail.com> | 2012-10-30 00:44:45 +0100 |
commit | 11a07262efd3595fd59e52cf81c21c919ff3814f (patch) | |
tree | 2398e9a185a6af4f75da2dd925c800c55a029b84 /src/core/lombok/javac | |
parent | 8a5d637af766d71d4f2b5f87eceec5360de831fa (diff) | |
download | lombok-11a07262efd3595fd59e52cf81c21c919ff3814f.tar.gz lombok-11a07262efd3595fd59e52cf81c21c919ff3814f.tar.bz2 lombok-11a07262efd3595fd59e52cf81c21c919ff3814f.zip |
Added annotation for the slf4j extended logger
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleLog.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/HandleLog.java b/src/core/lombok/javac/handlers/HandleLog.java index 5ccc82d4..62a55c44 100644 --- a/src/core/lombok/javac/handlers/HandleLog.java +++ b/src/core/lombok/javac/handlers/HandleLog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 The Project Lombok Authors. + * Copyright (C) 2010-2012 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 @@ -137,6 +137,16 @@ public class HandleLog { } } + /** + * Handles the {@link lombok.extern.slf4j.XSlf4j} annotation for javac. + */ + @ProviderFor(JavacAnnotationHandler.class) + public static class HandleXSlf4jLog extends JavacAnnotationHandler<lombok.extern.slf4j.XSlf4j> { + @Override public void handle(AnnotationValues<lombok.extern.slf4j.XSlf4j> annotation, JCAnnotation ast, JavacNode annotationNode) { + processAnnotation(LoggingFramework.XSLF4J, annotation, annotationNode); + } + } + enum LoggingFramework { // private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TargetType.class); COMMONS(lombok.extern.apachecommons.CommonsLog.class, "org.apache.commons.logging.Log", "org.apache.commons.logging.LogFactory.getLog"), @@ -156,6 +166,9 @@ public class HandleLog { // private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TargetType.class); SLF4J(lombok.extern.slf4j.Slf4j.class, "org.slf4j.Logger", "org.slf4j.LoggerFactory.getLogger"), + // private static final org.slf4j.ext.XLogger log = org.slf4j.ext.XLoggerFactory.getXLogger(TargetType.class); + XSLF4J(lombok.extern.slf4j.XSlf4j.class, "org.slf4j.ext.XLogger", "org.slf4j.ext.XLoggerFactory.getXLogger"), + ; private final Class<? extends Annotation> annotationClass; |