@AnnotationHandlerFor(value=MVCAware.class) public class MVCAwareASTTransformation extends AbstractASTTransformation implements MVCAwareConstants, AnnotationHandler
@MVCAware
annotation.COLLECTIONS_CLASS, GRIFFON_APPLICATION_TYPE, INJECT_TYPE, NAMED_TYPE
C, GRIFFON_CONTROLLER_TYPE, GRIFFON_MODEL_TYPE, GRIFFON_MVC_ARTIFACT_TYPE, GRIFFON_VIEW_TYPE, M, METHOD_CREATE_MVC, METHOD_CREATE_MVC_GROUP, METHOD_DESTROY_MVC_GROUP, METHOD_WITH_MVC, METHOD_WITH_MVC_GROUP, METHODS, MVC, MVC_FUNCTION_TYPE, MVC_GROUP, MVC_GROUP_FUNCTION_TYPE, MVC_GROUP_MANAGER_PROPERTY, MVC_GROUP_MANAGER_TYPE, MVC_HANDLER_TYPE, TYPED_MVC_GROUP, TYPED_MVC_GROUP_FUNCTION_TYPE, V
APPLICATION, BOOLEAN, GRIFFON_CORE_CALLABLEWITHARGS, GRIFFON_CORE_RUNNABLEWITHARGS, INT, JAVA_LANG_CLASS, JAVA_LANG_OBJECT, JAVA_LANG_RUNNABLE, JAVA_LANG_STRING, JAVA_NET_URL, JAVA_UTIL_COLLECTION, JAVA_UTIL_LIST, JAVA_UTIL_MAP, JAVAX_ANNOTATION_NONNULL, JAVAX_ANNOTATION_NULLABLE, JAVAX_INJECT_INJECT, JAVAX_INJECT_NAMED, NAME, R, T, VOID, WILDCARD
Constructor and Description |
---|
MVCAwareASTTransformation() |
Modifier and Type | Method and Description |
---|---|
static void |
addMVCHandlerIfNeeded(org.codehaus.groovy.control.SourceUnit source,
org.codehaus.groovy.ast.ClassNode classNode) |
static void |
apply(org.codehaus.groovy.ast.ClassNode declaringClass)
Adds the necessary field and methods to support resource locating.
|
static boolean |
hasMVCAwareAnnotation(org.codehaus.groovy.ast.AnnotatedNode node)
Convenience method to see if an annotated node is
@MVCAware . |
void |
visit(org.codehaus.groovy.ast.ASTNode[] nodes,
org.codehaus.groovy.control.SourceUnit source)
Handles the bulk of the processing, mostly delegating to other methods.
|
addDelegateMethods, addError, applicationExpression, applicationProperty, checkNodesForAnnotationAndType, emptyMap, injectApplication, injectedField, injectedField, makeClassSafe, makeClassSafe, makeClassSafe, makeClassSafe0, makeClassSafeWithGenerics, makeClassSafeWithGenerics, makeClassSafeWithGenerics, makeGenericsType, makeGenericsType, makeGenericsType, memberHasValue, needsDelegate, newClass
public static boolean hasMVCAwareAnnotation(org.codehaus.groovy.ast.AnnotatedNode node)
@MVCAware
.node
- the node to checkpublic void visit(org.codehaus.groovy.ast.ASTNode[] nodes, org.codehaus.groovy.control.SourceUnit source)
visit
in interface org.codehaus.groovy.transform.ASTTransformation
nodes
- the ast nodessource
- the source unit for the nodespublic static void addMVCHandlerIfNeeded(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
public static void apply(org.codehaus.groovy.ast.ClassNode declaringClass)
declaringClass
- the class to which we add the support field and methods