Package com.io7m.jsx.prettyprint
Class JSXPrettyPrinterMarkupStyle
java.lang.Object
com.io7m.jsx.prettyprint.JSXPrettyPrinterMarkupStyle
- All Implemented Interfaces:
JSXPrettyPrinterType,Closeable,AutoCloseable
A pretty printer tailored to printing expressions that represent tree-like
documents.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static JSXPrettyPrinterTypenewPrinterWithWidthIndent(Writer in_out, int in_width, int in_indent) Create a new pretty printer.voidFormat the given expression and print to the output.
-
Method Details
-
newPrinterWithWidthIndent
public static JSXPrettyPrinterType newPrinterWithWidthIndent(Writer in_out, int in_width, int in_indent) Create a new pretty printer.- Parameters:
in_out- The output writerin_width- The maximum output width (note that unbreakable lines may exceed this width)in_indent- The indent for nested expressions- Returns:
- A new printer
-
print
Description copied from interface:JSXPrettyPrinterTypeFormat the given expression and print to the output.- Specified by:
printin interfaceJSXPrettyPrinterType- Parameters:
e- The expression- Throws:
IOException- On I/O errors
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-