Logo Search packages:      
Sourcecode: libloader version File versions  Download package

ResourceKey org::jfree::resourceloader::loader::raw::RawResourceLoader::deriveKey ( final ResourceKey  parent,
final String  path,
final Map  factoryKeys 
) throws ResourceKeyCreationException [inline]

Derives a new resource key from the given key. If neither a path nor new factory-keys are given, the parent key is returned.

parent the parent
path the derived path (can be null).
factoryKeys the optional factory keys (can be null).
the derived key.
org.jfree.resourceloader.ResourceKeyCreationException if the key cannot be derived for any reason.

Definition at line 104 of file RawResourceLoader.java.

References isSupportedKey().

    if (path != null)
      throw new ResourceKeyCreationException("Unable to derive key for new path.");
    if (isSupportedKey(parent) == false)
      throw new ResourceKeyCreationException("Assertation: Unsupported parent key type");

    if (factoryKeys == null)
      return parent;

    final HashMap map = new HashMap();
    return new ResourceKey(parent.getSchema(), parent.getIdentifier(), map);

Generated by  Doxygen 1.6.0   Back to index