On this page
[Java] Class LogASTTransformation
- org.codehaus.groovy.transform.LogASTTransformation
- All Implemented Interfaces and Traits:
- CompilationUnitAware
@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS)
public class LogASTTransformation
extends AbstractASTTransformation
implements CompilationUnitAware
This class provides an AST Transformation to add a log field to a class.
Nested Class Summary
Modifiers | Name | Description |
---|---|---|
static class |
LogASTTransformation.AbstractLoggingStrategy |
|
static class |
LogASTTransformation.AbstractLoggingStrategyV2 |
|
interface |
LogASTTransformation.LoggingStrategy |
A LoggingStrategy defines how to wire a new logger instance into an existing class. |
interface |
LogASTTransformation.LoggingStrategyV2 |
A LoggingStrategy defines how to wire a new logger instance into an existing class. |
Field Summary
Modifiers | Name | Description |
---|---|---|
static String |
DEFAULT_ACCESS_MODIFIER |
|
static String |
DEFAULT_CATEGORY_NAME |
This is just a dummy value used because String annotations values can not be null. |
Fields inherited from class | Fields |
---|---|
class AbstractASTTransformation |
RETENTION_CLASSNODE, sourceUnit |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
protected SourceUnit |
getSourceUnit() |
|
public void |
setCompilationUnit(CompilationUnit compilationUnit) |
|
public Expression |
transform(Expression exp) |
|
public void |
visit(ASTNode[] nodes, SourceUnit sourceUnit) |
|
public void |
visitClass(ClassNode node) |
Inherited Methods Summary
Field Detail
public static final String DEFAULT_ACCESS_MODIFIER
public static final String DEFAULT_CATEGORY_NAME
This is just a dummy value used because String annotations values can not be null. It will be replaced by the fully qualified class name of the annotated class.
Method Detail
@Override protected SourceUnit getSourceUnit()
@Override public void setCompilationUnit(CompilationUnit compilationUnit)
@Override public Expression transform(Expression exp)
@Override public void visit(ASTNode[] nodes, SourceUnit sourceUnit)
@Override public void visitClass(ClassNode node)
© 2003-2022 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/4.0.0/html/gapi/org/codehaus/groovy/transform/LogASTTransformation.html