[Java] Class AbstractASTTransformation
- org.codehaus.groovy.transform.AbstractASTTransformation
- All Implemented Interfaces and Traits:
- ASTTransformation, ErrorCollecting, org.objectweb.asm.Opcodes
public abstract class AbstractASTTransformation extends Object implements ASTTransformation, ErrorCollecting, org.objectweb.asm.Opcodes
Field Summary
Modifiers | Name | Description |
---|---|---|
static ClassNode | RETENTION_CLASSNODE | |
protected SourceUnit | sourceUnit |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public void |
addError(String msg, ASTNode expr) | |
protected boolean |
checkIncludeExclude(AnnotationNode node, List<String> excludes, List<String> includes, String typeName) | |
protected void |
checkIncludeExclude(AnnotationNode node, List<String> excludes, List<String> includes, List<ClassNode> excludeTypes, List<ClassNode> includeTypes, String typeName) | |
protected boolean |
checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, String typeName) | |
protected void |
checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, List<ClassNode> excludeTypes, List<ClassNode> includeTypes, String typeName) | |
protected boolean |
checkNotInterface(ClassNode cNode, String annotationName) | |
public boolean |
checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields) | |
public boolean |
checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties) | |
public boolean |
checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties, boolean includeSuperFields, boolean includeStatic) | |
protected List<AnnotationNode> |
copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, String myTypeName) Copies all candidateAnnotations with retention policy RetentionPolicy.RUNTIME and RetentionPolicy.CLASS. | |
protected List<AnnotationNode> |
copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, String myTypeName, boolean includeGenerated) Copies all candidateAnnotations with retention policy RetentionPolicy.RUNTIME and RetentionPolicy.CLASS. | |
public static boolean |
deemedInternalName(String name) | |
public String |
getAnnotationName() If the transform is associated with a single annotation, returns a name suitable for displaying in error messages. | |
public List<ClassNode> |
getClassList(AnnotationNode anno, String name) | |
public List<ClassNode> |
getMemberClassList(AnnotationNode anno, String name) | |
public ClassNode |
getMemberClassValue(AnnotationNode node, String name) | |
public ClassNode |
getMemberClassValue(AnnotationNode node, String name, ClassNode defaultValue) | |
public int |
getMemberIntValue(AnnotationNode node, String name) | |
public static List<String> |
getMemberList(AnnotationNode anno, String name) | |
public static List<String> |
getMemberStringList(AnnotationNode anno, String name) | |
public static String |
getMemberStringValue(AnnotationNode node, String name, String defaultValue) | |
public static String |
getMemberStringValue(AnnotationNode node, String name) | |
public Object |
getMemberValue(AnnotationNode node, String name) | |
public boolean |
hasAnnotation(ClassNode node, ClassNode annotation) | |
protected void |
init(ASTNode[] nodes, SourceUnit sourceUnit) | |
public boolean |
memberHasValue(AnnotationNode node, String name, Object value) | |
public static ClassNode |
nonGeneric(ClassNode type)
| |
public static boolean |
shouldSkip(String name, List<String> excludes, List<String> includes) | |
public static boolean |
shouldSkip(String name, List<String> excludes, List<String> includes, boolean allNames) | |
public static boolean |
shouldSkipOnDescriptor(boolean checkReturn, Map genericsSpec, MethodNode mNode, List<ClassNode> excludeTypes, List<ClassNode> includeTypes) | |
public static boolean |
shouldSkipOnDescriptorUndefinedAware(boolean checkReturn, Map genericsSpec, MethodNode mNode, List<ClassNode> excludeTypes, List<ClassNode> includeTypes) | |
public static boolean |
shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes) | |
public static boolean |
shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes, boolean allNames) | |
public static List<String> |
tokenize(String rawExcludes) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail
public static final ClassNode RETENTION_CLASSNODE
protected SourceUnit sourceUnit
Method Detail
public void addError(String msg, ASTNode expr)
@Deprecated protected boolean checkIncludeExclude(AnnotationNode node, List<String> excludes, List<String> includes, String typeName)
@Deprecated protected void checkIncludeExclude(AnnotationNode node, List<String> excludes, List<String> includes, List<ClassNode> excludeTypes, List<ClassNode> includeTypes, String typeName)
protected boolean checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, String typeName)
protected void checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, List<ClassNode> excludeTypes, List<ClassNode> includeTypes, String typeName)
protected boolean checkNotInterface(ClassNode cNode, String annotationName)
public boolean checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields)
public boolean checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties)
public boolean checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties, boolean includeSuperFields, boolean includeStatic)
protected List<AnnotationNode> copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, String myTypeName)
Copies all candidateAnnotations with retention policy RetentionPolicy.RUNTIME and RetentionPolicy.CLASS.
Annotations with GeneratedClosure members are not supported for now.
protected List<AnnotationNode> copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, String myTypeName, boolean includeGenerated)
Copies all candidateAnnotations with retention policy RetentionPolicy.RUNTIME and RetentionPolicy.CLASS.
Annotations with GeneratedClosure members are not supported for now.
public static boolean deemedInternalName(String name)
public String getAnnotationName()
If the transform is associated with a single annotation, returns a name suitable for displaying in error messages.
- Returns:
- The simple name of the annotation including the "@" or null if no such name is defined
@Deprecated public List<ClassNode> getClassList(AnnotationNode anno, String name)
public List<ClassNode> getMemberClassList(AnnotationNode anno, String name)
public ClassNode getMemberClassValue(AnnotationNode node, String name)
public ClassNode getMemberClassValue(AnnotationNode node, String name, ClassNode defaultValue)
public int getMemberIntValue(AnnotationNode node, String name)
@Deprecated public static List<String> getMemberList(AnnotationNode anno, String name)
public static List<String> getMemberStringList(AnnotationNode anno, String name)
public static String getMemberStringValue(AnnotationNode node, String name, String defaultValue)
public static String getMemberStringValue(AnnotationNode node, String name)
public Object getMemberValue(AnnotationNode node, String name)
public boolean hasAnnotation(ClassNode node, ClassNode annotation)
protected void init(ASTNode[] nodes, SourceUnit sourceUnit)
public boolean memberHasValue(AnnotationNode node, String name, Object value)
@Deprecated public static ClassNode nonGeneric(ClassNode type)
- deprecated:
- use GenericsUtils#nonGeneric
public static boolean shouldSkip(String name, List<String> excludes, List<String> includes)
public static boolean shouldSkip(String name, List<String> excludes, List<String> includes, boolean allNames)
@Deprecated public static boolean shouldSkipOnDescriptor(boolean checkReturn, Map genericsSpec, MethodNode mNode, List<ClassNode> excludeTypes, List<ClassNode> includeTypes)
public static boolean shouldSkipOnDescriptorUndefinedAware(boolean checkReturn, Map genericsSpec, MethodNode mNode, List<ClassNode> excludeTypes, List<ClassNode> includeTypes)
public static boolean shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes)
public static boolean shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes, boolean allNames)
public static List<String> tokenize(String rawExcludes)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/codehaus/groovy/transform/AbstractASTTransformation.html