public static List < URL > getResources ( String name ) { List < URL > list = new ArrayList <> ( ) ; try { ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; Enumeration < URL > resources = loader . getResources ( name ) ; while ( resources . hasMoreElements ( ) ) { URL url = resources . nextElement ( ) ; list . add ( url ) ; } } catch ( IOException e ) { throw new PippoRuntimeException ( e ) ; } return list ; }
Return a list of resource URLs that match the given name .