Package grails.compiler.ast
Interface ClassInjector
-
- All Known Subinterfaces:
AllArtefactClassInjector,GrailsArtefactClassInjector,GrailsDomainClassInjector,GroovyPageInjector
- All Known Implementing Classes:
AbstractGrailsArtefactTransformer,DefaultGrailsDomainClassInjector
public interface ClassInjectorWhen 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 intPRIVATE_STATIC_MODIFIER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidperformInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)Handles injection of properties, methods etc.voidperformInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.classgen.GeneratorContext context, org.codehaus.groovy.ast.ClassNode classNode)Handles injection of properties, methods etc.voidperformInjectionOnAnnotatedClass(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)Handles injection of properties, methods etc.booleanshouldInject(java.net.URL url)Returns whether this injector should inject
-
-
-
Field Detail
-
PRIVATE_STATIC_MODIFIER
static final int PRIVATE_STATIC_MODIFIER
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 unitcontext- The generator contextclassNode- 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 unitclassNode- 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 unitclassNode- The ClassNode instance
-
shouldInject
boolean shouldInject(java.net.URL url)
Returns whether this injector should inject- Parameters:
url- The URL of the source file- Returns:
- true if injection should occur
-
-