public static URL getResource(String name)
  {
    Params.notNull(name, "Resource name");
    // not documented behavior: accept but ignore trailing path separator
    if(!name.isEmpty() && name.charAt(0) == '/') {
      name = name.substring(1);
    }

    return getResource(name, new ClassLoader[]
    {
        Thread.currentThread().getContextClassLoader(), Classes.class.getClassLoader(), ClassLoader.getSystemClassLoader()
    });
  }
public static URL getResource ( String name ) { Params . notNull ( name , "Resource name" ) ; if ( ! name . isEmpty ( ) && name . charAt ( 0 ) == '/' ) { name = name . substring ( 1 ) ; } return getResource ( name , new ClassLoader [ ] { Thread . currentThread ( ) . getContextClassLoader ( ) , Classes . class . getClassLoader ( ) , ClassLoader . getSystemClassLoader ( ) } ) ; }
Retrieve URL of the named resource or null if not found. A resource can be any file including Java source files or
package directory. A special case is resource with empty name that denotes package root.
<p>
Resource is searched into next class loaders, in given order:
<ul>
<li>current thread context class loader,
<li>this utility class loader,
<li>system class loader, as returned by {@link ClassLoader#getSystemClassLoader()}
</ul>

@param name resource qualified name, using path separators instead of dots.
@return resource URL or null if not found.
@throws IllegalArgumentException if <code>name</code> argument is null.