info.leadinglight.umljavadoclet.printer.Printer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of uml-java-doclet Show documentation
Show all versions of uml-java-doclet Show documentation
Add UML diagrams (using PlantUML) to Javadocs. Extends the standard Java doclet.
The newest version!
package info.leadinglight.umljavadoclet.printer;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
public abstract class Printer {
public boolean toFile(String filename) {
return dumpToFile(filename, _sb.toString());
}
public boolean toFile(File file) {
return dumpToFile(file, _sb.toString());
}
@Override
public String toString() {
return _sb.toString();
}
public StringBuilder stringBuilder() {
return _sb;
}
public void print(String str) {
_sb.append(str);
}
public void print(int level, String str) {
indent(level);
_sb.append(str);
}
public void println(String str) {
_sb.append(str);
_sb.append("\n");
}
public void println(int level, String str) {
indent(level);
_sb.append(str);
_sb.append("\n");
}
public void indent() {
indent(1);
}
public void indent(int level) {
for (int i=0; i