public class PreCodeAugmentationGenericTask
extends java.lang.Object
| Constructor and Description |
|---|
PreCodeAugmentationGenericTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes prepare stage of Code Augmentor.
|
java.util.List<java.lang.Throwable> |
getAllErrors()
Gets the error results of executing this task.
|
java.util.List<AugCodeProcessingSpec> |
getAugCodeProcessingSpecs() |
java.util.List<java.io.File> |
getBaseDirs() |
java.nio.charset.Charset |
getCharset() |
java.util.List<java.lang.String> |
getEmbeddedJsonDirectives() |
java.util.List<java.lang.String> |
getEmbeddedStringDirectives() |
java.util.List<java.lang.String> |
getGenCodeEndDirectives() |
java.util.List<java.lang.String> |
getGenCodeStartDirectives() |
java.util.List<java.lang.String> |
getInlineGenCodeDirectives() |
java.util.function.BiConsumer<GenericTaskLogLevel,java.util.function.Supplier<java.lang.String>> |
getLogAppender() |
java.util.List<java.lang.String> |
getNestedLevelEndMarkers() |
java.util.List<java.lang.String> |
getNestedLevelStartMarkers() |
java.io.File |
getPrepFile() |
java.util.List<java.lang.String> |
getRelativePaths() |
java.util.List<java.lang.String> |
getSkipCodeEndDirectives() |
java.util.List<java.lang.String> |
getSkipCodeStartDirectives() |
void |
setAugCodeProcessingSpecs(java.util.List<AugCodeProcessingSpec> augCodeProcessingSpecs)
Sets both augmenting code directives and the output file for storing the
augmenting code associated with these directives.
|
void |
setBaseDirs(java.util.List<java.io.File> baseDirs)
Sets the directories of the source file sets which will be processed by this
task.
|
void |
setCharset(java.nio.charset.Charset charset)
Sets the encoding of files which will be read and processed by this task.
|
void |
setEmbeddedJsonDirectives(java.util.List<java.lang.String> embeddedJsonDirectives)
This property defines embedded JSON directives for this task.
|
void |
setEmbeddedStringDirectives(java.util.List<java.lang.String> embeddedStringDirectives)
This property defines embedded string directives for this task.
|
void |
setGenCodeEndDirectives(java.util.List<java.lang.String> genCodeEndDirectives)
Defines generated code end directives for this task.
|
void |
setGenCodeStartDirectives(java.util.List<java.lang.String> genCodeStartDirectives)
This property defines generated code directives for this task.
|
void |
setInlineGenCodeDirectives(java.util.List<java.lang.String> inlineGenCodeDirectives)
This property defines for this task inline generated code directives.
|
void |
setLogAppender(java.util.function.BiConsumer<GenericTaskLogLevel,java.util.function.Supplier<java.lang.String>> logAppender)
Sets logging procedure for this task.
|
void |
setNestedLevelEndMarkers(java.util.List<java.lang.String> nestedLevelEndMarkers)
Sets the markers which this task uses to detect the end of nesting of augmenting
code sections.
|
void |
setNestedLevelStartMarkers(java.util.List<java.lang.String> nestedLevelStartMarkers)
Sets the markers which this task will use to nest and assign nested levels to
augmenting code sections.
|
void |
setPrepFile(java.io.File prepFile)
Sets the path of the prepFile output from this task.
|
void |
setRelativePaths(java.util.List<java.lang.String> relativePaths)
Sets the relative paths of the source files which will be processed by this
task.
|
void |
setSkipCodeEndDirectives(java.util.List<java.lang.String> skipCodeEndDirectives)
Defines skip code end directives for this task.
|
void |
setSkipCodeStartDirectives(java.util.List<java.lang.String> skipCodeEndDirectives)
This property defines skip code start directives.
|
public void execute()
throws java.lang.Exception
AugCodeProcessingSpec.getDestFile() specified will be created for
use as input to the processing stage.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 - public java.util.List<java.lang.String> getRelativePaths()
public void setRelativePaths(java.util.List<java.lang.String> relativePaths)
relativePaths - should be of the same size as baseDirs property.public java.util.List<java.io.File> getBaseDirs()
public void setBaseDirs(java.util.List<java.io.File> baseDirs)
baseDirs - should be of the same size as relativePaths propertypublic java.nio.charset.Charset getCharset()
public void setCharset(java.nio.charset.Charset charset)
charset - public java.io.File getPrepFile()
public void setPrepFile(java.io.File prepFile)
prepFile - public java.util.List<java.lang.String> getGenCodeStartDirectives()
public void setGenCodeStartDirectives(java.util.List<java.lang.String> genCodeStartDirectives)
genCodeStartDirectives - public java.util.List<java.lang.String> getGenCodeEndDirectives()
public void setGenCodeEndDirectives(java.util.List<java.lang.String> genCodeEndDirectives)
genCodeEndDirectives - setGenCodeStartDirectives(List)public java.util.List<java.lang.String> getEmbeddedStringDirectives()
public void setEmbeddedStringDirectives(java.util.List<java.lang.String> embeddedStringDirectives)
embeddedStringDirectives - setAugCodeProcessingSpecs(List)public java.util.List<java.lang.String> getEmbeddedJsonDirectives()
public void setEmbeddedJsonDirectives(java.util.List<java.lang.String> embeddedJsonDirectives)
embeddedJsonDirectives - setAugCodeProcessingSpecs(List)public java.util.List<java.lang.String> getSkipCodeStartDirectives()
public void setSkipCodeStartDirectives(java.util.List<java.lang.String> skipCodeEndDirectives)
skipCodeEndDirectives - public java.util.List<java.lang.String> getSkipCodeEndDirectives()
public void setSkipCodeEndDirectives(java.util.List<java.lang.String> skipCodeEndDirectives)
skipCodeEndDirectives - setSkipCodeStartDirectives(List)public java.util.List<java.lang.String> getInlineGenCodeDirectives()
public void setInlineGenCodeDirectives(java.util.List<java.lang.String> inlineGenCodeDirectives)
inlineGenCodeDirectives - public java.util.List<java.lang.String> getNestedLevelStartMarkers()
public void setNestedLevelStartMarkers(java.util.List<java.lang.String> nestedLevelStartMarkers)
Nested level numbering start from 0. At the end of parsing a source file, appropriate nested level end markers must be used to end the nested level with 0 or an error occurs.
nestedLevelStartMarkers - setAugCodeProcessingSpecs(List)public java.util.List<java.lang.String> getNestedLevelEndMarkers()
public void setNestedLevelEndMarkers(java.util.List<java.lang.String> nestedLevelEndMarkers)
Nested level numbers cannot be negative. It is therefore an error to encounter a nested level end marker when nested level number to be assigned is 0. That will mean that a corresponding nested level start marker was not previously seen.
nestedLevelEndMarkers - setAugCodeProcessingSpecs(List)public java.util.List<AugCodeProcessingSpec> getAugCodeProcessingSpecs()
public void setAugCodeProcessingSpecs(java.util.List<AugCodeProcessingSpec> augCodeProcessingSpecs)
The data of an augmenting code section (remainders of lines with augmenting code directives or embedded string/JSON directives) are stored in files for use as input to the processing stage.
This property can be set with one or more output files to enable source files to have augmenting codes which are not all processed in the same way. For each output file, this task only writes to it augmenting code sections identified by the augmenting code directives that are assigned to that output file. Thus preparation stage can produce multiple files containing augmenting codes, and for that reason completion stage too can receive multiple files containing generated codes.
augCodeProcessingSpecs - public java.util.List<java.lang.Throwable> getAllErrors()