public void readResources ( String path ) throws IOException { Enumeration < URL > resources = getClass ( ) . getClassLoader ( ) . getResources ( path ) ; if ( ! resources . hasMoreElements ( ) ) { throw new IllegalArgumentException ( String . format ( "File %s was not found on classpath" , path ) ) ; } Yaml yaml = new Yaml ( ) ; while ( resources . hasMoreElements ( ) ) { appendData ( yaml . loadAs ( resources . nextElement ( ) . openStream ( ) , Data . class ) ) ; } }
fixme - should be package - private