Package: org.grails.plugins

## [Java] Class DefaultGrailsPlugin

- org.grails.plugins.DefaultGrailsPlugin

- All Implemented Interfaces and Traits:
    ParentApplicationContextAware

      @java.lang.SuppressWarnings("rawtypes")
      public class DefaultGrailsPlugin
      extends AbstractGrailsPlugin

  Implementation of the GrailsPlugin interface that wraps a Groovy plugin class and provides the magic to invoke its various methods from Java.

  Authors:
    Graeme Rocher
  Since:
    0.4

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static org.apache.commons.logging.Log` | `LOG` |
    `protected org.springframework.beans.BeanWrapper` | `pluginBean` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractGrailsPlugin` | `PLUGIN_GROOVY, PLUGIN_GROOVY_PATH, PLUGIN_YML, PLUGIN_YML_PATH, applicationContext, config, dependencies, dependencyNames, evictionList, grailsApplication, isBase, manager, pluginClass, propertySource, version`

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `Resource` | `descriptor`
    `org.springframework.core.io.Resource[]` | `watchedResources`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `DefaultGrailsPlugin (java.lang.Class<?> pluginClass, org.springframework.core.io.Resource resource, GrailsApplication application)`
    `DefaultGrailsPlugin (java.lang.Class<?> pluginClass, GrailsApplication application)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `addExclude(grails.util.Environment env)`
    `` | `BeanBuilder` | `beans(groovy.lang.Closure closure)`
    `` | `void` | `doArtefactConfiguration()`
    `` | `void` | `doWithApplicationContext(org.springframework.context.ApplicationContext ctx)`
    `` | `void` | `doWithDynamicMethods(org.springframework.context.ApplicationContext ctx)`
    `` | `void` | `doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig)`
    `` | `void` | `doc(java.lang.String text)` @deprecated Dynamic document generation no longer supported
    `` | `java.lang.String[]` | `getDependencyNames()`
    `` | `java.lang.String` | `getDependentVersion(java.lang.String name)`
    `` | `Resource` | `getDescriptor()`
    `` | `java.lang.String` | `getFullName()`
    `` | `groovy.lang.GroovyObject` | `getInstance()`
    `` | `java.lang.String[]` | `getLoadAfterNames()`
    `` | `java.lang.String[]` | `getLoadBeforeNames()`
    `` | `org.apache.commons.logging.Log` | `getLog()`
    `` | `java.lang.String` | `getName()`
    `` | `java.lang.String[]` | `getObservedPluginNames()`
    `` | `org.springframework.context.ApplicationContext` | `getParentCtx()`
    `` | `GrailsPlugin` | `getPlugin()`
    `` | `Resource` | `getPluginDir()`
    `` | `java.util.List<java.lang.String>` | `getPluginExcludes()`
    `` | `java.util.Map` | `getProperties()`
    `` | `java.lang.Class<?>[]` | `getProvidedArtefacts()`
    `` | `org.springframework.core.io.support.PathMatchingResourcePatternResolver` | `getResolver()` @return the resolver
    `` | `java.util.Collection<? extends org.springframework.core.type.filter.TypeFilter>` | `getTypeFilters()`
    `` | `java.util.List<WatchPattern>` | `getWatchedResourcePatterns()`
    `` | `org.springframework.core.io.Resource[]` | `getWatchedResources()` @return the watchedResources
    `` | `boolean` | `hasInterestInChange(java.lang.String path)`
    `` | `boolean` | `isEnabled(java.lang.String[] activeProfiles)`
    `` | `boolean` | `isEnabled()`
    `` | `void` | `notifyOfEvent(java.util.Map event)`
    `` | `java.util.Map` | `notifyOfEvent(int eventKind, java.lang.Object source)`
    `` | `void` | `refresh()`
    `` | `void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
    `` | `void` | `setDescriptor(org.springframework.core.io.Resource descriptor)`
    `` | `void` | `setManager(GrailsPluginManager manager)`
    `` | `void` | `setParentApplicationContext(org.springframework.context.ApplicationContext parent)`
    `` | `void` | `setWatchedResources(org.springframework.core.io.Resource[] watchedResources)`
    `` | `boolean` | `supportsCurrentScopeAndEnvironment()`
    `` | `boolean` | `supportsEnvironment(grails.util.Environment environment)`
    `` | `java.lang.String` | `toString()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractGrailsPlugin` | `AbstractGrailsPlugin, checkForChanges, compareTo, equals, getConfigurationResource, getDependencyNames, getDependentVersion, getEvictionNames, getFileSystemName, getFileSystemShortName, getLoadAfterNames, getLoadBeforeNames, getManager, getName, getPluginClass, getPluginPath, getPluginPathCamelCase, getPropertySource, getVersion, getWatchedResourcePatterns, hasInterestInChange, hashCode, isBasePlugin, isEnabled, readPluginConfiguration, refresh, setApplication, setApplicationContext, setBasePlugin, setManager`
    `class groovy.lang.GroovyObjectSupport` | `groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()`

- - ### Field Detail

    - #### protected static final org.apache.commons.logging.Log LOG

    - #### protected org.springframework.beans.BeanWrapper pluginBean

  - ### Property Detail

    - #### Resource descriptor

    - #### org.springframework.core.io.Resource[] watchedResources

  - ### Constructor Detail

    - #### public DefaultGrailsPlugin(java.lang.Class<?> pluginClass, org.springframework.core.io.Resource resource, GrailsApplication application)

    - #### public DefaultGrailsPlugin(java.lang.Class<?> pluginClass, GrailsApplication application)

  - ### Method Detail

    - #### public void addExclude(grails.util.Environment env)

    - #### public BeanBuilder beans(groovy.lang.Closure closure)

    - #### public void doArtefactConfiguration()

    - #### public void doWithApplicationContext(org.springframework.context.ApplicationContext ctx)

    - #### public void doWithDynamicMethods(org.springframework.context.ApplicationContext ctx)

    - #### public void doWithRuntimeConfiguration(RuntimeSpringConfiguration springConfig)

    - #### @java.lang.Deprecated public void doc(java.lang.String text)

      deprecated:
        Dynamic document generation no longer supported
      Parameters:
        text

    - #### @java.lang.Override public java.lang.String[] getDependencyNames()

    - #### @java.lang.Override public java.lang.String getDependentVersion(java.lang.String name)

    - #### public Resource getDescriptor()

    - #### public java.lang.String getFullName()

    - #### public groovy.lang.GroovyObject getInstance()

    - #### @java.lang.Override public java.lang.String[] getLoadAfterNames()

    - #### @java.lang.Override public java.lang.String[] getLoadBeforeNames()

    - #### public org.apache.commons.logging.Log getLog()

    - #### @java.lang.Override public java.lang.String getName()

    - #### public java.lang.String[] getObservedPluginNames()

    - #### public org.springframework.context.ApplicationContext getParentCtx()

    - #### public GrailsPlugin getPlugin()

    - #### public Resource getPluginDir()

    - #### public java.util.List<java.lang.String> getPluginExcludes()

    - #### public java.util.Map getProperties()

    - #### public java.lang.Class<?>[] getProvidedArtefacts()

    - #### public org.springframework.core.io.support.PathMatchingResourcePatternResolver getResolver()

      Returns:
        the resolver

    - #### public java.util.Collection<? extends org.springframework.core.type.filter.TypeFilter> getTypeFilters()

    - #### @java.lang.Override public java.util.List<WatchPattern> getWatchedResourcePatterns()

    - #### public org.springframework.core.io.Resource[] getWatchedResources()

      Returns:
        the watchedResources

    - #### @java.lang.Override public boolean hasInterestInChange(java.lang.String path)

    - #### @java.lang.Override public boolean isEnabled(java.lang.String[] activeProfiles)

    - #### public boolean isEnabled()

    - #### public void notifyOfEvent(java.util.Map event)

    - #### public java.util.Map notifyOfEvent(int eventKind, java.lang.Object source)

    - #### @java.lang.Override public void refresh()

    - #### @java.lang.Override public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)

    - #### public void setDescriptor(org.springframework.core.io.Resource descriptor)

    - #### @java.lang.Override public void setManager(GrailsPluginManager manager)

    - #### public void setParentApplicationContext(org.springframework.context.ApplicationContext parent)

    - #### public void setWatchedResources(org.springframework.core.io.Resource[] watchedResources)

    - #### public boolean supportsCurrentScopeAndEnvironment()

    - #### public boolean supportsEnvironment(grails.util.Environment environment)

    - #### @java.lang.Override public java.lang.String toString()