org.apache.cayenne.resource

## Class ClassLoaderResourceLocator

- java.lang.Object
- - org.apache.cayenne.resource.ClassLoaderResourceLocator

- All Implemented Interfaces:
    ResourceLocator

      public class ClassLoaderResourceLocator
      extends Object
      implements ResourceLocator

  A `ResourceLocator` that looks up resources is the application classpath based on the current thread ClassLoader.
  Since:
    3.1

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassLoaderResourceLocator(ClassLoaderManager classLoaderManager)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Collection<Resource>` | `findResources(String name)` Finds a collection of matching resources for a given name.
    `protected ClassLoader` | `getClassLoader()` Deprecated. since 4.0 unused, as AdhocObjectFactory.getClassLoader() is used instead.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClassLoaderResourceLocator

          public ClassLoaderResourceLocator(ClassLoaderManager classLoaderManager)

  - ### Method Detail

    - #### findResources

          public Collection<Resource> findResources(String name)

      Description copied from interface: `ResourceLocator`
      Finds a collection of matching resources for a given name. The name components must be separated by forward slashes.
      Specified by:
        `findResources` in interface `ResourceLocator`

    - #### getClassLoader

          @Deprecated
          protected ClassLoader getClassLoader()

      Deprecated. since 4.0 unused, as AdhocObjectFactory.getClassLoader() is used instead.

Copyright © 2001–2023 Apache Cayenne. All rights reserved.