Class FileInfoContainer


  • public class FileInfoContainer
    extends java.lang.Object
    The class is one from the main classes in the preprocessor because it describes a preprocessing file and contains business logic for the process
    • Field Detail

      • sourceFile

        private final java.io.File sourceFile
        The source file for the container
      • forCopyOnly

        private final boolean forCopyOnly
        The flag shows that the file should be just copied into the destination place without any preprocessing
      • excludedFromPreprocessing

        private boolean excludedFromPreprocessing
        The flag shows that the file has been excluded from preprocessing and it will not be preprocessed and copied
      • destFolder

        private java.lang.String destFolder
        The destination directory for the file
      • destFileName

        private java.lang.String destFileName
        The destination name for the file
    • Constructor Detail

      • FileInfoContainer

        public FileInfoContainer​(java.io.File srcFile,
                                 java.lang.String dstFileName,
                                 boolean copyOnly)
    • Method Detail

      • getSourceFile

        public java.io.File getSourceFile()
      • isExcludedFromPreprocessing

        public boolean isExcludedFromPreprocessing()
      • isForCopyOnly

        public boolean isForCopyOnly()
      • getDestinationDir

        public java.lang.String getDestinationDir()
      • getDestinationName

        public java.lang.String getDestinationName()
      • getDestinationFilePath

        public java.lang.String getDestinationFilePath()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • preprocessFile

        public PreprocessingState preprocessFile​(PreprocessingState state,
                                                 PreprocessorContext context)
                                          throws java.io.IOException
        Preprocess file, NB! it doesn't clear local variables automatically for cloned contexts
        Parameters:
        state - the start preprocessing state, can be null
        context - the preprocessor context, must not be null
        Returns:
        the state for the preprocessed file
        Throws:
        java.io.IOException
        PreprocessorException
      • processStringForTailRemover

        private static java.lang.String processStringForTailRemover​(java.lang.String str)
      • checkDirectiveArgumentRoughly

        private boolean checkDirectiveArgumentRoughly​(AbstractDirectiveHandler directive,
                                                      java.lang.String rest)
      • setDestinationDir

        public void setDestinationDir​(java.lang.String destDir)
      • setDestinationName

        public void setDestinationName​(java.lang.String destName)
      • setExcluded

        public void setExcluded​(boolean flag)