| Constructor and Description |
|---|
AccumulateClassNamesStep(ProjectFilesystem filesystem,
Optional<Path> pathToJarOrClassesDirectory,
Path whereClassNamesShouldBeWritten) |
| Modifier and Type | Method and Description |
|---|---|
static Optional<com.google.common.collect.ImmutableSortedMap<String,com.google.common.hash.HashCode>> |
calculateClassHashes(ExecutionContext context,
ProjectFilesystem filesystem,
Path path) |
StepExecutionResult |
execute(ExecutionContext context) |
String |
getDescription(ExecutionContext context) |
String |
getShortName() |
static com.google.common.collect.ImmutableSortedMap<String,com.google.common.hash.HashCode> |
parseClassHashes(List<String> lines) |
public AccumulateClassNamesStep(ProjectFilesystem filesystem, Optional<Path> pathToJarOrClassesDirectory, Path whereClassNamesShouldBeWritten)
pathToJarOrClassesDirectory - Where to look for .class files. If absent, then an empty
file will be written to whereClassNamesShouldBeWritten.whereClassNamesShouldBeWritten - Path to a file where an alphabetically sorted list of
class files and corresponding SHA-1 hashes of their contents will be written.public StepExecutionResult execute(ExecutionContext context) throws IOException
execute in interface StepIOExceptionpublic String getShortName()
getShortName in interface Steppublic String getDescription(ExecutionContext context)
getDescription in interface Steppublic static Optional<com.google.common.collect.ImmutableSortedMap<String,com.google.common.hash.HashCode>> calculateClassHashes(ExecutionContext context, ProjectFilesystem filesystem, Path path)
public static com.google.common.collect.ImmutableSortedMap<String,com.google.common.hash.HashCode> parseClassHashes(List<String> lines)
lines - that were written in the same format output by execute(ExecutionContext).