Interface RegenerationCheckStrategy
-
- All Known Implementing Classes:
RegenerationCheckStrategy.VersionMarkerRegenerationCheckStrategy
public interface RegenerationCheckStrategy
A strategy to decide whether we need to regenerate an output file from input files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RegenerationCheckStrategy.VersionMarkerRegenerationCheckStrategy
-
Field Summary
Fields Modifier and Type Field Description static RegenerationCheckStrategy
ALWAYS
static RegenerationCheckStrategy
IF_NOT_EXISTS
static RegenerationCheckStrategy
IF_OLDER
Regenerate when output file does not exist or is older than one of the input files.static RegenerationCheckStrategy
VERSIONMARKER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
needsRegeneration(AIInOut output, List<AIInOut> inputs, WritingStrategy writingStrategy, List<String> inputVersions)
Decides whether the output file needs to be regenerated.
-
-
-
Field Detail
-
ALWAYS
static final RegenerationCheckStrategy ALWAYS
-
IF_NOT_EXISTS
static final RegenerationCheckStrategy IF_NOT_EXISTS
-
IF_OLDER
static final RegenerationCheckStrategy IF_OLDER
Regenerate when output file does not exist or is older than one of the input files.
-
VERSIONMARKER
static final RegenerationCheckStrategy VERSIONMARKER
-
-
Method Detail
-
needsRegeneration
boolean needsRegeneration(@Nonnull AIInOut output, @Nonnull List<AIInOut> inputs, @Nonnull WritingStrategy writingStrategy, @Nonnull List<String> inputVersions)
Decides whether the output file needs to be regenerated.- Parameters:
output
- the output fileinputs
- the input files . Caution: a file with name "-" is a placeholder for stdin - it is not a file.writingStrategy
- the writing strategy used to write the output file.inputVersions
- versions of all inputs- Returns:
- true if the output file needs to be regenerated.
-
-