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

com.github.rschmitt.dynamicobject.RecordPrinter Maven / Gradle / Ivy

package com.github.rschmitt.dynamicobject;

import java.io.IOException;
import java.io.Writer;

import static com.github.rschmitt.dynamicobject.ClojureStuff.WITH_META;
import static java.lang.String.format;

public final class RecordPrinter {
    /**
     * For use by print-method only. Do not call directly.
     */
    public static Object printRecord(Object obj, Writer writer, String tag) throws IOException {
        obj = WITH_META.invoke(obj, null);
        writer.write(format("#%s%s", tag, obj.toString()));
        return null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy