Package org.zkoss.web.util.resource

## Class ResourceCaches

- java.lang.Object
- - org.zkoss.web.util.resource.ResourceCaches

-     public class ResourceCaches
      extends java.lang.Object

  Utilities to load (and parse) the Servlet resource. Notice that `ResourceCache` and `ResourceLoader` must be used rather than `ResourceCache` and `Loader`.

  Usage:

  1. Implements a loader by extending from `ResourceLoader`.
  2. Creates a resource cache (`ResourceCache`) by use of the loader in the previous step.
  3. Invoke `get(org.zkoss.web.util.resource.ResourceCache<V>, javax.servlet.ServletContext, java.lang.String, java.lang.Object)` to load the resource.
  Author:
    tomyeh

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ResourceCaches()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static <V> V` | `get​(ResourceCache<V> cache, javax.servlet.ServletContext ctx, java.lang.String path, java.lang.Object extra)` | Loads, parses and returns the resource of the specified URI, or null if not found.

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

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

- - ### Constructor Detail

    - #### ResourceCaches

          public ResourceCaches()

  - ### Method Detail

    - #### get

          public static final <V> V get​(ResourceCache<V> cache,
                                        javax.servlet.ServletContext ctx,
                                        java.lang.String path,
                                        java.lang.Object extra)

      Loads, parses and returns the resource of the specified URI, or null if not found. The parser is defined by the loader defined in `ResourceCache`.
      Parameters:
        `cache` - the resource cache. Note: its loader must extend from `ResourceLoader`.
        `path` - the URI path
        `extra` - the extra parameter that will be passed to `ResourceLoader.parse(String,File,Object)` and `ResourceLoader.parse(String,URL,Object)`