ArtefactTypeAstTransformation (Grails 2.4.4)
Date: 2014-10-28

Package: org.codehaus.groovy.grails.compiler.injection

## [Java] Class ArtefactTypeAstTransformation

- org.codehaus.groovy.grails.compiler.injection.ArtefactTypeAstTransformation

- A transformation used to apply transformers to classes not located in Grails directory structure. For example any class can be annotated with @Artefact("Controller") to make it into a controller no matter what the location.

  Authors:
    Graeme Rocher
  Since:
    2.0

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static void` | `doPerformInjectionOnArtefactType(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.ClassNode cNode, java.lang.String artefactType)`
    `static java.util.List<ClassInjector>` | `findInjectors(java.lang.String artefactType, ClassInjector[] classInjectors)`
    `protected org.codehaus.groovy.ast.ClassNode` | `getAnnotationType()`
    `protected java.lang.Class<?>` | `getAstAppliedMarkerClass()`
    `static boolean` | `hasArtefactType(java.lang.String artefactType, GrailsArtefactClassInjector gace)`
    `protected boolean` | `isApplied(org.codehaus.groovy.ast.ClassNode cNode)`
    `protected boolean` | `isArtefactAnnotationNode(org.codehaus.groovy.ast.AnnotationNode annotationNode)`
    `protected void` | `markApplied(org.codehaus.groovy.ast.ClassNode classNode)`
    `static void` | `performInjection(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.ClassNode cNode, java.util.Collection<ClassInjector> injectors)`
    `void` | `performInjectionOnArtefactType(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.ClassNode cNode, java.lang.String artefactType)`
    `protected void` | `postProcess(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.ClassNode classNode, java.lang.String artefactType)`
    `protected java.lang.String` | `resolveArtefactType(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.ClassNode classNode)`
    `void` | `visit(org.codehaus.groovy.ast.ASTNode[] astNodes, org.codehaus.groovy.control.SourceUnit sourceUnit)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractArtefactTypeAstTransformation` | `performInjectionOnArtefactType`
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Method Detail

    - #### public static void doPerformInjectionOnArtefactType(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.ClassNode cNode, java.lang.String artefactType)

    - #### public static java.util.List<ClassInjector> findInjectors(java.lang.String artefactType, ClassInjector[] classInjectors)

    - #### protected org.codehaus.groovy.ast.ClassNode getAnnotationType()

    - #### protected java.lang.Class<?> getAstAppliedMarkerClass()

    - #### public static boolean hasArtefactType(java.lang.String artefactType, GrailsArtefactClassInjector gace)

    - #### protected boolean isApplied(org.codehaus.groovy.ast.ClassNode cNode)

    - #### protected boolean isArtefactAnnotationNode(org.codehaus.groovy.ast.AnnotationNode annotationNode)

    - #### protected void markApplied(org.codehaus.groovy.ast.ClassNode classNode)

    - #### public static void performInjection(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.ClassNode cNode, java.util.Collection<ClassInjector> injectors)

    - #### public void performInjectionOnArtefactType(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.ClassNode cNode, java.lang.String artefactType)

    - #### protected void postProcess(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.ClassNode classNode, java.lang.String artefactType)

    - #### protected java.lang.String resolveArtefactType(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.ClassNode classNode)

    - #### public void visit(org.codehaus.groovy.ast.ASTNode[] astNodes, org.codehaus.groovy.control.SourceUnit sourceUnit)