パッケージ com.kazurayam.subprocessj

クラス CommandLocator


  • public class CommandLocator
    extends java.lang.Object
    • コンストラクタの概要

      コンストラクタ 
      コンストラクタ 説明
      CommandLocator()  
    • メソッドの概要

      すべてのメソッド staticメソッド concreteメソッド 
      修飾子とタイプ メソッド 説明
      static java.util.function.Predicate<java.nio.file.Path> endsWith​(java.lang.String pathEndingWith)  
      static CommandLocator.CommandLocatingResult find​(java.lang.String command)  
      static CommandLocator.CommandLocatingResult find​(java.lang.String command, java.util.function.Predicate<java.nio.file.Path> predicate)
      see the documentation for detail.
      static java.util.function.Predicate<java.nio.file.Path> startsWith​(java.lang.String pathFromRoot)  
      • クラスから継承されたメソッド java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • コンストラクタの詳細

      • CommandLocator

        public CommandLocator()
    • メソッドの詳細

      • find

        public static CommandLocator.CommandLocatingResult find​(java.lang.String command)
        パラメータ:
        command - a command name. e.g, "git"
        戻り値:
        the CommandLocatingResult object. the CommandLocatingResult.command() will return a string which is the full path of the executable of the command. e.g, "/usr/local/bin/git"
      • find

        public static CommandLocator.CommandLocatingResult find​(java.lang.String command,
                                                                java.util.function.Predicate<java.nio.file.Path> predicate)
        see the documentation for detail.
      • startsWith

        public static java.util.function.Predicate<java.nio.file.Path> startsWith​(java.lang.String pathFromRoot)
        パラメータ:
        pathFromRoot - e.g, Paths.get("C:\\Program Files\\Git\\cmd")
        戻り値:
        a Predicate to filter a List of Paths
      • endsWith

        public static java.util.function.Predicate<java.nio.file.Path> endsWith​(java.lang.String pathEndingWith)
        パラメータ:
        pathEndingWith - e.g, Paths.get("cmd\\git.exe");
        戻り値:
        a Predicate to filter a List of Paths