Updated documentation on @Log and moved them all to lombok.extern.*

This commit is contained in:
Roel Spilker committed 2010-11-06 23:29:43 +01:00
1 parent d1addc14d5
commit 8e7334a505
30 files changed
+278 -107

No files matched your search

+2 -2
View File
@@ -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
@@ -292,7 +292,7 @@ such as converting the changelog into HTML, and creating javadoc.
<classpath refid="build.path" />
<link href="http://java.sun.com/javase/6/docs/api/" offline="true" packagelistLoc="./deps/javadoc/java6"/>
<header><![CDATA[<a href='http://projectlombok.org/'>Lombok</a> - ]]>v${lombok.version}</header>
<bottom><![CDATA[<i>Copyright &#169; 2009 Reinier Zwitserloot and Roel Spilker, licensed under the <a href='http://www.opensource.org/licenses/mit-license.php'>MIT licence</a>.]]></bottom>
<bottom><![CDATA[<i>Copyright &#169; 2009-2010 Reinier Zwitserloot, Roel Spilker and Robbert Jan Grootjans, licensed under the <a href='http://www.opensource.org/licenses/mit-license.php'>MIT licence</a>.]]></bottom>
</javadoc>
<mkdir dir="doc/api" />
<copy todir="doc/api">
+16 -16
View File
@@ -172,51 +172,51 @@ public class HandleLog {
}
/**
* Handles the {@link lombok.commons.Log} annotation for Eclipse.
* Handles the {@link lombok.extern.apachecommons.Log} annotation for Eclipse.
*/
@ProviderFor(EclipseAnnotationHandler.class)
public static class HandleCommonsLog implements EclipseAnnotationHandler<lombok.commons.Log> {
@Override public boolean handle(AnnotationValues<lombok.commons.Log> annotation, Annotation source, EclipseNode annotationNode) {
public static class HandleCommonsLog implements EclipseAnnotationHandler<lombok.extern.apachecommons.Log> {
@Override public boolean handle(AnnotationValues<lombok.extern.apachecommons.Log> annotation, Annotation source, EclipseNode annotationNode) {
return processAnnotation(LoggingFramework.COMMONS, annotation, source, annotationNode);
}
}
/**
* Handles the {@link lombok.jul.Log} annotation for Eclipse.
* Handles the {@link lombok.extern.jul.Log} annotation for Eclipse.
*/
@ProviderFor(EclipseAnnotationHandler.class)
public static class HandleJulLog implements EclipseAnnotationHandler<lombok.jul.Log> {
@Override public boolean handle(AnnotationValues<lombok.jul.Log> annotation, Annotation source, EclipseNode annotationNode) {
public static class HandleJulLog implements EclipseAnnotationHandler<lombok.extern.jul.Log> {
@Override public boolean handle(AnnotationValues<lombok.extern.jul.Log> annotation, Annotation source, EclipseNode annotationNode) {
return processAnnotation(LoggingFramework.JUL, annotation, source, annotationNode);
}
}
/**
* Handles the {@link lombok.log4j.Log} annotation for Eclipse.
* Handles the {@link lombok.extern.log4j.Log} annotation for Eclipse.
*/
@ProviderFor(EclipseAnnotationHandler.class)
public static class HandleLog4jLog implements EclipseAnnotationHandler<lombok.log4j.Log> {
@Override public boolean handle(AnnotationValues<lombok.log4j.Log> annotation, Annotation source, EclipseNode annotationNode) {
public static class HandleLog4jLog implements EclipseAnnotationHandler<lombok.extern.log4j.Log> {
@Override public boolean handle(AnnotationValues<lombok.extern.log4j.Log> annotation, Annotation source, EclipseNode annotationNode) {
return processAnnotation(LoggingFramework.LOG4J, annotation, source, annotationNode);
}
}
/**
* Handles the {@link lombok.slf4j.Log} annotation for Eclipse.
* Handles the {@link lombok.extern.slf4j.Log} annotation for Eclipse.
*/
@ProviderFor(EclipseAnnotationHandler.class)
public static class HandleSlf4jLog implements EclipseAnnotationHandler<lombok.slf4j.Log> {
@Override public boolean handle(AnnotationValues<lombok.slf4j.Log> annotation, Annotation source, EclipseNode annotationNode) {
public static class HandleSlf4jLog implements EclipseAnnotationHandler<lombok.extern.slf4j.Log> {
@Override public boolean handle(AnnotationValues<lombok.extern.slf4j.Log> annotation, Annotation source, EclipseNode annotationNode) {
return processAnnotation(LoggingFramework.SLF4J, annotation, source, annotationNode);
}
}
enum LoggingFramework {
// private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TargetType.class);
COMMONS(lombok.jul.Log.class, "org.apache.commons.logging.Log", "org.apache.commons.logging.LogFactory", "getLog"),
COMMONS(lombok.extern.jul.Log.class, "org.apache.commons.logging.Log", "org.apache.commons.logging.LogFactory", "getLog"),
// private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(TargetType.class.getName());
JUL(lombok.jul.Log.class, "java.util.logging.Logger", "java.util.logging.Logger", "getLogger") {
JUL(lombok.extern.jul.Log.class, "java.util.logging.Logger", "java.util.logging.Logger", "getLogger") {
@Override public Expression createFactoryParameter(String typeName, Annotation source) {
int pS = source.sourceStart, pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
@@ -236,10 +236,10 @@ public class HandleLog {
},
// private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(TargetType.class);
LOG4J(lombok.jul.Log.class, "org.apache.log4j.Logger", "org.apache.log4j.Logger", "getLogger"),
LOG4J(lombok.extern.jul.Log.class, "org.apache.log4j.Logger", "org.apache.log4j.Logger", "getLogger"),
// private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TargetType.class);
SLF4J(lombok.slf4j.Log.class, "org.slf4j.Logger", "org.slf4j.LoggerFactory", "getLogger"),
SLF4J(lombok.extern.slf4j.Log.class, "org.slf4j.Logger", "org.slf4j.LoggerFactory", "getLogger"),
;
@@ -19,16 +19,59 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package lombok.slf4j;
package lombok.extern.apachecommons;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Causes lombok to generate a logger field.
* Example:
* <pre>
* &#64;Log
* public class LogExample {
* }
* </pre>
*
* will generate:
*
* <pre>
* public class LogExample {
* private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LogExample.class);
* }
* </pre>
*
* If you do not want to use the annotated class as the logger parameter, you can specify an alternate class.
* Example:
* <pre>
* &#64;Log(java.util.List.class)
* public class LogExample {
* }
* </pre>
*
* will generate:
*
* <pre>
* public class LogExample {
* private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(java.util.List.class);
* }
* </pre>
*
* This annotation is valid for classes and enumerations.<br />
*
* @see lombok.extern.jul.Log lombok.extern.jul.Log
* @see lombok.extern.log4j.Log lombok.extern.log4j.Log
* @see lombok.extern.slf4j.Log lombok.extern.slf4j.Log
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface Log {
/**
* If you do not want to use the annotated class as the logger parameter, you can specify an alternate class here.
* <br />
* NB: If {@code void.class} is passed, it will be considered the same as specifying no parameter.
*/
Class<?> value() default void.class;
}
}
@@ -19,16 +19,59 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package lombok.log4j;
package lombok.extern.jul;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Causes lombok to generate a logger field.
* Example:
* <pre>
* &#64;Log
* public class LogExample {
* }
* </pre>
*
* will generate:
*
* <pre>
* public class LogExample {
* private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LogExample.class.getName());
* }
* </pre>
*
* If you do not want to use the annotated class as the logger parameter, you can specify an alternate class.
* Example:
* <pre>
* &#64;Log(java.util.List.class)
* public class LogExample {
* }
* </pre>
*
* will generate:
*
* <pre>
* public class LogExample {
* private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(java.util.List.class.getName());
* }
* </pre>
*
* This annotation is valid for classes and enumerations.<br />
*
* @see lombok.extern.apachecommons.Log lombok.extern.apachecommons.Log
* @see lombok.extern.log4j.Log lombok.extern.log4j.Log
* @see lombok.extern.slf4j.Log lombok.extern.slf4j.Log
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface Log {
/**
* If you do not want to use the annotated class as the logger parameter, you can specify an alternate class here.
* <br />
* NB: If {@code void.class} is passed, it will be considered the same as specifying no parameter.
*/
Class<?> value() default void.class;
}
}
@@ -19,16 +19,59 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package lombok.jul;
package lombok.extern.log4j;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Causes lombok to generate a logger field.
* Example:
* <pre>
* &#64;Log
* public class LogExample {
* }
* </pre>
*
* will generate:
*
* <pre>
* public class LogExample {
* private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LogExample.class);
* }
* </pre>
*
* If you do not want to use the annotated class as the logger parameter, you can specify an alternate class.
* Example:
* <pre>
* &#64;Log(java.util.List.class)
* public class LogExample {
* }
* </pre>
*
* will generate:
*
* <pre>
* public class LogExample {
* private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(java.util.List.class);
* }
* </pre>
*
* This annotation is valid for classes and enumerations.<br />
*
* @see lombok.extern.apachecommons.Log lombok.extern.apachecommons.Log
* @see lombok.extern.jul.Log lombok.extern.jul.Log
* @see lombok.extern.slf4j.Log lombok.extern.slf4j.Log
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface Log {
/**
* If you do not want to use the annotated class as the logger parameter, you can specify an alternate class here.
* <br />
* NB: If {@code void.class} is passed, it will be considered the same as specifying no parameter.
*/
Class<?> value() default void.class;
}
}
@@ -19,16 +19,58 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package lombok.commons;
package lombok.extern.slf4j;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Causes lombok to generate a logger field.
* Example:
* <pre>
* &#64;Log
* public class LogExample {
* }
* </pre>
*
* will generate:
*
* <pre>
* public class LogExample {
* private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogExample.class);
* }
* </pre>
*
* If you do not want to use the annotated class as the logger parameter, you can specify an alternate class.
* Example:
* <pre>
* &#64;Log(java.util.List.class)
* public class LogExample {
* }
* </pre>
*
* will generate:
*
* <pre>
* public class LogExample {
* private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(java.util.List.class);
* }
* </pre>
*
* This annotation is valid for classes and enumerations.<br />
*
* @see lombok.extern.apachecommons.Log lombok.extern.apachecommons.Log
* @see lombok.extern.jul.Log lombok.extern.jul.Log
* @see lombok.extern.log4j.Log lombok.extern.log4j.Log
*/
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.TYPE)
public @interface Log {
/**
* If you do not want to use the annotated class as the logger parameter, you can specify an alternate class here.
* <br />
* NB: If {@code void.class} is passed, it will be considered the same as specifying no parameter.
*/
Class<?> value() default void.class;
}
+16 -16
View File
@@ -112,51 +112,51 @@ public class HandleLog {
}
/**
* Handles the {@link lombok.commons.Log} annotation for javac.
* Handles the {@link lombok.extern.apachecommons.Log} annotation for javac.
*/
@ProviderFor(JavacAnnotationHandler.class)
public static class HandleCommonsLog implements JavacAnnotationHandler<lombok.commons.Log> {
@Override public boolean handle(AnnotationValues<lombok.commons.Log> annotation, JCAnnotation ast, JavacNode annotationNode) {
public static class HandleCommonsLog implements JavacAnnotationHandler<lombok.extern.apachecommons.Log> {
@Override public boolean handle(AnnotationValues<lombok.extern.apachecommons.Log> annotation, JCAnnotation ast, JavacNode annotationNode) {
return processAnnotation(LoggingFramework.COMMONS, annotation, annotationNode);
}
}
/**
* Handles the {@link lombok.jul.Log} annotation for javac.
* Handles the {@link lombok.extern.jul.Log} annotation for javac.
*/
@ProviderFor(JavacAnnotationHandler.class)
public static class HandleJulLog implements JavacAnnotationHandler<lombok.jul.Log> {
@Override public boolean handle(AnnotationValues<lombok.jul.Log> annotation, JCAnnotation ast, JavacNode annotationNode) {
public static class HandleJulLog implements JavacAnnotationHandler<lombok.extern.jul.Log> {
@Override public boolean handle(AnnotationValues<lombok.extern.jul.Log> annotation, JCAnnotation ast, JavacNode annotationNode) {
return processAnnotation(LoggingFramework.JUL, annotation, annotationNode);
}
}
/**
* Handles the {@link lombok.log4j.Log} annotation for javac.
* Handles the {@link lombok.extern.log4j.Log} annotation for javac.
*/
@ProviderFor(JavacAnnotationHandler.class)
public static class HandleLog4jLog implements JavacAnnotationHandler<lombok.log4j.Log> {
@Override public boolean handle(AnnotationValues<lombok.log4j.Log> annotation, JCAnnotation ast, JavacNode annotationNode) {
public static class HandleLog4jLog implements JavacAnnotationHandler<lombok.extern.log4j.Log> {
@Override public boolean handle(AnnotationValues<lombok.extern.log4j.Log> annotation, JCAnnotation ast, JavacNode annotationNode) {
return processAnnotation(LoggingFramework.LOG4J, annotation, annotationNode);
}
}
/**
* Handles the {@link lombok.slf4j.Log} annotation for javac.
* Handles the {@link lombok.extern.slf4j.Log} annotation for javac.
*/
@ProviderFor(JavacAnnotationHandler.class)
public static class HandleSlf4jLog implements JavacAnnotationHandler<lombok.slf4j.Log> {
@Override public boolean handle(AnnotationValues<lombok.slf4j.Log> annotation, JCAnnotation ast, JavacNode annotationNode) {
public static class HandleSlf4jLog implements JavacAnnotationHandler<lombok.extern.slf4j.Log> {
@Override public boolean handle(AnnotationValues<lombok.extern.slf4j.Log> annotation, JCAnnotation ast, JavacNode annotationNode) {
return processAnnotation(LoggingFramework.SLF4J, annotation, annotationNode);
}
}
enum LoggingFramework {
// private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TargetType.class);
COMMONS(lombok.jul.Log.class, "org.apache.commons.logging.Log", "org.apache.commons.logging.LogFactory.getLog"),
COMMONS(lombok.extern.jul.Log.class, "org.apache.commons.logging.Log", "org.apache.commons.logging.LogFactory.getLog"),
// private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(TargetType.class.getName());
JUL(lombok.jul.Log.class, "java.util.logging.Logger", "java.util.logging.Logger.getLogger") {
JUL(lombok.extern.jul.Log.class, "java.util.logging.Logger", "java.util.logging.Logger.getLogger") {
@Override public JCExpression createFactoryParameter(JavacNode typeNode, String typeName) {
TreeMaker maker = typeNode.getTreeMaker();
JCExpression classAccess = super.createFactoryParameter(typeNode, typeName);
@@ -166,10 +166,10 @@ public class HandleLog {
},
// private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(TargetType.class);
LOG4J(lombok.jul.Log.class, "org.apache.log4j.Logger", "org.apache.log4j.Logger.getLogger"),
LOG4J(lombok.extern.jul.Log.class, "org.apache.log4j.Logger", "org.apache.log4j.Logger.getLogger"),
// private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TargetType.class);
SLF4J(lombok.slf4j.Log.class, "org.slf4j.Logger", "org.slf4j.LoggerFactory.getLogger"),
SLF4J(lombok.extern.slf4j.Log.class, "org.slf4j.Logger", "org.slf4j.LoggerFactory.getLogger"),
;
+2 -2
View File
@@ -2,6 +2,6 @@
interface Interfaces {
int x = 10;
void y();
public static final int a = 20;
public abstract void b();
int a = 20;
void b();
}
@@ -1,4 +1,4 @@
@lombok.commons.Log class LoggerCommons {
@lombok.extern.apachecommons.Log class LoggerCommons {
private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LoggerCommons.class);
<clinit>() {
}
@@ -6,7 +6,7 @@
super();
}
}
@lombok.commons.Log(String.class) class LoggerCommonsString {
@lombok.extern.apachecommons.Log(String.class) class LoggerCommonsString {
private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(String.class);
<clinit>() {
}
@@ -14,7 +14,7 @@
super();
}
}
@lombok.commons.Log(java.lang.String.class) class LoggerCommonsJavaLangString {
@lombok.extern.apachecommons.Log(java.lang.String.class) class LoggerCommonsJavaLangString {
private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(java.lang.String.class);
<clinit>() {
}
@@ -1,4 +1,4 @@
@lombok.jul.Log class LoggerJul {
@lombok.extern.jul.Log class LoggerJul {
private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LoggerJul.class.getName());
<clinit>() {
}
@@ -6,7 +6,7 @@
super();
}
}
@lombok.jul.Log(String.class) class LoggerJulString {
@lombok.extern.jul.Log(String.class) class LoggerJulString {
private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(String.class.getName());
<clinit>() {
}
@@ -14,7 +14,7 @@
super();
}
}
@lombok.jul.Log(java.lang.String.class) class LoggerJulJavaLangString {
@lombok.extern.jul.Log(java.lang.String.class) class LoggerJulJavaLangString {
private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(java.lang.String.class.getName());
<clinit>() {
}
@@ -1,4 +1,4 @@
@lombok.log4j.Log class LoggerLog4j {
@lombok.extern.log4j.Log class LoggerLog4j {
private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LoggerLog4j.class);
<clinit>() {
}
@@ -6,7 +6,7 @@
super();
}
}
@lombok.log4j.Log(String.class) class LoggerLog4jString {
@lombok.extern.log4j.Log(String.class) class LoggerLog4jString {
private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(String.class);
<clinit>() {
}
@@ -14,7 +14,7 @@
super();
}
}
@lombok.log4j.Log(java.lang.String.class) class LoggerLog4jJavaLangString {
@lombok.extern.log4j.Log(java.lang.String.class) class LoggerLog4jJavaLangString {
private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(java.lang.String.class);
<clinit>() {
}
@@ -1,4 +1,4 @@
@lombok.slf4j.Log class LoggerSlf4j {
@lombok.extern.slf4j.Log class LoggerSlf4j {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4j.class);
<clinit>() {
}
@@ -7,7 +7,7 @@
}
}
class LoggerSlf4jOuter {
static @lombok.slf4j.Log class Inner {
static @lombok.extern.slf4j.Log class Inner {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jOuter.Inner.class);
<clinit>() {
}
@@ -1,4 +1,4 @@
@lombok.slf4j.Log class LoggerSlf4jAlreadyExists {
@lombok.extern.slf4j.Log class LoggerSlf4jAlreadyExists {
int log;
LoggerSlf4jAlreadyExists() {
super();
@@ -1,4 +1,4 @@
@lombok.slf4j.Log(String[].class) class LoggerSlf4jClassOfArray {
@lombok.extern.slf4j.Log(String[].class) class LoggerSlf4jClassOfArray {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(String[].class);
<clinit>() {
}
@@ -2,6 +2,6 @@ class LoggerSlf4jOnNonType {
LoggerSlf4jOnNonType() {
super();
}
@lombok.slf4j.Log void foo() {
@lombok.extern.slf4j.Log void foo() {
}
}
@@ -1,8 +1,8 @@
@lombok.slf4j.Log interface LoggerSlf4jTypesInterface {
@lombok.extern.slf4j.Log interface LoggerSlf4jTypesInterface {
}
@lombok.slf4j.Log @interface LoggerSlf4jTypesAnnotation {
@lombok.extern.slf4j.Log @interface LoggerSlf4jTypesAnnotation {
}
@lombok.slf4j.Log enum LoggerSlf4jTypesEnum {
@lombok.extern.slf4j.Log enum LoggerSlf4jTypesEnum {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jTypesEnum.class);
<clinit>() {
}
@@ -10,7 +10,7 @@
super();
}
}
@lombok.slf4j.Log enum LoggerSlf4jTypesEnumWithElement {
@lombok.extern.slf4j.Log enum LoggerSlf4jTypesEnumWithElement {
FOO(),
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jTypesEnumWithElement.class);
<clinit>() {
@@ -20,7 +20,7 @@
}
}
interface LoggerSlf4jTypesInterfaceOuter {
@lombok.slf4j.Log class Inner {
@lombok.extern.slf4j.Log class Inner {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jTypesInterfaceOuter.Inner.class);
<clinit>() {
}
@@ -1,4 +1,4 @@
@lombok.slf4j.Log(String.class) class LoggerSlf4jWithClass {
@lombok.extern.slf4j.Log(String.class) class LoggerSlf4jWithClass {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(String.class);
<clinit>() {
}
@@ -6,7 +6,7 @@
super();
}
}
@lombok.slf4j.Log(java.util.List.class) class LoggerSlf4jWithClassList {
@lombok.extern.slf4j.Log(java.util.List.class) class LoggerSlf4jWithClassList {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(java.util.List.class);
<clinit>() {
}
@@ -14,7 +14,7 @@
super();
}
}
@lombok.slf4j.Log(value = java.lang.String.class) class LoggerSlf4jWithClassValue {
@lombok.extern.slf4j.Log(value = java.lang.String.class) class LoggerSlf4jWithClassValue {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(java.lang.String.class);
<clinit>() {
}
@@ -22,7 +22,7 @@
super();
}
}
@lombok.slf4j.Log(void.class) class LoggerSlf4jWithClassVoid {
@lombok.extern.slf4j.Log(void.class) class LoggerSlf4jWithClassVoid {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithClassVoid.class);
<clinit>() {
}
@@ -1,5 +1,5 @@
package before;
@lombok.slf4j.Log class LoggerSlf4jWithPackage {
@lombok.extern.slf4j.Log class LoggerSlf4jWithPackage {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(before.LoggerSlf4jWithPackage.class);
<clinit>() {
}
@@ -8,7 +8,7 @@ package before;
}
}
class LoggerSlf4jWithPackageOuter {
static @lombok.slf4j.Log class Inner {
static @lombok.extern.slf4j.Log class Inner {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(before.LoggerSlf4jWithPackageOuter.Inner.class);
<clinit>() {
}
@@ -1,11 +1,11 @@
@lombok.commons.Log
@lombok.extern.apachecommons.Log
class LoggerCommons {
}
@lombok.commons.Log(String.class)
@lombok.extern.apachecommons.Log(String.class)
class LoggerCommonsString {
}
@lombok.commons.Log(java.lang.String.class)
@lombok.extern.apachecommons.Log(java.lang.String.class)
class LoggerCommonsJavaLangString {
}
@@ -1,11 +1,11 @@
@lombok.jul.Log
@lombok.extern.jul.Log
class LoggerJul {
}
@lombok.jul.Log(String.class)
@lombok.extern.jul.Log(String.class)
class LoggerJulString {
}
@lombok.jul.Log(java.lang.String.class)
@lombok.extern.jul.Log(java.lang.String.class)
class LoggerJulJavaLangString {
}
@@ -1,11 +1,11 @@
@lombok.log4j.Log
@lombok.extern.log4j.Log
class LoggerLog4j {
}
@lombok.log4j.Log(String.class)
@lombok.extern.log4j.Log(String.class)
class LoggerLog4jString {
}
@lombok.log4j.Log(java.lang.String.class)
@lombok.extern.log4j.Log(java.lang.String.class)
class LoggerLog4jJavaLangString {
}
@@ -1,8 +1,8 @@
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
class LoggerSlf4j {
}
class LoggerSlf4jOuter {
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
static class Inner {
}
@@ -1,4 +1,4 @@
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
class LoggerSlf4jAlreadyExists {
int log;
}
@@ -1,3 +1,3 @@
@lombok.slf4j.Log(String[].class)
@lombok.extern.slf4j.Log(String[].class)
class LoggerSlf4jClassOfArray {
}
@@ -1,5 +1,5 @@
class LoggerSlf4jOnNonType {
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
void foo() {
}
}
@@ -1,18 +1,18 @@
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
interface LoggerSlf4jTypesInterface {
}
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
@interface LoggerSlf4jTypesAnnotation {
}
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
enum LoggerSlf4jTypesEnum {
}
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
enum LoggerSlf4jTypesEnumWithElement {
FOO;
}
interface LoggerSlf4jTypesInterfaceOuter {
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
class Inner {
}
}
@@ -1,12 +1,12 @@
@lombok.slf4j.Log(String.class)
@lombok.extern.slf4j.Log(String.class)
class LoggerSlf4jWithClass {
}
@lombok.slf4j.Log(java.util.List.class)
@lombok.extern.slf4j.Log(java.util.List.class)
class LoggerSlf4jWithClassList {
}
@lombok.slf4j.Log(value = java.lang.String.class)
@lombok.extern.slf4j.Log(value = java.lang.String.class)
class LoggerSlf4jWithClassValue {
}
@lombok.slf4j.Log(void.class)
@lombok.extern.slf4j.Log(void.class)
class LoggerSlf4jWithClassVoid {
}
@@ -1,9 +1,9 @@
package before;
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
class LoggerSlf4jWithPackage {
}
class LoggerSlf4jWithPackageOuter {
@lombok.slf4j.Log
@lombok.extern.slf4j.Log
static class Inner {
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
import lombok.slf4j.Log;
import lombok.extern.slf4j.Log;
@Log
public class LogExample {
+8 -8
View File
@@ -20,14 +20,14 @@
</p><p>
There are four <code>@Log</code> choices available:<br />
<dl>
<dt><code>@lombok.commons.Log</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://commons.apache.org/logging/apidocs/org/apache/commons/logging/Log.html">org.apache.commons.logging.Log</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://commons.apache.org/logging/apidocs/org/apache/commons/logging/LogFactory.html#getLog(java.lang.Class)">org.apache.commons.logging.LogFactory.getLog</a>(TargetType.<span class="keyword">class</span>);</code></dd>
<dt><code>@lombok.jul.Log</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/Logger.html">java.util.logging.Logger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/Logger.html#getLogger(java.lang.String)">java.util.logging.Logger.getLogger</a>(TargetType.<span class="keyword">class</span>.getName());</code></dd>
<dt><code>@lombok.log4j.Log</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Logger.html">org.apache.log4j.Logger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Logger.html#getLogger(java.lang.Class)">org.apache.log4j.Logger.getLogger</a>(TargetType.<span class="keyword">class</span>);</code></dd>
<dt><code>@lombok.slf4j.Log</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://www.slf4j.org/api/org/slf4j/Logger.html">org.slf4j.Logger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://www.slf4j.org/apidocs/org/slf4j/LoggerFactory.html#getLogger(java.lang.Class)">org.slf4j.LoggerFactory.getLogger</a>(TargetType.<span class="keyword">class</span>);</code></dd>
<dt><code>@lombok.extern.apachecommons.Log</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://commons.apache.org/logging/apidocs/org/apache/commons/logging/Log.html">org.apache.commons.logging.Log</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://commons.apache.org/logging/apidocs/org/apache/commons/logging/LogFactory.html#getLog(java.lang.Class)">org.apache.commons.logging.LogFactory.getLog</a>(LogExample.<span class="keyword">class</span>);</code></dd>
<dt><code>@lombok.extern.jul.Log</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/Logger.html">java.util.logging.Logger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/logging/Logger.html#getLogger(java.lang.String)">java.util.logging.Logger.getLogger</a>(LogExample.<span class="keyword">class</span>.getName());</code></dd>
<dt><code>@lombok.extern.log4j.Log</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Logger.html">org.apache.log4j.Logger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Logger.html#getLogger(java.lang.Class)">org.apache.log4j.Logger.getLogger</a>(LogExample.<span class="keyword">class</span>);</code></dd>
<dt><code>@lombok.extern.slf4j.Log</code></dt>
<dd>Creates <code><span class="keyword">private&nbsp;static&nbsp;final&nbsp;</span><a href="http://www.slf4j.org/api/org/slf4j/Logger.html">org.slf4j.Logger</a>&nbsp;<span class="staticfield">log</span>&nbsp;=&nbsp;<a href="http://www.slf4j.org/apidocs/org/slf4j/LoggerFactory.html#getLogger(java.lang.Class)">org.slf4j.LoggerFactory.getLogger</a>(LogExample.<span class="keyword">class</span>);</code></dd>
</dl>
</p>
<p>