public GrailsClass addArtefact ( String artefactType , GrailsClass artefactGrailsClass ) { ArtefactHandler handler = artefactHandlersByName . get ( artefactType ) ; if ( handler . isArtefactGrailsClass ( artefactGrailsClass ) ) { // Store the GrailsClass in cache DefaultArtefactInfo info = getArtefactInfo ( artefactType , true ) ; info . addGrailsClass ( artefactGrailsClass ) ; info . updateComplete ( ) ; initializeArtefacts ( artefactType ) ; return artefactGrailsClass ; } throw new GrailsConfigurationException ( "Cannot add " + artefactType + " class [" + artefactGrailsClass + "]. It is not a " + artefactType + "!" ) ; }
Adds an artefact of the given type for the given GrailsClass .