|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter
public class ArtefactHandlerAdapter extends java.lang.Object
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
|
Constructor Summary | |
ArtefactHandlerAdapter(java.lang.String type, java.lang.Class grailsClassType, java.lang.Class grailsClassImpl, java.lang.String artefactSuffix)
|
|
ArtefactHandlerAdapter(java.lang.String type, java.lang.Class grailsClassType, java.lang.Class grailsClassImpl, java.lang.String artefactSuffix, boolean allowAbstract)
|
Method Summary | |
---|---|
GrailsClass
|
getArtefactForFeature(java.lang.Object feature)
|
java.lang.String
|
getPluginName()
|
java.lang.String
|
getType()
|
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
|
isArtefact(java.lang.Class aClass)
|
boolean
|
isArtefactClass(java.lang.Class clazz)
|
boolean
|
isArtefactGrailsClass(GrailsClass artefactGrailsClass)
|
GrailsClass
|
newArtefactClass(java.lang.Class artefactClass)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
protected org.apache.commons.logging.Log log
Constructor Detail |
---|
public ArtefactHandlerAdapter(java.lang.String type, java.lang.Class grailsClassType, java.lang.Class grailsClassImpl, java.lang.String artefactSuffix)
public ArtefactHandlerAdapter(java.lang.String type, java.lang.Class grailsClassType, java.lang.Class grailsClassImpl, java.lang.String artefactSuffix, boolean allowAbstract)
Method Detail |
---|
public GrailsClass getArtefactForFeature(java.lang.Object feature)
public java.lang.String getPluginName()
public java.lang.String getType()
public void initialize(ArtefactInfo artefacts)
public final boolean isArtefact(@SuppressWarnings("rawtypes") java.lang.Class aClass)
public boolean isArtefactClass(@SuppressWarnings("rawtypes") java.lang.Class clazz)
Checks that class's name ends in the suffix specified for this handler.
Override for more complex criteria
clazz
- The class to check
public boolean isArtefactGrailsClass(GrailsClass artefactGrailsClass)
public GrailsClass newArtefactClass(@SuppressWarnings("rawtypes") java.lang.Class artefactClass)
Creates new GrailsClass derived object using the type supplied in constructor. May not perform optimally but is a convenience.
artefactClass
- Creates a new artefact for the given class
Groovy Documentation