Class ExecutableFinder


  • public class ExecutableFinder
    extends Object
    Given the name of an executable, search a set of (possibly platform-specific) known locations for that executable.
    • Constructor Detail

      • ExecutableFinder

        public ExecutableFinder()
      • ExecutableFinder

        public ExecutableFinder​(Platform platform)
    • Method Detail

      • getExecutable

        public Path getExecutable​(Path suggestedExecutable,
                                  com.google.common.collect.ImmutableMap<String,​String> env)
      • getOptionalExecutable

        public Optional<Path> getOptionalExecutable​(Path suggestedExecutable,
                                                    com.google.common.collect.ImmutableMap<String,​String> env)
      • getOptionalExecutable

        public Optional<Path> getOptionalExecutable​(Path suggestedExecutable,
                                                    Path basePath)
      • getOptionalExecutable

        public Optional<Path> getOptionalExecutable​(Path suggestedExecutable,
                                                    com.google.common.collect.ImmutableCollection<Path> path,
                                                    com.google.common.collect.ImmutableCollection<String> fileSuffixes)
      • isExecutable

        public static boolean isExecutable​(Path exe)
      • getExecutableSuffixes

        public static com.google.common.collect.ImmutableSet<String> getExecutableSuffixes​(Platform platform,
                                                                                           com.google.common.collect.ImmutableMap<String,​String> env)
      • getOptionalToolPath

        public Optional<Path> getOptionalToolPath​(String tool,
                                                  com.google.common.collect.ImmutableList<Path> toolSearchPaths)