| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | |
| public abstract static class | |
| public static interface | LogASTTransformation.LoggingStrategy
A LoggingStrategy defines how to wire a new logger instance into an existing class. |
| public static interface | LogASTTransformation.LoggingStrategyV2
A LoggingStrategy defines how to wire a new logger instance into an existing class. |
| Modifier and Type | Field and Description |
|---|---|
| private CompilationUnit | |
| public static final String | |
| public static final String | DEFAULT_CATEGORY_NAME
This is just a dummy value used because String annotations values can not be null. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static LogASTTransformation. | createLoggingStrategy(final AnnotationNode logAnnotation, final ClassLoader classLoader, final ClassLoader xformLoader)
|
| private static String | |
| private int | |
| private static String | |
| public void | setCompilationUnit(final CompilationUnit compilationUnit)
Implements groovy. |
| public void | visit(final ASTNode[]
The ASTnodes when the call was triggered. Element 0 is the AnnotationNode that triggered this
annotation to be activated. Element 1 is the AnnotatedNode decorated, such as a MethodNode or ClassNode. For
global transformations it is usually safe to ignore this parameter. nodes, final SourceUnit The source unit being compiled. The source unit may contain several classes. For global transformations,
information about the AST can be retrieved from this object. sourceUnit)Implements org. |
| compilationUnit | back to summary |
|---|---|
| private CompilationUnit compilationUnit | |
| DEFAULT_ACCESS_MODIFIER | back to summary |
|---|---|
| public static final String DEFAULT_ACCESS_MODIFIER | |
| DEFAULT_CATEGORY_NAME | back to summary |
|---|---|
| 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. | |
| LogASTTransformation | back to summary |
|---|---|
| public LogASTTransformation() | |
| createLoggingStrategy | back to summary |
|---|---|
| private static LogASTTransformation. | |
| lookupCategoryName | back to summary |
|---|---|
| private static String lookupCategoryName(final AnnotationNode logAnnotation) | |
| lookupLogFieldModifiers | back to summary |
|---|---|
| private int lookupLogFieldModifiers(final AnnotatedNode targetClass, final AnnotationNode logAnnotation) | |
| lookupLogFieldName | back to summary |
|---|---|
| private static String lookupLogFieldName(final AnnotationNode logAnnotation) | |
| setCompilationUnit | back to summary |
|---|---|
| public void setCompilationUnit(final CompilationUnit compilationUnit) Implements groovy.
| |
| visit | back to summary |
|---|---|
| public void visit(final ASTNode[] nodes, final SourceUnit sourceUnit) Implements org. Doc from org. The method is invoked when an AST Transformation is active. For local transformations, it is invoked once each time the local annotation is encountered. For global transformations, it is invoked once for every source unit, which is typically a source file.
| |
| Modifier and Type | Field and Description |
|---|---|
| protected final GroovyClassLoader |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected ClassNode | |
| public String | getCategoryName(final ClassNode classNode, final String categoryName)
Implements org. |
| loader | back to summary |
|---|---|
| protected final GroovyClassLoader loader | |
| AbstractLoggingStrategy | back to summary |
|---|---|
| protected AbstractLoggingStrategy(final GroovyClassLoader loader) | |
| AbstractLoggingStrategy | back to summary |
|---|---|
| protected AbstractLoggingStrategy() | |
| classNode | back to summary |
|---|---|
| protected ClassNode classNode(final String name) | |
| getCategoryName | back to summary |
|---|---|
| public String getCategoryName(final ClassNode classNode, final String categoryName) Implements org.
| |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public FieldNode | addLoggerFieldToClass(final ClassNode
the class that was originally annotated with the Log transformation. classNode, final String the name of the logger field fieldName, final String the name of the logging category categoryName)Implements org. |
| AbstractLoggingStrategyV2 | back to summary |
|---|---|
| protected AbstractLoggingStrategyV2(final GroovyClassLoader loader) | |
| AbstractLoggingStrategyV2 | back to summary |
|---|---|
| protected AbstractLoggingStrategyV2() | |
| addLoggerFieldToClass | back to summary |
|---|---|
| public FieldNode addLoggerFieldToClass(final ClassNode classNode, final String fieldName, final String categoryName) Implements org. Doc from org. In this method, you are given a ClassNode, a field name and a category name, and you must add a new Field onto the class. Return the result of the ClassNode.addField operations. | |
| Modifier and Type | Method and Description |
|---|---|
| public FieldNode | Returns: the FieldNode instance that was created and added to the classthe class that was originally annotated with the Log transformation. classNode, String the name of the logger field fieldName, String the name of the logging category categoryName)In this method, you are given a ClassNode, a field name and a category name, and you must add a new Field onto the class. |
| public String | |
| public boolean | |
| public Expression |
| addLoggerFieldToClass | back to summary |
|---|---|
| public FieldNode addLoggerFieldToClass(ClassNode classNode, String fieldName, String categoryName) In this method, you are given a ClassNode, a field name and a category name, and you must add a new Field onto the class. Return the result of the ClassNode.addField operations. | |
| getCategoryName | back to summary |
|---|---|
| public String getCategoryName(ClassNode classNode, String categoryName) | |
| isLoggingMethod | back to summary |
|---|---|
| public boolean isLoggingMethod(String methodName) | |
| wrapLoggingMethodCall | back to summary |
|---|---|
| public Expression wrapLoggingMethodCall(Expression logVariable, String methodName, Expression originalExpression) | |
| Modifier and Type | Method and Description |
|---|---|
| public FieldNode | Returns: the FieldNode instance that was created and added to the classthe class that was originally annotated with the Log transformation. classNode, String the name of the logger field fieldName, String the name of the logging category categoryName, int the modifiers (private, final, et. al.) of the logger field fieldModifiers)In this method, you are given a ClassNode, a field name and a category name, and you must add a new Field onto the class. |
| addLoggerFieldToClass | back to summary |
|---|---|
| public FieldNode addLoggerFieldToClass(ClassNode classNode, String fieldName, String categoryName, int fieldModifiers) In this method, you are given a ClassNode, a field name and a category name, and you must add a new Field onto the class. Return the result of the ClassNode.addField operations.
| |