de.uka.ilkd.pp.package.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of io7m-jpplib-core Show documentation
Show all versions of io7m-jpplib-core Show documentation
Generic pretty printer (Core)
The newest version!
A package to pretty-print information using line breaks and
indentation. For instance, it can be used to print
while (i>0) {
i--;
j++;
}
instead of
while (i>0) { i
--; j++;}
if a maximum line width of 15 characters is chosen. The frontend
to the Pretty-Printer is the {@link de.uka.ilkd.pp.Layouter} class.
You may configure what happens with the output by implemenenting the
{@link de.uka.ilkd.pp.Backend} interface, or by using one of the
standard implementations {@link de.uka.ilkd.pp.StringBackend} and
{@link de.uka.ilkd.pp.WriterBackend}.
A particularly common use is to print arbitrary data structures
like with the {@link java.lang.Object#toString()} method, but formatted using
whitespace and indentation. This is supported by the {@link de.uka.ilkd.pp.DataLayouter}
class, which provides for standard layouts for collections, arrays,
and maps, but also allows new classes to implement the
{@link de.uka.ilkd.pp.PrettyPrintable} interface to specify their preferred layout.
@author Martin Giese
© 2015 - 2024 Weber Informatics LLC | Privacy Policy