BinaryGrailsPlugin (Grails 3.3.2)
Date: 2017-11-24

Package: org.grails.plugins

## [Java] Class BinaryGrailsPlugin

- org.grails.plugins.BinaryGrailsPlugin

- Models a pre-compiled binary plugin.

  See Also:
    GrailsPlugin
  Authors:
    Graeme Rocher
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `DEFAULT_PROPERTIES_ENCODING` |
    `static java.lang.String` | `PLUGIN_DESCRIPTOR_PATH` |
    `static java.lang.String` | `PROPERTIES_EXTENSION` |
    `static java.lang.String` | `RELATIVE_VIEWS_PROPERTIES` |
    `static char` | `UNDERSCORE` |
    `static java.lang.String` | `VIEWS_PROPERTIES` |

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

  - ### Constructor Summary

    Constructors
    Constructor and description
    `BinaryGrailsPlugin (java.lang.Class<?> pluginClass, BinaryGrailsPluginDescriptor descriptor, GrailsApplication application)` Creates a binary plugin instance.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `BinaryGrailsPluginDescriptor` | `getBinaryDescriptor()` @return The META-INF/grails-plugin.xml descriptor
    `` | `java.io.File` | `getProjectDirectory()`
    `` | `java.util.Properties` | `getProperties(java.util.Locale locale)` Obtains all properties for this binary plugin for the given locale.
    `` | `java.lang.Class<?>[]` | `getProvidedArtefacts()`
    `` | `org.springframework.core.io.Resource` | `getResource(java.lang.String path)` Resolves a static resource contained within this binary plugin
    `` | `protected void` | `initializeProvidedArtefacts(java.util.List<java.lang.String> classNames)`
    `` | `protected void` | `initializeViewMap(BinaryGrailsPluginDescriptor descriptor)`
    `` | `java.lang.Class` | `resolveView(java.lang.String viewName)` Resolves a view for the given view name.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class DefaultGrailsPlugin` | `addExclude, addExclude, beans, doArtefactConfiguration, doWithApplicationContext, doWithDynamicMethods, doWithRuntimeConfiguration, doc, getDependencyNames, getDependentVersion, getDescriptor, getFullName, getInstance, getLoadAfterNames, getLoadBeforeNames, getLog, getName, getObservedPluginNames, getParentCtx, getPlugin, getPluginDir, getPluginExcludes, getProperties, getProvidedArtefacts, getResolver, getTypeFilters, getWatchedResourcePatterns, getWatchedResources, hasInterestInChange, isEnabled, isEnabled, notifyOfEvent, notifyOfEvent, refresh, setApplicationContext, setDescriptor, setManager, setParentApplicationContext, setWatchedResources, supportsCurrentScopeAndEnvironment, supportsEnvironment, supportsScope, toString`
    `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

    - #### public static final java.lang.String DEFAULT_PROPERTIES_ENCODING

    - #### public static final java.lang.String PLUGIN_DESCRIPTOR_PATH

    - #### public static final java.lang.String PROPERTIES_EXTENSION

    - #### public static final java.lang.String RELATIVE_VIEWS_PROPERTIES

    - #### public static final char UNDERSCORE

    - #### public static final java.lang.String VIEWS_PROPERTIES

  - ### Constructor Detail

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

      Creates a binary plugin instance.

      Parameters:
        `pluginClass` - The plugin class
        `descriptor` - The META-INF/grails-plugin.xml descriptor
        `application` - The application

  - ### Method Detail

    - #### public BinaryGrailsPluginDescriptor getBinaryDescriptor()

      Returns:
        The META-INF/grails-plugin.xml descriptor

    - #### public java.io.File getProjectDirectory()

    - #### public java.util.Properties getProperties(java.util.Locale locale)

      Obtains all properties for this binary plugin for the given locale. Note this method does not cache so clients should in general cache the results of this method.

      Parameters:
        `locale` - The locale
      Returns:
        The properties or null if non exist

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

    - #### public org.springframework.core.io.Resource getResource(java.lang.String path)

      Resolves a static resource contained within this binary plugin

      Parameters:
        `path` - The relative path to the static resource
      Returns:
        The resource or null if it doesn't exist

    - #### protected void initializeProvidedArtefacts(java.util.List<java.lang.String> classNames)

    - #### protected void initializeViewMap(BinaryGrailsPluginDescriptor descriptor)

    - #### public java.lang.Class resolveView(java.lang.String viewName)

      Resolves a view for the given view name.

      Parameters:
        `viewName` - The view name
      Returns:
        The view class which is a subclass of GroovyPage