|
org.netbeans.modules.extexecution/2 1.21.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.api.extexecution.input.LineProcessors
public final class LineProcessors
Factory methods for LineProcessor classes.
Note that main difference between InputProcessor and
LineProcessor is that LineProcessor always process whole lines.
InputProcessors.bridge(org.netbeans.api.extexecution.input.LineProcessor)| Method Summary | |
|---|---|
static LineProcessor |
patternWaiting(Pattern pattern,
CountDownLatch latch)
Returns the processor that will wait for the line matching the pattern, decreasing the latch when such line appears for the first time. |
static LineProcessor |
printing(OutputWriter out,
boolean resetEnabled)
Returns the processor printing all lines passed for processing to the given output writer. |
static LineProcessor |
printing(OutputWriter out,
LineConvertor convertor,
boolean resetEnabled)
Returns the processor converting lines with convertor and printing the result to the given output writer. |
static LineProcessor |
proxy(LineProcessor... processors)
Returns the processor acting as a proxy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
@NonNull
public static LineProcessor proxy(@NonNull
LineProcessor... processors)
Any action taken on this processor is distributed to all processors passed as arguments in the same order as they were passed to this method.
Returned processor is not thread safe.
processors - processor to which the actions will be ditributed
@NonNull
public static LineProcessor printing(@NonNull
OutputWriter out,
boolean resetEnabled)
Reset action on the returned processor resets the writer if it is enabled
by passing true as resetEnabled. Processor
closes the output writer on InputProcessor.close().
Returned processor is not thread safe.
out - where to print received linesresetEnabled - determines whether the reset operation will work
(will reset the writer if so)
@NonNull
public static LineProcessor printing(@NonNull
OutputWriter out,
@NullAllowed
LineConvertor convertor,
boolean resetEnabled)
null) raw
lines are printed.
Reset action on the returned processor resets the writer if it is enabled
by passing true as resetEnabled. Processor
closes the output writer on InputProcessor.close().
Returned processor is not thread safe.
out - where to print converted lines and charactersconvertor - convertor converting the lines before printing,
may be nullresetEnabled - determines whether the reset operation will work
(will reset the writer if so)
LineConvertor
@NonNull
public static LineProcessor patternWaiting(@NonNull
Pattern pattern,
@NonNull
CountDownLatch latch)
Reset action on the returned processor is noop.
Returned processor is thread safe.
pattern - pattern that line must match in order decrease the latchlatch - latch to decrease when the line matching the pattern appears
for the first time
|
org.netbeans.modules.extexecution/2 1.21.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||