public class FileInfoContainer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
destFileName
The destination name for the file
|
private java.lang.String |
destFolder
The destination directory for the file
|
private static java.util.regex.Pattern |
DIRECTIVE_HASH_PREFIXED |
private static java.util.regex.Pattern |
DIRECTIVE_SINGLE_DOLLAR_PREFIXED |
private static java.util.regex.Pattern |
DIRECTIVE_TAIL_REMOVER |
private static java.util.regex.Pattern |
DIRECTIVE_TWO_DOLLARS_PREFIXED |
private boolean |
excludedFromPreprocessing
The flag shows that the file has been excluded from preprocessing and it will not be preprocessed and copied
|
private boolean |
forCopyOnly
The flag shows that the file should be just copied into the destination place without any preprocessing
|
private java.io.File |
sourceFile
The source file for the container
|
| Constructor and Description |
|---|
FileInfoContainer(java.io.File srcFile,
java.lang.String dstFileName,
boolean copyOnly) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
checkDirectiveArgumentRoughly(AbstractDirectiveHandler directive,
java.lang.String rest) |
private java.lang.String |
extractDoubleDollarPrefixedDirective(java.lang.String line,
PreprocessorContext context) |
private java.lang.String |
extractHashPrefixedDirective(java.lang.String line,
PreprocessorContext context) |
private java.lang.String |
extractSingleDollarPrefixedDirective(java.lang.String line,
PreprocessorContext context) |
private static java.lang.String |
findTailRemover(java.lang.String str,
PreprocessorContext context) |
java.lang.String |
getDestinationDir() |
java.lang.String |
getDestinationFilePath() |
java.lang.String |
getDestinationName() |
java.io.File |
getSourceFile() |
private boolean |
isDoubleDollarPrefixed(java.lang.String line,
PreprocessorContext context) |
boolean |
isExcludedFromPreprocessing() |
boolean |
isForCopyOnly() |
private boolean |
isHashPrefixed(java.lang.String line,
PreprocessorContext context) |
private boolean |
isSingleDollarPrefixed(java.lang.String line,
PreprocessorContext context) |
PreprocessingState |
preprocessFile(PreprocessingState state,
PreprocessorContext context)
Preprocess file, NB! it doesn't clear local variables automatically for cloned contexts
|
protected AfterDirectiveProcessingBehaviour |
processDirective(PreprocessingState state,
java.lang.String directiveString,
PreprocessorContext context,
boolean firstPass) |
java.util.List<PreprocessingState.ExcludeIfInfo> |
processGlobalDirectives(PreprocessingState state,
PreprocessorContext context) |
void |
setDestinationDir(java.lang.String destDir) |
void |
setDestinationName(java.lang.String destName) |
void |
setExcluded(boolean flag) |
java.lang.String |
toString() |
private static final java.util.regex.Pattern DIRECTIVE_HASH_PREFIXED
private static final java.util.regex.Pattern DIRECTIVE_TWO_DOLLARS_PREFIXED
private static final java.util.regex.Pattern DIRECTIVE_SINGLE_DOLLAR_PREFIXED
private static final java.util.regex.Pattern DIRECTIVE_TAIL_REMOVER
private final java.io.File sourceFile
private final boolean forCopyOnly
private boolean excludedFromPreprocessing
private java.lang.String destFolder
private java.lang.String destFileName
public FileInfoContainer(java.io.File srcFile,
java.lang.String dstFileName,
boolean copyOnly)
public java.io.File getSourceFile()
public boolean isExcludedFromPreprocessing()
public boolean isForCopyOnly()
public java.lang.String getDestinationDir()
public java.lang.String getDestinationName()
public java.lang.String getDestinationFilePath()
public java.lang.String toString()
toString in class java.lang.Object@MustNotContainNull public java.util.List<PreprocessingState.ExcludeIfInfo> processGlobalDirectives(PreprocessingState state, PreprocessorContext context) throws java.io.IOException
java.io.IOExceptionprivate boolean isDoubleDollarPrefixed(java.lang.String line,
PreprocessorContext context)
private boolean isSingleDollarPrefixed(java.lang.String line,
PreprocessorContext context)
private boolean isHashPrefixed(java.lang.String line,
PreprocessorContext context)
private java.lang.String extractHashPrefixedDirective(java.lang.String line,
PreprocessorContext context)
private java.lang.String extractDoubleDollarPrefixedDirective(java.lang.String line,
PreprocessorContext context)
private java.lang.String extractSingleDollarPrefixedDirective(java.lang.String line,
PreprocessorContext context)
public PreprocessingState preprocessFile(PreprocessingState state, PreprocessorContext context) throws java.io.IOException
state - the start preprocessing state, can be nullcontext - the preprocessor context, must not be nulljava.io.IOException - it will be thrown for IO errorsPreprocessorException - it will be thrown for violation of preprocessing logic, like undefined variableprivate static java.lang.String findTailRemover(java.lang.String str,
PreprocessorContext context)
private boolean checkDirectiveArgumentRoughly(AbstractDirectiveHandler directive, java.lang.String rest)
protected AfterDirectiveProcessingBehaviour processDirective(PreprocessingState state, java.lang.String directiveString, PreprocessorContext context, boolean firstPass) throws java.io.IOException
java.io.IOExceptionpublic void setDestinationDir(java.lang.String destDir)
public void setDestinationName(java.lang.String destName)
public void setExcluded(boolean flag)