public class DomainClassArtefactHandler extends ArtefactHandlerAdapter implements GrailsApplicationAware
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE |
log| Constructor and Description |
|---|
DomainClassArtefactHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(ArtefactInfo artefacts)
Sets up the relationships between the domain classes, this has to be done after
the intial creation to avoid looping
|
boolean |
isArtefactClass(java.lang.Class clazz)
Checks that class's name ends in the suffix specified for this handler.
|
static boolean |
isDomainClass(java.lang.Class<?> clazz) |
static boolean |
isDomainClass(java.lang.Class<?> clazz,
boolean allowProxyClass) |
GrailsClass |
newArtefactClass(java.lang.Class artefactClass)
Creates new GrailsClass derived object using the type supplied in constructor.
|
void |
setGrailsApplication(GrailsApplication grailsApplication)
This method is called by the
ApplicationContext that
loads the Grails application. |
getArtefactForFeature, getPluginName, getType, isArtefact, isArtefactGrailsClasspublic static final java.lang.String TYPE
public void setGrailsApplication(GrailsApplication grailsApplication)
GrailsApplicationAwareThis method is called by the ApplicationContext that
loads the Grails application. The GrailsApplication instance that represents
the loaded Grails application is injected.
setGrailsApplication in interface GrailsApplicationAwaregrailsApplication - the GrailsApplication object that represents this Grails applicationpublic GrailsClass newArtefactClass(java.lang.Class artefactClass)
ArtefactHandlerAdapterCreates new GrailsClass derived object using the type supplied in constructor. May not perform optimally but is a convenience.
newArtefactClass in interface ArtefactHandlernewArtefactClass in class ArtefactHandlerAdapterartefactClass - Creates a new artefact for the given classpublic void initialize(ArtefactInfo artefacts)
initialize in interface ArtefactHandlerinitialize in class ArtefactHandlerAdapterartefacts - The collection of artefact classes for this handlerpublic boolean isArtefactClass(java.lang.Class clazz)
ArtefactHandlerAdapterChecks that class's name ends in the suffix specified for this handler.
Override for more complex criteria
isArtefactClass in class ArtefactHandlerAdapterclazz - The class to checkpublic static boolean isDomainClass(java.lang.Class<?> clazz,
boolean allowProxyClass)
public static boolean isDomainClass(java.lang.Class<?> clazz)