Search in sources :

Example 1 with IFormatHandler

use of loci.formats.IFormatHandler in project bioformats by openmicroscopy.

the class MetaSupportList method format.

/**
 * Gets the name of the format for the current handler.
 */
public String format() {
    ReflectedUniverse r = new ReflectedUniverse();
    IFormatHandler handler;
    try {
        r.exec("import loci.formats.in." + handlerName);
    } catch (ReflectException exc) {
    }
    try {
        r.exec("import loci.formats.out." + handlerName);
    } catch (ReflectException exc) {
    }
    try {
        handler = (IFormatHandler) r.exec("new " + handlerName + "()");
        return handler.getFormat();
    } catch (ReflectException exc) {
    }
    return null;
}
Also used : IFormatHandler(loci.formats.IFormatHandler) ReflectedUniverse(loci.common.ReflectedUniverse) ReflectException(loci.common.ReflectException)

Aggregations

ReflectException (loci.common.ReflectException)1 ReflectedUniverse (loci.common.ReflectedUniverse)1 IFormatHandler (loci.formats.IFormatHandler)1