BinaryGrailsPlugin (Grails 6.0.0)

Package: org.grails.plugins

## [Java] Class BinaryGrailsPlugin

- org.grails.plugins.BinaryGrailsPlugin

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

  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` |
    `private org.springframework.core.io.Resource` | `baseResource` |
    `private org.springframework.core.io.Resource` | `baseResourcesResource` |
    `private BinaryGrailsPluginDescriptor` | `descriptor` |
    `private boolean` | `isJar` |
    `private java.util.Map<java.lang.String, java.lang.Class>` | `precompiledViewMap` |
    `private java.io.File` | `projectDirectory` |
    `private java.lang.Class[]` | `providedArtefacts` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class DefaultGrailsPlugin` | `EXCLUDES, INCLUDES, LOG, PLUGIN_CHANGE_EVENT_APPLICATION, PLUGIN_CHANGE_EVENT_CTX, PLUGIN_CHANGE_EVENT_MANAGER, PLUGIN_CHANGE_EVENT_PLUGIN, PLUGIN_CHANGE_EVENT_SOURCE, loadAfterNames, loadBeforeNames, observedPlugins, onChangeListener, onConfigChangeListener, onShutdownListener, plugin, pluginBean, pluginDescriptor, pluginEnvs, pluginExcludes, pluginGrailsClass, profiles, providedArtefacts, resolver, serialVersionUID, status, typeFilters, watchedResourcePatternReferences, watchedResourcePatterns, watchedResources`
    `class AbstractGrailsPlugin` | `DEFAULT_CONFIG_IGNORE_LIST, LOG, PLUGIN_GROOVY, PLUGIN_GROOVY_PATH, PLUGIN_YML, PLUGIN_YML_PATH, applicationContext, basePluginResource, 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
    --- | --- | ---
    `` | `private org.springframework.core.io.Resource[]` | `filterResources(org.springframework.core.io.Resource[] resources, java.util.Locale locale)`
    `` | `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.
    `` | `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
    `` | `protected void` | `initializeProvidedArtefacts(java.util.List<java.lang.String> classNames)`
    `` | `protected void` | `initializeViewMap(BinaryGrailsPluginDescriptor descriptor)`
    `` | `private void` | `loadFromResources(java.util.Properties properties, org.springframework.core.io.Resource[] resources)`
    `` | `public 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` | `addBaseLocationPattern, addExclude, addExcludeRuleInternal, beans, call, callEvent, doArtefactConfiguration, doWithApplicationContext, doWithDynamicMethods, doWithRuntimeConfiguration, doc, evaluateAndAddIncludeExcludeObject, evaluateAndAddListOfValues, evaluateAndAddToIncludeExcludeSet, evaluateIncludeExcludeProperty, evaluateObservedPlugins, evaluateOnChangeListener, evaluatePluginDependencies, evaluatePluginEvictionPolicy, evaluatePluginExcludes, evaluatePluginLoadAfters, evaluatePluginScopes, evaluatePluginStatus, evaluatePluginVersion, evaluateProfiles, evaluateProvidedArtefacts, evaluateTypeFilters, getDependencyNames, getDependentVersion, getDescriptor, getFullName, getInstance, getLoadAfterNames, getLoadBeforeNames, getLog, getName, getObservedPluginNames, getParentCtx, getPlugin, getPluginDir, getPluginExcludes, getProperties, getProvidedArtefacts, getResolver, getResourcePatternForBaseLocation, getTypeFilters, getWatchedResourcePatterns, getWatchedResources, hasInterestInChange, initialisePlugin, invokeOnChangeListener, invokeOnConfigChangeListener, invokeOnShutdownEventListener, invokePluginHook, isEnabled, isEnabled, lazilyCreateIncludeOrExcludeSet, notifyOfEvent, notifyOfEvent, refresh, setApplicationContext, setDescriptor, setManager, setParentApplicationContext, setWatchedResources, supportsCurrentScopeAndEnvironment, supportsEnvironment, supportsValueInIncludeExcludeMap, toString`
    `class 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`

- - ### 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

    - #### private final org.springframework.core.io.Resource baseResource

    - #### private final org.springframework.core.io.Resource baseResourcesResource

    - #### private final BinaryGrailsPluginDescriptor descriptor

    - #### private final boolean isJar

    - #### private final java.util.Map<java.lang.String, java.lang.Class> precompiledViewMap

    - #### private final java.io.File projectDirectory

    - #### private java.lang.Class[] providedArtefacts

  - ### 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

    - #### private org.springframework.core.io.Resource[] filterResources(org.springframework.core.io.Resource[] resources, java.util.Locale locale)

    - #### 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)

    - #### private void loadFromResources(java.util.Properties properties, org.springframework.core.io.Resource[] resources)

    - #### 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