## org.codehaus.groovy.grails.compiler.injection
Interface ClassInjector

All Known Subinterfaces:
  GrailsDomainClassInjector

All Known Implementing Classes:
  DefaultGrailsDomainClassInjector

    public interface ClassInjector

An interface that 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 Created: 20th June 2006
Author:
  Graeme Rocher

Method Summary
`void` `performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)` Method that handles injection of properties, methods etc. into a class
`void` `performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.classgen.GeneratorContext context, org.codehaus.groovy.ast.ClassNode classNode)` Method that handles injection of properties, methods etc. into a class
`boolean` `shouldInject(URL url)` Returns whether this injector should inject

Method Detail

### performInjection

    void performInjection(org.codehaus.groovy.control.SourceUnit source,
                          org.codehaus.groovy.classgen.GeneratorContext context,
                          org.codehaus.groovy.ast.ClassNode classNode)

  Method that 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)

  Method that 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

Copyright (c) 2005-2009 The Grails project