Class FilterHelpAppendable
- All Implemented Interfaces:
Appendable,HelpAppendable
- Direct Known Subclasses:
TextHelpAppendable
HelpAppendable that writes output to an Appendable instance.
This class is the superclass of all classes that filter help appendables. These appendable sit on top of an existing appendable (the underlying appendable) which it uses as its basic sink of data, but possibly transforming the data along the way or providing additional functionality.
The class FilterHelpAppendable itself simply overrides all methods of HelpAppendable with versions that pass all requests to the underlying
appendable. Subclasses of FilterHelpAppendable may further override some of these methods as well as provide additional methods and fields.
Implementation Note: This class is similar to FilterOutputStream in relation to OutputStream. We could further split FilterHelpAppendable into a FilterAppendable but that seems like YAGNI.
- Since:
- 1.10.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AppendableThe underlying appendable to be filtered. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFilterHelpAppendable(Appendable output) Constructs an appendable filter built on top of the specified underlying appendable. -
Method Summary
Modifier and TypeMethodDescriptionappend(char ch) append(CharSequence text) append(CharSequence csq, int start, int end) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.cli.help.HelpAppendable
appendFormat, appendHeader, appendList, appendParagraph, appendParagraphFormat, appendTable, appendTitle
-
Field Details
-
output
The underlying appendable to be filtered.
-
-
Constructor Details
-
FilterHelpAppendable
Constructs an appendable filter built on top of the specified underlying appendable.- Parameters:
output- the underlying appendable to be assigned to the fieldthis.outputfor later use, ornullif this instance is to be created without an underlying stream.
-
-
Method Details
-
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-