net.sourceforge.pmd

Interface DataSource

public interface DataSource

Represents a source file to be analyzed. Different implementations can get the source file from different places: the filesystem, a zip or jar file, etc.
Method Summary
InputStreamgetInputStream()
Get an InputStream on the source file.
StringgetNiceFileName(boolean shortNames, String inputFileName)
Return a nice version of the filename.

Method Detail

getInputStream

public InputStream getInputStream()
Get an InputStream on the source file.

Returns: the InputStream reading the source file

Throws: IOException if the file can't be opened

getNiceFileName

public String getNiceFileName(boolean shortNames, String inputFileName)
Return a nice version of the filename.

Parameters: shortNames true if short names are being used inputFileName name of a "master" file this file is relative to

Returns: String