ArtefactTypeAstTransformation (Grails 3.3.10)
Date: 2019-05-20

Package: org.grails.compiler.injection

## [Java] Class ArtefactTypeAstTransformation

- org.grails.compiler.injection.ArtefactTypeAstTransformation

- All Implemented Interfaces and Traits:
    groovy.transform.CompilationUnitAware

      @org.codehaus.groovy.transform.GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION)
      public class ArtefactTypeAstTransformation
      extends AbstractArtefactTypeAstTransformation

  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

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected org.codehaus.groovy.control.CompilationUnit` | `compilationUnit` |

  - ### Methods Summary

    Methods
    Type Params | Return 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` | `getAnnotationTypeClass()`
    `` | `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` | `performTraitInjectionOnArtefactType(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` | `setCompilationUnit(org.codehaus.groovy.control.CompilationUnit unit)`
    `` | `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()`

- - ### Field Detail

    - #### protected org.codehaus.groovy.control.CompilationUnit compilationUnit

  - ### Method Detail

    - #### @java.lang.Deprecated 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 getAnnotationTypeClass()

    - #### 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 performTraitInjectionOnArtefactType(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)

    - #### @java.lang.Overridede public public void setCompilationUnit(org.codehaus.groovy.control.CompilationUnit unit)

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