Changeset 4144


Ignore:
Timestamp:
07/01/08 08:26:45 (12 years ago)
Author:
melissa
Message:

Added ClassList constructor that takes an additional Class parameter, which specifies which package to search for the given filename.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ClassList.java

    r4048 r4144  
    6767   */ 
    6868  public ClassList(String file, Class base) throws IOException { 
     69    this(file, base, getClass()); 
     70  } 
     71 
     72  /** 
     73   * Constructs a list of classes from the given configuration file. 
     74   * @param file Configuration file containing the list of classes. 
     75   * @param base Base class to which all classes are assignable. 
     76   * @param location Class indicating which package to search for the file. 
     77   * @throws IOException if the file cannot be read. 
     78   */ 
     79  public ClassList(String file, Class base, Class location) throws IOException { 
    6980    this.base = base; 
    7081    classes = new Vector(); 
     
    7384    // read classes from file 
    7485    BufferedReader in = new BufferedReader(new InputStreamReader( 
    75       getClass().getResourceAsStream(file))); 
     86      location.getResourceAsStream(file))); 
    7687    while (true) { 
    7788      String line = null; 
Note: See TracChangeset for help on using the changeset viewer.