Skip navigation links
org.apache.myfaces.trinidad.resource
Class RegexResourceLoader
java.lang.Object
org.apache.myfaces.trinidad.resource.ResourceLoader
org.apache.myfaces.trinidad.resource.RegexResourceLoader
-
public class RegexResourceLoader
- extends ResourceLoader
A resource loader implementation which loads resources by pattern matching the requested resource path to a registered resource loader. Change history 2006-08-01: -= Simon Lessard =- Changed to use a list of entry rather than a dual typed one to add more type safety with minimal memory overhaul and get a really small performance gain.
RegexResourceLoader
public RegexResourceLoader()
- Creates a new RegexResourceLoader.
findResource
protected URL findResource(String path)
throws IOException
- Description copied from class:
ResourceLoader
- Finds the resource with the given name. Resource loader implementations should override this method to specify where to find resources.
-
- Overrides:
findResource in class ResourceLoader
-
- Parameters:
path - The resource name
- Returns:
- A URL object for reading the resource, or null if the resource could not be found
- Throws:
IOException
register
protected void register(String regex,
ResourceLoader loader)
- Registers a resource loader by regular expression.
-
- Parameters:
regex - the regular expression to match
loader - the resource loader to use for matching paths
deregister
protected void deregister(String regex)
- Deregisters a resource loader by regular expression.
-
- Parameters:
regex - the regular expression to remove
Skip navigation links
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.