ResourceLocator (Grails 6.0.0)

Package: org.grails.io.support

## [Java] Class ResourceLocator

- org.grails.io.support.ResourceLocator

-     public class ResourceLocator
      extends java.lang.Object

  Used to locate resources at build / development time

  Authors:
    Graeme Rocher
  Since:
    3.0

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `class` | `ResourceLocator.PluginResourceInfo` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `CLOSURE_MARKER` |
    `static java.lang.String` | `FILE_SEPARATOR` |
    `protected static Resource` | `NULL_RESOURCE` |
    `static java.lang.String` | `WEB_APP_DIR` |
    `static java.lang.String` | `WILDCARD` |
    `protected java.util.Map<java.lang.String, Resource>` | `classNameToResourceCache` |
    `protected java.util.List<java.lang.String>` | `classSearchDirectories` |
    `protected ResourceLoader` | `defaultResourceLoader` |
    `protected PathMatchingResourcePatternResolver` | `patchMatchingResolver` |
    `protected java.util.List<java.lang.String>` | `resourceSearchDirectories` |
    `protected java.util.Map<java.lang.String, Resource>` | `uriToResourceCache` |
    `protected boolean` | `warDeployed` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `accept(java.io.File file)`
    `` | `public Resource` | `findResourceForClassName(java.lang.String className)`
    `` | `public Resource` | `findResourceForURI(java.lang.String uri)`
    `` | `protected ResourceLoader` | `getDefaultResourceLoader()`
    `` | `private java.util.List<java.lang.String>` | `getSearchPatternForExtension(java.lang.String classNameWithPathSeparator, java.lang.String extensions)`
    `` | `private DefaultResourceLocator.PluginResourceInfo` | `inferPluginNameFromURI(java.lang.String uri)`
    `` | `private void` | `initializeForSearchLocation(java.lang.String searchLocation)`
    `` | `private Resource` | `resolveExceptionSafe(java.lang.String pathPattern)`
    `` | `public void` | `setResourceLoader(ResourceLoader resourceLoader)`
    `` | `public void` | `setSearchLocation(java.lang.String searchLocation)`
    `` | `public void` | `setSearchLocations(java.util.Collection<java.lang.String> searchLocations)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

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

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

    - #### protected static final Resource NULL_RESOURCE

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

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

    - #### protected java.util.Map<java.lang.String, Resource> classNameToResourceCache

    - #### protected java.util.List<java.lang.String> classSearchDirectories

    - #### protected ResourceLoader defaultResourceLoader

    - #### protected PathMatchingResourcePatternResolver patchMatchingResolver

    - #### protected java.util.List<java.lang.String> resourceSearchDirectories

    - #### protected java.util.Map<java.lang.String, Resource> uriToResourceCache

    - #### protected boolean warDeployed

  - ### Method Detail

    - #### public boolean accept(java.io.File file)

    - #### public Resource findResourceForClassName(java.lang.String className)

    - #### public Resource findResourceForURI(java.lang.String uri)

    - #### protected ResourceLoader getDefaultResourceLoader()

    - #### private java.util.List<java.lang.String> getSearchPatternForExtension(java.lang.String classNameWithPathSeparator, java.lang.String extensions)

    - #### private DefaultResourceLocator.PluginResourceInfo inferPluginNameFromURI(java.lang.String uri)

    - #### private void initializeForSearchLocation(java.lang.String searchLocation)

    - #### private Resource resolveExceptionSafe(java.lang.String pathPattern)

    - #### public void setResourceLoader(ResourceLoader resourceLoader)

    - #### public void setSearchLocation(java.lang.String searchLocation)

    - #### public void setSearchLocations(java.util.Collection<java.lang.String> searchLocations)