Class DiskClassList

java.lang.Object
dxt.scanpath.v1.support.DiskClassList
All Implemented Interfaces:
ClassList

public class DiskClassList extends Object implements ClassList
A ClassList implementation that scans a directory on disk for .class files.
Author:
indroneel
  • Constructor Details

    • DiskClassList

      public DiskClassList(File dir)
      Creates a new DiskClassList that will scan the given directory for .class files into a collection.
      Parameters:
      dir - the directory to scan for .class files.
      Throws:
      RuntimeException - if the given directory is not a directory or cannot be read.
  • Method Details

    • getFiles

      public Iterable<ClassFile> getFiles()
      Returns an iterable collection of ClassFile objects that can be read from this ClassList. The returned collection is not guaranteed to be sorted in any particular order.
      Specified by:
      getFiles in interface ClassList
      Returns:
      an iterable collection of ClassFile objects that can be read from this ClassList
    • close

      public void close()
      Closes this ClassList and releases any resources associated with it. After calling this method, the ClassList should not be used again.
      Specified by:
      close in interface ClassList