Class PrintDebugFilter
- java.lang.Object
-
- com.kohlschutter.boilerpipe.filters.debug.PrintDebugFilter
-
- All Implemented Interfaces:
BoilerpipeFilter
public final class PrintDebugFilter extends java.lang.Object implements BoilerpipeFilter
Prints debug information about the current state of the TextDocument. (= callsTextDocument.debugString().
-
-
Field Summary
Fields Modifier and Type Field Description static PrintDebugFilterINSTANCEReturns the default instance forPrintDebugFilter, which dumps debug information toSystem.outprivate java.io.PrintWriterout
-
Constructor Summary
Constructors Constructor Description PrintDebugFilter(java.io.PrintWriter out)Creates a new instance ofPrintDebugFilter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PrintDebugFiltergetInstance()Returns the default instance forPrintDebugFilter, which dumps debug information toSystem.outbooleanprocess(TextDocument doc)Processes the given documentdoc.
-
-
-
Field Detail
-
INSTANCE
public static final PrintDebugFilter INSTANCE
Returns the default instance forPrintDebugFilter, which dumps debug information toSystem.out
-
out
private final java.io.PrintWriter out
-
-
Constructor Detail
-
PrintDebugFilter
public PrintDebugFilter(java.io.PrintWriter out)
Creates a new instance ofPrintDebugFilter. Only use this method if you are not going to dump the debug information toSystem.out-- for this case, usegetInstance()instead.- Parameters:
out- The targetPrintWriter. Will not be closed
-
-
Method Detail
-
getInstance
public static PrintDebugFilter getInstance()
Returns the default instance forPrintDebugFilter, which dumps debug information toSystem.out
-
process
public boolean process(TextDocument doc) throws BoilerpipeProcessingException
Description copied from interface:BoilerpipeFilterProcesses the given documentdoc.- Specified by:
processin interfaceBoilerpipeFilter- Parameters:
doc- TheTextDocumentthat is to be processed.- Returns:
trueif changes have been made to theTextDocument.- Throws:
BoilerpipeProcessingException
-
-