Class PreprocessingState


  • public final class PreprocessingState
    extends java.lang.Object
    The class describes a preprocessor state also it contains inside buffers and save data on disk
    • Constructor Detail

      • PreprocessingState

        PreprocessingState​(PreprocessorContext context,
                           FileInfoContainer rootFile,
                           java.lang.String inEncoding,
                           java.lang.String outEncoding,
                           boolean overrideOnlyIfContentChanged)
                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getLastReadString

        public java.lang.String getLastReadString()
      • pushExcludeIfData

        public void pushExcludeIfData​(FileInfoContainer infoContainer,
                                      java.lang.String excludeIfCondition,
                                      int stringIndex)
      • getPreprocessingFlags

        public java.util.Set<PreprocessingFlag> getPreprocessingFlags()
      • getPrinter

        public ResetablePrinter getPrinter()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • openFile

        public TextFileDataContainer openFile​(java.io.File file)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • isIncludeStackEmpty

        public boolean isIncludeStackEmpty()
      • isOnlyRootOnStack

        public boolean isOnlyRootOnStack()
      • cloneTopTextDataContainer

        private TextFileDataContainer cloneTopTextDataContainer​(boolean useLastReadStringIndex)
      • hasReadLineNextLineInEnd

        public boolean hasReadLineNextLineInEnd()
      • nextLine

        public java.lang.String nextLine()
      • popAllIFUntilContainerWithFile

        public void popAllIFUntilContainerWithFile​(TextFileDataContainer container)
      • isAtActiveWhile

        public boolean isAtActiveWhile()
      • isAtActiveIf

        public boolean isAtActiveIf()
      • isDirectiveCanBeProcessedIgnoreBreak

        public boolean isDirectiveCanBeProcessedIgnoreBreak()
      • isDirectiveCanBeProcessed

        public boolean isDirectiveCanBeProcessed()
      • isIfStackEmpty

        public boolean isIfStackEmpty()
      • isWhileStackEmpty

        public boolean isWhileStackEmpty()
      • init

        private void init()
      • resetPrinters

        public void resetPrinters()
      • saveBuffersToStreams

        public void saveBuffersToStreams​(java.io.OutputStream prefix,
                                         java.io.OutputStream normal,
                                         java.io.OutputStream postfix)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • saveBuffersToFile

        public boolean saveBuffersToFile​(java.io.File outFile,
                                         boolean removeComments)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • writePrinterBuffers

        public java.io.Writer writePrinterBuffers​(java.io.Writer writer)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • makeException

        public PreprocessorException makeException​(java.lang.String message,
                                                   java.lang.String causeString,
                                                   java.lang.Throwable cause)
      • dispose

        public void dispose()