net.sf.jlayercheck.util.model
Class FilesystemClassSource

java.lang.Object
  extended by net.sf.jlayercheck.util.model.FilesystemClassSource
All Implemented Interfaces:
ClassSource

public class FilesystemClassSource
extends Object
implements ClassSource


Field Summary
protected  String basedir
          Directory where the other pathes are relative to
protected  String bin
          Path to the .class files
protected  String src
          Path to the .java files
 
Constructor Summary
FilesystemClassSource(String basedir, String bin, String src)
           
 
Method Summary
 void call(ClassVisitor v)
          Runs the given DependencyVisitor on the classes of this source.
protected  void checkDirectory(ClassVisitor v, File f)
           
protected  Map<String,URL> findFiles(String base, String src, String extension)
          Returns a map containing all sources found by a recursive search.
 String getBasedir()
           
 String getBin()
           
 Map<String,URL> getSourceFiles()
          Returns a map that contains a mapping from the classname to the source file for a class for all classes found in the specified ClassSource.
 String getSrc()
           
 void setBasedir(String basedir)
           
 void setBin(String bin)
           
 void setSrc(String src)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bin

protected String bin
Path to the .class files


src

protected String src
Path to the .java files


basedir

protected String basedir
Directory where the other pathes are relative to

Constructor Detail

FilesystemClassSource

public FilesystemClassSource(String basedir,
                             String bin,
                             String src)
Method Detail

call

public void call(ClassVisitor v)
          throws IOException
Description copied from interface: ClassSource
Runs the given DependencyVisitor on the classes of this source.

Specified by:
call in interface ClassSource
Throws:
IOException

checkDirectory

protected void checkDirectory(ClassVisitor v,
                              File f)
                       throws IOException,
                              FileNotFoundException
Throws:
IOException
FileNotFoundException

getSourceFiles

public Map<String,URL> getSourceFiles()
Description copied from interface: ClassSource
Returns a map that contains a mapping from the classname to the source file for a class for all classes found in the specified ClassSource.

Specified by:
getSourceFiles in interface ClassSource
Returns:

findFiles

protected Map<String,URL> findFiles(String base,
                                    String src,
                                    String extension)
Returns a map containing all sources found by a recursive search.

Parameters:
src - start directory
extension - only files with this extension are added
Returns:

getBin

public String getBin()

setBin

public void setBin(String bin)

getSrc

public String getSrc()

setSrc

public void setSrc(String src)

getBasedir

public String getBasedir()

setBasedir

public void setBasedir(String basedir)


Copyright © 2007. All Rights Reserved.