Class PreprocessingState
java.lang.Object
com.igormaznitsa.jcp.context.PreprocessingState
The class describes a preprocessor state also it contains inside buffers and save data on disk
- Author:
- Igor Maznitsa (igor.maznitsa@igormaznitsa.com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()goToString(int stringIndex) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanmakeException(String message, String causeString, Throwable cause) nextLine()peekFile()peekIf()voidpopIf()popWhile()voidpushExcludeIfData(FileInfoContainer infoContainer, String excludeIfCondition, int stringIndex) pushIf(boolean makeActive) pushWhile(boolean makeActive) voidbooleansaveBuffersToFile(File outFile, boolean removeComments) voidsaveBuffersToStreams(OutputStream prefix, OutputStream normal, OutputStream postfix) voidwritePrinterBuffers(Writer writer)
-
Field Details
-
EMPTY_STACK
-
MAX_WRITE_BUFFER_SIZE
public static final int MAX_WRITE_BUFFER_SIZE- See Also:
-
-
Method Details
-
getLastReadString
-
pushExcludeIfData
public void pushExcludeIfData(FileInfoContainer infoContainer, String excludeIfCondition, int stringIndex) -
popAllExcludeIfInfoData
-
popExcludeIfData
-
getPreprocessingFlags
-
getPrinter
- Throws:
IOException
-
getRootTextContainer
-
openFile
- Throws:
IOException
-
peekFile
-
makeIncludeStack
-
popTextContainer
-
getRootFileInfo
-
isIncludeStackEmpty
public boolean isIncludeStackEmpty() -
isOnlyRootOnStack
public boolean isOnlyRootOnStack() -
popWhile
-
pushWhile
-
peekWhile
-
hasReadLineNextLineInEnd
public boolean hasReadLineNextLineInEnd() -
nextLine
-
goToString
-
pushIf
-
popAllIFUntilContainerWithFile
-
popIf
-
isAtActiveWhile
public boolean isAtActiveWhile() -
isAtActiveIf
public boolean isAtActiveIf() -
isDirectiveCanBeProcessedIgnoreBreak
public boolean isDirectiveCanBeProcessedIgnoreBreak() -
isDirectiveCanBeProcessed
public boolean isDirectiveCanBeProcessed() -
peekIf
-
isIfStackEmpty
public boolean isIfStackEmpty() -
isWhileStackEmpty
public boolean isWhileStackEmpty() -
setPrinter
-
resetPrinters
public void resetPrinters() -
saveBuffersToStreams
public void saveBuffersToStreams(OutputStream prefix, OutputStream normal, OutputStream postfix) throws IOException - Throws:
IOException
-
saveBuffersToFile
- Throws:
IOException
-
writePrinterBuffers
- Throws:
IOException
-
makeException
-
dispose
public void dispose()
-