public static List<ModuleSpec> expandSpecWildcards(List<File> dirs,List<ModuleSpec> modules,Backend forBackend){
  List<ModuleSpec> result=new ArrayList<ModuleSpec>(modules.size());
  for (  ModuleSpec spec : modules) {
    List<String> names=new ArrayList<String>();
    expandWildcard(names,dirs,spec.getName(),forBackend);
    for (    String name : names) {
      result.add(new ModuleSpec(name,spec.getVersion()));
    }
  }
  return result;
}

public static List < ModuleSpec > expandSpecWildcards ( List < File > dirs , List < ModuleSpec > modules , Backend forBackend ) { List < ModuleSpec > result = new ArrayList < ModuleSpec > ( modules . size ( ) ) ; for ( ModuleSpec spec : modules ) { List < String > names = new ArrayList < String > ( ) ; expandWildcard ( names , dirs , spec . getName ( ) , forBackend ) ; for ( String name : names ) { result . add ( new ModuleSpec ( name , spec . getVersion ( ) ) ) ; } } return result ; }
given a list of source directories and a list of modulespecs that possibly contain wildcards it returns a expanded list of modulespecs of modules that were actually found in the given source directories . modulespecs that didn ' t contain wildcards are left alone ( it ' s not checked if they exist or not ) . if a backend is passed expanded modules will be checked if they support it ( they either don ' t have a native annotation or it is for the correct backend ) .
