org.codehaus.groovy.grails.compiler.injection
Class DefaultGrailsDomainClassInjector

java.lang.Object
  extended by org.codehaus.groovy.grails.compiler.injection.DefaultGrailsDomainClassInjector
All Implemented Interfaces:
ClassInjector, GrailsDomainClassInjector

public class DefaultGrailsDomainClassInjector
extends Object
implements GrailsDomainClassInjector

Default implementation of domain class injector interface that adds the 'id' and 'version' properties and other previously boilerplate code

Since:
0.2 Created: 20th June 2006
Author:
Graeme Rocher

Constructor Summary
DefaultGrailsDomainClassInjector()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGrailsDomainClassInjector

public DefaultGrailsDomainClassInjector()
Method Detail

performInjection

public void performInjection(org.codehaus.groovy.control.SourceUnit source,
                             org.codehaus.groovy.classgen.GeneratorContext context,
                             org.codehaus.groovy.ast.ClassNode classNode)
Description copied from interface: ClassInjector
Method that handles injection of properties, methods etc. into a class

Specified by:
performInjection in interface ClassInjector
Parameters:
source - The source unit
context - The generator context
classNode - The ClassNode instance

shouldInject

public boolean shouldInject(URL url)
Description copied from interface: ClassInjector
Returns whether this injector should inject

Specified by:
shouldInject in interface ClassInjector
Parameters:
url - The URL of the source file
Returns:
True if injection should occur


Copyright (c) 2005-2006 The Grails project