|
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.InputProcessors
public final class InputProcessors
Factory methods for InputProcessor classes.
| Method Summary | |
|---|---|
static InputProcessor |
ansiStripping(InputProcessor delegate)
Returns the processor that strips any ANSI escape sequences and passes the result to the delegate. |
static InputProcessor |
bridge(LineProcessor lineProcessor)
Returns the processor converting characters to the whole lines passing them to the given line processor. |
static InputProcessor |
copying(Writer writer)
Returns the processor that writes every character passed for processing to the given writer. |
static InputProcessor |
printing(OutputWriter out,
boolean resetEnabled)
Returns the processor printing all characters passed for processing to the given output writer. |
static InputProcessor |
printing(OutputWriter out,
LineConvertor convertor,
boolean resetEnabled)
Returns the processor converting whole lines with convertor and printing the result including unterminated tail (if present) to the given output writer. |
static InputProcessor |
proxy(InputProcessor... 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 InputProcessor bridge(@NonNull
LineProcessor lineProcessor)
Any reset or close is delegated to the corresponding method of line processor.
Returned processor is not thread safe.
lineProcessor - processor consuming parsed lines
@NonNull
public static InputProcessor proxy(@NonNull
InputProcessor... 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 InputProcessor copying(@NonNull
Writer writer)
Reset action on the returned processor is noop. Processor closes the
writer on InputProcessor.close().
Returned processor is not thread safe.
writer - processed characters will be written to this writer
@NonNull
public static InputProcessor 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 charactersresetEnabled - determines whether the reset operation will work
(will reset the writer if so)
@NonNull
public static InputProcessor 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 whole lines
before printing, may be nullresetEnabled - determines whether the reset operation will work
(will reset the writer if so)
LineConvertor
@NonNull
public static InputProcessor ansiStripping(@NonNull
InputProcessor delegate)
Reset and close methods on the returned processor invokes the corresponding actions on delegate.
Returned processor is not thread safe.
delegate - processor that will receive characters without control
sequences
|
org.netbeans.modules.extexecution/2 1.21.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||