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

static String org::jfree::resourceloader::loader::resource::ClassloaderResourceLoader::createResourceKey ( final Class  c,
final String  resource 
) [inline, static]

A helper method to make it easier to create resource descriptions.

Parameters:
c 
resource 
Returns:

Definition at line 179 of file ClassloaderResourceLoader.java.

  {
    if (c == null)
    {
      // the resource given should already be absolute ..
      return "res://" + resource;
    }
    final String className = c.getName();
    final int lastDot = className.lastIndexOf('.');
    if (lastDot < 0)
    {
      return "res://" + resource;
    }
    else
    {
      final String packageName = className.substring(0, lastDot);
      final String packagePath = packageName.replace('.', '/');
      return "res://" + packageName + "/" + packagePath;
    }
  }


Generated by  Doxygen 1.6.0   Back to index