code: private List<String> libCandidates(Platform platform, String name) {
          List<String> candidates = new ArrayList<String>();
          StringBuilder sb = new StringBuilder();
  
          sb.append(libraryPath).append("/");
          sb.append(platform.arch).append("/");
          sb.append(platform.os).append("/");
          sb.append("lib").append(name);
  
          switch (platform.os) {
              case darwin:
                  candidates.add(sb + ".dylib");
                  candidates.add(sb + ".jnilib");
                  break;
              case linux:
              case freebsd:
                  candidates.add(sb + ".so");
                  break;
          }
  
          return candidates;
      }
docs: Generate a list of candidate libraries for the supplied library name and suitable
  for the current platform.
  
  @param platform  Current platform.
  @param name      Library name.
  
  @return List of potential library names.