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

synchronized ResourceKey org::jfree::resourceloader::ResourceManager::createKey ( final Object  data,
final Map  parameters 
) throws ResourceKeyCreationException [inline]

Creates a ResourceKey that carries the given Loader-Parameters contained in the optional map.

data the key-data
parameters an optional map of parameters.
the generated resource-key, never null.
ResourceKeyCreationException if the key-creation failed.

Definition at line 113 of file ResourceManager.java.

References org::jfree::resourceloader::ResourceLoader::createKey().

    if (data == null)
      throw new NullPointerException("Key data must not be null.");

    final Iterator values = resourceLoaders.iterator();
    while (values.hasNext())
      final ResourceLoader loader = (ResourceLoader) values.next();
        final ResourceKey key = loader.createKey(data, parameters);
        if (key != null)
          return key;
      catch (ResourceKeyCreationException rkce)
        // ignore it.

    throw new ResourceKeyCreationException
        ("Unable to create key: No loader was able " +
            "to handle the given key data: " + data);

Generated by  Doxygen 1.6.0   Back to index