| |
|
| java.lang.Object org.codehaus.dna.impl.AbstractFreezable org.codehaus.dna.impl.DefaultResourceLocator
DefaultResourceLocator | public class DefaultResourceLocator extends AbstractFreezable implements ResourceLocator(Code) | | ResourceLocator implementation backed by a Map and
optionally delegating to parent ResourceLocators.
The developer should create the DefaultResourceLocator,
associate resources with locator and then invoke
DefaultResourceLocator.makeReadOnly() before passing the Locator to
the client component.
The implementation will first check for resources
associated with itself and if unable to locate resource
locally it will delegate to parent ResourceLocator.
version: $Revision: 1.2 $ $Date: 2004/05/01 09:51:48 $ |
DefaultResourceLocator | public DefaultResourceLocator()(Code) | | Create a ResourceLocator with no parent.
|
DefaultResourceLocator | public DefaultResourceLocator(ResourceLocator parent)(Code) | | Create a ResourceLocator with specified parent.
Parameters: parent - the parent ResourceLocator |
contains | public boolean contains(String key)(Code) | | Return true if a resource exists with specified key.
Parameters: key - the key true if a resource exists with specified key. |
getParent | final protected ResourceLocator getParent()(Code) | | Return the parent ResourceLocator if any.
the parent ResourceLocator if any. |
getResourceMap | final protected Map getResourceMap()(Code) | | Return the map used to store resources.
the map used to store resources. |
put | public void put(String key, Object resource)(Code) | | Add a resource to resource locator.
Parameters: key - the key used to store resource (Must not be null). Parameters: resource - the resource (Must not be null). |
|
|
|