Class MarkdownMIBTreeFormatter
java.lang.Object
org.snmp4j.agent.util.MarkdownMIBTreeFormatter
- All Implemented Interfaces:
MIBTreeFormatter
Renders a
MIBTree as a compact GitHub-flavored Markdown document that gives a human
readable overview of a MIB configuration.
The OID hierarchy is rendered as a nested bullet list in which chains of intermediate nodes with
a single child are collapsed, so each bullet is the full OID of a branching point or a configured
managed object. Scalar objects show their SMI syntax and value inline; conceptual tables are
rendered as Markdown tables (one row per configured row, one column per configured column).
Values that reference a runtime instance which could not be resolved statically are shown as
their configured reference token.
- Since:
- 3.9.2
- Version:
- 3.9.2
- Author:
- SNMP4J.org
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFormats the given MIB tree and returns the result as a string.voidformat(MIBTree tree, Appendable out) Formats the given MIB tree and appends the result to the suppliedAppendable.
-
Constructor Details
-
MarkdownMIBTreeFormatter
public MarkdownMIBTreeFormatter()
-
-
Method Details
-
format
Description copied from interface:MIBTreeFormatterFormats the given MIB tree and returns the result as a string.- Specified by:
formatin interfaceMIBTreeFormatter- Parameters:
tree- the MIB tree to format.- Returns:
- the formatted representation.
-
format
Description copied from interface:MIBTreeFormatterFormats the given MIB tree and appends the result to the suppliedAppendable.- Specified by:
formatin interfaceMIBTreeFormatter- Parameters:
tree- the MIB tree to format.out- the target to append the formatted representation to.- Throws:
IOException- if appending tooutfails.
-