public abstract class AbstractLoggingProcessor extends AbstractClassModificationProcessor
context| Constructor and Description |
|---|
AbstractLoggingProcessor()
Creates a new instance of
AbstractLoggingProcessor. |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getLoggerFieldPrefix()
Returns the prefix of the field that will be created to hold the logger.
|
protected java.lang.String |
getLoggerInitialization(javassist.CtClass cl)
Returns the initial value of the logger.
|
protected java.lang.String |
getLoggerType()
Returns the canonical name of the loggers class.
|
protected java.lang.String |
getLogMethodName(LogLevel level)
Returns the name of the loggers log method.
|
protected javassist.CtField |
injectLogger(ByteCodeHelper helper,
javassist.CtClass ctClass)
Creates the field that holds the logger for the given class.
|
doRun, init, processClass, runpublic AbstractLoggingProcessor()
AbstractLoggingProcessor.protected java.lang.String getLogMethodName(LogLevel level)
level - The log level.protected java.lang.String getLoggerType()
Returns the canonical name of the loggers class.
Note: The class of the logger must be available during the compilation (e.g. included as a maven dependency).
protected java.lang.String getLoggerFieldPrefix()
protected java.lang.String getLoggerInitialization(javassist.CtClass cl)
cl - The class in which the logger will be used.protected javassist.CtField injectLogger(ByteCodeHelper helper, javassist.CtClass ctClass) throws javassist.CannotCompileException
helper - The helper to be used.ctClass - The class in which the logger will be used.javassist.CannotCompileException - If the changes could not be compiled.Copyright © 2015. All Rights Reserved.