use of grails.core.support.GrailsApplicationAware in project grails-core by grails.
the class DefaultGrailsPlugin method initialisePlugin.
private void initialisePlugin(Class<?> clazz) {
pluginGrailsClass = new GrailsPluginClass(clazz);
plugin = (GroovyObject) pluginGrailsClass.newInstance();
if (plugin instanceof Plugin) {
Plugin p = (Plugin) plugin;
p.setApplicationContext(applicationContext);
p.setPlugin(this);
p.setGrailsApplication(grailsApplication);
p.setPluginManager(manager);
} else if (plugin instanceof GrailsApplicationAware) {
((GrailsApplicationAware) plugin).setGrailsApplication(grailsApplication);
}
pluginBean = new BeanWrapperImpl(plugin);
// configure plugin
evaluatePluginVersion();
evaluatePluginDependencies();
evaluatePluginLoadAfters();
evaluateProvidedArtefacts();
evaluatePluginEvictionPolicy();
evaluateOnChangeListener();
evaluateObservedPlugins();
evaluatePluginStatus();
evaluatePluginScopes();
evaluatePluginExcludes();
evaluateTypeFilters();
}
Aggregations