StaticResourceLocator (Grails 6.0.0)

Package: org.grails.core.io

## [Java] Class StaticResourceLocator

- org.grails.core.io.StaticResourceLocator

- All Implemented Interfaces and Traits:
    ResourceLocator

      public class StaticResourceLocator
      extends java.lang.Object
      implements ResourceLocator

  A static resource locator that uses an internal map to locate resources. Used largely for testing.

  Authors:
    Graeme Rocher
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.util.Map<java.lang.String, org.springframework.core.io.Resource>` | `classToResourceMap` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `addClassResource(java.lang.String className, org.springframework.core.io.Resource res)`
    `` | `public org.springframework.core.io.Resource` | `findResourceForClassName(java.lang.String className)`
    `` | `public org.springframework.core.io.Resource` | `findResourceForURI(java.lang.String uri)`
    `` | `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

    - #### private java.util.Map<java.lang.String, org.springframework.core.io.Resource> classToResourceMap

  - ### Method Detail

    - #### public void addClassResource(java.lang.String className, org.springframework.core.io.Resource res)

    - #### public org.springframework.core.io.Resource findResourceForClassName(java.lang.String className)

    - #### public org.springframework.core.io.Resource findResourceForURI(java.lang.String uri)

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

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