loci.formats
Class ClassList

java.lang.Object
  extended by loci.formats.ClassList

public class ClassList
extends Object

ClassList is a list of classes for use with ImageReader or ImageWriter, parsed from a configuration file such as readers.txt or writers.txt.

Source code:
Trac, SVN

Author:
Curtis Rueden ctrueden at wisc.edu

Constructor Summary
ClassList(Class base)
          Constructs a list of classes, initially empty.
ClassList(String file, Class base)
          Constructs a list of classes from the given configuration file.
 
Method Summary
 void addClass(Class c)
          Adds the given class, which must be assignable to the base class, to the list.
 Class[] getClasses()
          Gets the list of classes as an array.
 void removeClass(Class c)
          Removes the given class from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassList

public ClassList(Class base)
Constructs a list of classes, initially empty.

Parameters:
base - Base class to which all classes are assignable.

ClassList

public ClassList(String file,
                 Class base)
          throws IOException
Constructs a list of classes from the given configuration file.

Parameters:
file - Configuration file containing the list of classes.
base - Base class to which all classes are assignable.
Throws:
IOException - if the file cannot be read.
Method Detail

addClass

public void addClass(Class c)
              throws FormatException
Adds the given class, which must be assignable to the base class, to the list.

Throws:
FormatException - if the class is not assignable to the base class.

removeClass

public void removeClass(Class c)
Removes the given class from the list.


getClasses

public Class[] getClasses()
Gets the list of classes as an array.