/*
  * Maps an already mapped library name to additional library file extensions.
  * This is needed on platforms like AIX where .a and .so can be used as library file
  * extensions, but System.mapLibraryName only returns a single string.
  */
 public String[] mapLibraryNames(String mappedLibName) {
   int extIndex = mappedLibName.lastIndexOf('.');
   List<String> LIB_EXTENSIONS =
       generation.getBundleInfo().getStorage().getConfiguration().LIB_EXTENSIONS;
   if (LIB_EXTENSIONS.isEmpty() || extIndex < 0) return EMPTY_STRINGS;
   String libNameBase = mappedLibName.substring(0, extIndex);
   String[] results = new String[LIB_EXTENSIONS.size()];
   for (int i = 0; i < results.length; i++) results[i] = libNameBase + LIB_EXTENSIONS.get(i);
   return results;
 }
 private String[] buildNLVariants(String nl) {
   List<String> result = new ArrayList<String>();
   while (nl.length() > 0) {
     result.add(nl);
     int i = nl.lastIndexOf('_');
     nl = (i < 0) ? "" : nl.substring(0, i); // $NON-NLS-1$
   }
   result.add(""); // $NON-NLS-1$
   return result.toArray(new String[result.size()]);
 }