|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.compiler.injection.DefaultGrailsDomainClassInjector
public class DefaultGrailsDomainClassInjector
Default implementation of domain class injector interface that adds the 'id' and 'version' properties and other previously boilerplate code
Constructor Summary | |
---|---|
DefaultGrailsDomainClassInjector()
|
Method Summary | |
---|---|
protected boolean |
isDomainClass(org.codehaus.groovy.ast.ClassNode classNode,
org.codehaus.groovy.control.SourceUnit sourceNode)
|
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 |
void |
performInjectionOnAnnotatedEntity(org.codehaus.groovy.ast.ClassNode classNode)
This method doesn't check with the specified ClassNode is a valid entity and assumes it is and proceeds with the injection regardless |
boolean |
shouldInject(URL url)
Returns whether this injector should inject |
protected boolean |
shouldInjectClass(org.codehaus.groovy.ast.ClassNode classNode)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultGrailsDomainClassInjector()
Method Detail |
---|
public void performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.classgen.GeneratorContext context, org.codehaus.groovy.ast.ClassNode classNode)
ClassInjector
performInjection
in interface ClassInjector
source
- The source unitcontext
- The generator contextclassNode
- The ClassNode instancepublic void performInjectionOnAnnotatedEntity(org.codehaus.groovy.ast.ClassNode classNode)
GrailsDomainClassInjector
performInjectionOnAnnotatedEntity
in interface GrailsDomainClassInjector
classNode
- The ClassNodepublic boolean shouldInject(URL url)
ClassInjector
shouldInject
in interface ClassInjector
url
- The URL of the source file
protected boolean isDomainClass(org.codehaus.groovy.ast.ClassNode classNode, org.codehaus.groovy.control.SourceUnit sourceNode)
protected boolean shouldInjectClass(org.codehaus.groovy.ast.ClassNode classNode)
public void performInjection(org.codehaus.groovy.control.SourceUnit source, org.codehaus.groovy.ast.ClassNode classNode)
ClassInjector
performInjection
in interface ClassInjector
source
- The source unitclassNode
- The ClassNode instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |