Package com.xenoterracide.gradle.git
Interface TryGit
- All Superinterfaces:
Supplier<@Nullable org.eclipse.jgit.api.Git>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Use this to wrap Git commands using
Try to handle exceptions.-
Method Summary
Modifier and TypeMethodDescriptiondefault <R> io.vavr.control.Try<R> tryCommand(io.vavr.CheckedFunction1<org.eclipse.jgit.api.Git, org.eclipse.jgit.api.GitCommand<@Nullable R>> command) Wraps aGitCommandin aTryto handle exceptions.default <R> io.vavr.control.Try<R> tryGit(io.vavr.CheckedFunction1<org.eclipse.jgit.api.Git, @Nullable R> command) Wraps a Git command in aTryto handle exceptions.
-
Method Details
-
tryCommand
default <R> io.vavr.control.Try<R> tryCommand(io.vavr.CheckedFunction1<org.eclipse.jgit.api.Git, org.eclipse.jgit.api.GitCommand<@Nullable R>> command) Wraps aGitCommandin aTryto handle exceptions.- Type Parameters:
R- return type- Parameters:
command- command to run- Returns:
- the result of the function
-
tryGit
default <R> io.vavr.control.Try<R> tryGit(io.vavr.CheckedFunction1<org.eclipse.jgit.api.Git, @Nullable R> command) Wraps a Git command in aTryto handle exceptions.- Type Parameters:
R- result of the function- Parameters:
command- to run- Returns:
- result of the function with filtered nulls
-