Interface ClassInjector

All Known Subinterfaces:
AllArtefactClassInjector, GrailsArtefactClassInjector, GrailsDomainClassInjector, GroovyPageInjector
All Known Implementing Classes:
AbstractGrailsArtefactTransformer, DefaultGrailsDomainClassInjector

public interface ClassInjector
When implemented allows additional properties to be injected into Grails classes at compile time (ie when they are loaded by the GroovyClassLoader).
Since:
0.2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
    Handles injection of properties, methods etc.
    void
    performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.classgen.GeneratorContext context, org.codehaus.groovy.ast.ClassNode classNode)
    Handles injection of properties, methods etc.
    void
    performInjectionOnAnnotatedClass(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
    Handles injection of properties, methods etc.
    boolean
    Returns whether this injector should inject
  • Field Details

  • Method Details

    • performInjection

      void performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.classgen.GeneratorContext context, org.codehaus.groovy.ast.ClassNode classNode)
      Handles injection of properties, methods etc. into a class.
      Parameters:
      source - The source unit
      context - The generator context
      classNode - The ClassNode instance
    • performInjection

      void performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
      Handles injection of properties, methods etc. into a class.
      Parameters:
      source - The source unit
      classNode - The ClassNode instance
    • performInjectionOnAnnotatedClass

      void performInjectionOnAnnotatedClass(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
      Handles injection of properties, methods etc. into a class.
      Parameters:
      source - The source unit
      classNode - The ClassNode instance
    • shouldInject

      boolean shouldInject(URL url)
      Returns whether this injector should inject
      Parameters:
      url - The URL of the source file
      Returns:
      true if injection should occur