org.apache.tamaya.resource

## Class BaseResourceResolver

- java.lang.Object
- - org.apache.tamaya.resource.BaseResourceResolver

- All Implemented Interfaces:
    ResourceResolver
  Direct Known Subclasses:
    DefaultResourceResolver

      public abstract class BaseResourceResolver
      extends Object
      implements ResourceResolver

  Interface to be implemented by modules. It supports loading of files or classpath resources either directly or by defining a Ant-styled resource pattern:
  - '*' is a placeholder for any character (0..n)
  - '**' is a placeholder for any number of subdirectories going down a directory structure recursively.
  - '?' is a placeholder for exact one character
  Given that the following expressions are valid expressions:

           classpath:javax/annotations/*
           javax?/annotations/**/*.class
           org/apache/tamaya/**/tamayaconfig.properties
           file:C:/temp/*.txt
           file:C:\**\*.ini
           C:\Programs\**/*.ini
           /user/home/A*b101_?.pid
           /var/logs/**/*.log

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseResourceResolver()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Collection<URL>` | `getResources(ClassLoader classLoader, Collection<String> expressions)` Resolves resource expressions to a list of `URL`s, considerubg the given classloader for classloader dependent format.
    `Collection<URL>` | `getResources(ClassLoader classLoader, String... expressions)` Resolves resource expressions to a list of `URL`s, considerubg the given classloader for classloader dependent format.
    `Collection<URL>` | `getResources(Collection<String> expressions)` Resolves resource expressions to a list of `URL`s.
    `Collection<URL>` | `getResources(String... expressions)` Resolves resource expressions to a list of `URL`s.

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

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

- - ### Constructor Detail

    - #### BaseResourceResolver

          public BaseResourceResolver()

  - ### Method Detail

    - #### getResources

          public Collection<URL> getResources(Collection<String> expressions)

      Resolves resource expressions to a list of `URL`s. Hereby the ordering of format matches the input of the resolved expressions. Nevertheless be aware that there is no determined ordering of format located within a classloader.
      Specified by:
        `getResources` in interface `ResourceResolver`
      Parameters:
        `expressions` - the expressions to be resolved, not empty.
      Returns:
        the corresponding collection of current `URL`s found, never null. .

    - #### getResources

          public Collection<URL> getResources(String... expressions)

      Resolves resource expressions to a list of `URL`s. Hereby the ordering of format matches the input of the resolved expressions. Nevertheless be aware that there is no determined ordering of format located within a classloader.
      Specified by:
        `getResources` in interface `ResourceResolver`
      Parameters:
        `expressions` - the expressions to be resolved, not empty.
      Returns:
        the corresponding collection of current `URL`s found, never null. .

    - #### getResources

          public Collection<URL> getResources(ClassLoader classLoader,
                                              String... expressions)

      Resolves resource expressions to a list of `URL`s, considerubg the given classloader for classloader dependent format. Hereby the ordering of format matches the input of the resolved expressions. Nevertheless be aware that there is no determined ordering of format located within a classloader.
      Specified by:
        `getResources` in interface `ResourceResolver`
      Parameters:
        `expressions` - the expressions to be resolved, not empty.
      Returns:
        the corresponding collection of current `URL`s found, never null. .

    - #### getResources

          public abstract Collection<URL> getResources(ClassLoader classLoader,
                                                       Collection<String> expressions)

      Resolves resource expressions to a list of `URL`s, considerubg the given classloader for classloader dependent format. Hereby the ordering of format matches the input of the resolved expressions. Nevertheless be aware that there is no determined ordering of format located within a classloader.
      Specified by:
        `getResources` in interface `ResourceResolver`
      Parameters:
        `expressions` - the expressions to be resolved, not empty.
      Returns:
        the corresponding collection of current `URL`s found, never null. .

Copyright © 2014–2015 Apache Software Foundation. All rights reserved.