All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.leadinglight.umljavadoclet.printer.Printer Maven / Gradle / Ivy

Go to download

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy