public class CodeAugmentationGenericTask
extends java.lang.Object
If code changes are detected, then EFFECT-CHANGES OS shell script (in destination directory of generated files) can be run with -f option to bring source files up to date with generated files by overwritig them. Running EFFECT-CHANGES without any command line option brings help information on how to use the command.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CHANGE_DETAILS_FILE_NAME
Name of file used to store diff of generated files when code change detection is enabled.
|
static java.lang.String |
CHANGE_SUMMARY_FILE_NAME
Name of file used to store generated files when code change detection is enabled.
|
static java.lang.String |
SHELL_SCRIPT_PREFIX
Base name of OS shell script for viewing and making changes to source files in which
code changes were detected.
|
static java.lang.String |
WITHOUT_CHANGE_DETECTION_SUMMARY_FILE_NAME
Name of file used to store generated files when code change detection is disabled.
|
| Constructor and Description |
|---|
CodeAugmentationGenericTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Runs completion stage.
|
java.util.List<java.lang.Throwable> |
getAllErrors()
Gets the error results of executing the task.
|
java.io.File |
getChangeDetailsFile()
Name of file with details of code changes detected in Unix diff normal format.
|
java.io.File |
getChangeSummaryFile()
If task was successfully executed, this property points to a
file directly inside destination directory which contains
listing of generated files and their corresponding files.
|
java.io.File |
getDestDir() |
java.util.List<java.io.File> |
getGeneratedCodeFiles() |
java.util.function.BiConsumer<GenericTaskLogLevel,java.util.function.Supplier<java.lang.String>> |
getLogAppender() |
java.io.File |
getPrepFile() |
boolean |
isCodeChangeDetected()
If code change detection is enabled, then this property
informs on whether there were changes generated or not.
|
boolean |
isCodeChangeDetectionDisabled() |
void |
setCodeChangeDetectionDisabled(boolean codeChangeDetectionDisabled)
Sets whether or not code change detection should be disabled.
|
void |
setDestDir(java.io.File destDir)
Sets the destination directory for generated files.
|
void |
setGeneratedCodeFiles(java.util.List<java.io.File> generatedCodeFiles)
Sets the files with generated code in them which will
be merged into source files passed to the prepare stage.
|
void |
setLogAppender(java.util.function.BiConsumer<GenericTaskLogLevel,java.util.function.Supplier<java.lang.String>> logAppender)
Sets logging procedure for this task.
|
void |
setPrepFile(java.io.File prepFile)
Sets this property with the prepFile output of the prepare stage.
|
public static final java.lang.String CHANGE_SUMMARY_FILE_NAME
public static final java.lang.String CHANGE_DETAILS_FILE_NAME
public static final java.lang.String WITHOUT_CHANGE_DETECTION_SUMMARY_FILE_NAME
public static final java.lang.String SHELL_SCRIPT_PREFIX
public void execute()
throws java.lang.Exception
java.lang.Exceptionpublic java.util.function.BiConsumer<GenericTaskLogLevel,java.util.function.Supplier<java.lang.String>> getLogAppender()
public void setLogAppender(java.util.function.BiConsumer<GenericTaskLogLevel,java.util.function.Supplier<java.lang.String>> logAppender)
logAppender - logging procedure or null for no loggingpublic java.io.File getPrepFile()
public void setPrepFile(java.io.File prepFile)
prepFile - PreCodeAugmentationGenericTask.setPrepFile(File)public java.util.List<java.io.File> getGeneratedCodeFiles()
public void setGeneratedCodeFiles(java.util.List<java.io.File> generatedCodeFiles)
generatedCodeFiles - ProcessCodeGenericTask.setOutputFile(File)public java.io.File getDestDir()
public void setDestDir(java.io.File destDir)
If code change detection is disabled, then OUTPUT-SUMMARY.txt will be present. Else instead of OUTPUT-SUMMARY.txt, the following files will be present: CHANGE-SUMMARY.txt, CHANGE-DETAILS.txt, EFFECT-CHANGES
destDir - public boolean isCodeChangeDetectionDisabled()
public void setCodeChangeDetectionDisabled(boolean codeChangeDetectionDisabled)
codeChangeDetectionDisabled - public java.util.List<java.lang.Throwable> getAllErrors()
public java.io.File getChangeSummaryFile()
public java.io.File getChangeDetailsFile()
public boolean isCodeChangeDetected()