Logo Search packages:      
Sourcecode: jamvm version File versions

URL java::lang::ClassLoader::getResource ( String  name  )  [inline]

Get the URL to a resource using this classloader or one of its parents. First tries to get the resource by calling getResource() on the parent classloader. If the parent classloader returns null then it tries finding the resource by calling findResource() on this classloader. The resource name should be separated by '/' for path elements.

Subclasses should not override this method but should override findResource() which is called by this method.

name the name of the resource relative to this classloader
the URL to the resource or null when not found

Definition at line 523 of file ClassLoader.java.

References findResource(), getResource(), and parent.

Referenced by getResource(), getResourceAsStream(), and getSystemResource().

    URL result;

    if (parent == null)
      result = VMClassLoader.getResource(name);
      result = parent.getResource(name);

    if (result == null)
      result = findResource(name);
    return result;

Generated by  Doxygen 1.6.0   Back to index