public static List < Profile > readAllFromClasspath ( String name , String ext ) throws IOException { List < Profile > ret = new ArrayList <> ( ) ; for ( String location : getMetaInfProfilePaths ( ext ) ) { for ( String url : ClassUtil . getResources ( location ) ) { for ( Profile profile : fromYaml ( new URL ( url ) . openStream ( ) ) ) { if ( name . equals ( profile . getName ( ) ) ) { ret . add ( profile ) ; } } } } return ret ; }
Read all profiles found in the classpath .