Top Inners Methods
org.junit.platform.reporting.open.xml

pack-priv Interface GitInfoCollector

Known Direct Implementers
org.junit.platform.reporting.open.xml.GitInfoCollector.CliGitInfoCollector
Imports
java.io.BufferedReader, .IOException, .InputStream, .InputStreamReader, .Reader, .UncheckedIOException, java.net.URI, .URISyntaxException, java.nio.charset.Charset, java.nio.file.Path, java.util.Optional, java.util.concurrent.TimeUnit, java.util.function.BiConsumer, org.junit.platform.commons.util.ExceptionUtils, .StringUtils

Since
1.13.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class

Method Summary

Modifier and TypeMethod and Description
public static Optional<GitInfoCollector>
get(Path workingDir)

public Optional<String>
public Optional<String>
public Optional<String>
public Optional<String>

Method Detail

getback to summary
public static Optional<GitInfoCollector> get(Path workingDir)
getBranchback to summary
public Optional<String> getBranch()
getCommitHashback to summary
public Optional<String> getCommitHash()
getOriginUrlback to summary
public Optional<String> getOriginUrl()
getStatusback to summary
public Optional<String> getStatus()
org.junit.platform.reporting.open.xml back to summary

public Class GitInfoCollector.CliGitInfoCollector

extends Object
implements GitInfoCollector
Class Inheritance
  • java.lang.Object
  • org.junit.platform.reporting.open.xml.GitInfoCollector.CliGitInfoCollector
All Implemented Interfaces
org.junit.platform.reporting.open.xml.GitInfoCollector

Field Summary

Modifier and TypeField and Description
private static final String
private final GitInfoCollector.ProcessExecutor
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Optional<String>
public Optional<String>
public Optional<String>
public Optional<String>
private Optional<String>
private Optional<GitInfoCollector.GitUrl>
toGitUrl(String remoteUrl)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALLOWED_USERNAMEback to summary
private static final String ALLOWED_USERNAME
executorback to summary
private final GitInfoCollector.ProcessExecutor executor
USER_INFO_REPLACEMENTback to summary
private static final String USER_INFO_REPLACEMENT
USER_INFO_SEPARATORback to summary
private static final String USER_INFO_SEPARATOR

Constructor Detail

CliGitInfoCollectorback to summary
pack-priv CliGitInfoCollector(GitInfoCollector.ProcessExecutor executor)

Method Detail

getBranchback to summary
public Optional<String> getBranch()

Implements org.junit.platform.reporting.open.xml.GitInfoCollector.getBranch.

Annotations
@Override
getCommitHashback to summary
public Optional<String> getCommitHash()

Implements org.junit.platform.reporting.open.xml.GitInfoCollector.getCommitHash.

Annotations
@Override
getOriginUrlback to summary
public Optional<String> getOriginUrl()

Implements org.junit.platform.reporting.open.xml.GitInfoCollector.getOriginUrl.

Annotations
@Override
getStatusback to summary
public Optional<String> getStatus()

Implements org.junit.platform.reporting.open.xml.GitInfoCollector.getStatus.

Annotations
@Override
obfuscateUserInfoback to summary
private Optional<String> obfuscateUserInfo(GitInfoCollector.GitUrl gitUrl)
toGitUrlback to summary
private Optional<GitInfoCollector.GitUrl> toGitUrl(String remoteUrl)
org.junit.platform.reporting.open.xml back to summary

public Class GitInfoCollector.GitUrl

extends Object
Class Inheritance
  • java.lang.Object
  • org.junit.platform.reporting.open.xml.GitInfoCollector.GitUrl

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final URI

Constructor Summary

AccessConstructor and Description
pack-priv
GitUrl(String rawValue, URI uri, String addedPrefix)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

addedPrefixback to summary
private final String addedPrefix
rawValueback to summary
private final String rawValue
uriback to summary
private final URI uri

Constructor Detail

GitUrlback to summary
pack-priv GitUrl(String rawValue, URI uri, String addedPrefix)
org.junit.platform.reporting.open.xml back to summary

public Class GitInfoCollector.ProcessExecutor

extends Object
Class Inheritance
  • java.lang.Object
  • org.junit.platform.reporting.open.xml.GitInfoCollector.ProcessExecutor

Field Summary

Modifier and TypeField and Description
private final Path

Constructor Summary

AccessConstructor and Description
pack-priv
ProcessExecutor(Path workingDir)

Method Summary

Modifier and TypeMethod and Description
pack-priv Optional<String>
exec(String... args)

private static BufferedReader
private static void
readAllChars(Reader reader, BiConsumer<char[], Integer> consumer)

private Process
startProcess(String[] command)

private static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

workingDirback to summary
private final Path workingDir

Constructor Detail

ProcessExecutorback to summary
pack-priv ProcessExecutor(Path workingDir)

Method Detail

execback to summary
pack-priv Optional<String> exec(String... args)
newBufferedReaderback to summary
private static BufferedReader newBufferedReader(InputStream stream)
readAllCharsback to summary
private static void readAllChars(Reader reader, BiConsumer<char[], Integer> consumer) throws IOException
startProcessback to summary
private Process startProcess(String[] command)
trimAtEndback to summary
private static String trimAtEnd(StringBuilder value)