クラス CommandLocator
- java.lang.Object
-
- com.kazurayam.subprocessj.CommandLocator
-
public class CommandLocator extends java.lang.Object
-
-
ネストされたクラスの概要
ネストされたクラス 修飾子とタイプ クラス 説明 static class
CommandLocator.CommandLocatingResult
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 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)
-
-
-
メソッドの詳細
-
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
-
-