@Deprecated public class DefaultProjectFileSystem extends Object implements ProjectFileSystem
ProjectFileSystem.
For internal use only.| Modifier and Type | Field and Description |
|---|---|
protected static com.google.common.base.Predicate<File> |
DIRECTORY_EXISTS
Deprecated.
|
| Constructor and Description |
|---|
DefaultProjectFileSystem(Project project,
Languages languages)
Deprecated.
|
DefaultProjectFileSystem(Project project,
Languages languages,
FileFilter... fileFilters)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
DefaultProjectFileSystem |
addSourceDir(File dir)
Deprecated.
since 2.6, because should be immutable
|
DefaultProjectFileSystem |
addTestDir(File dir)
Deprecated.
since 2.6, because should be immutable
|
File |
getBasedir()
Deprecated.
Project root directory.
|
File |
getBuildDir()
Deprecated.
Build directory.
|
File |
getBuildOutputDir()
Deprecated.
Directory where classes are placed.
|
File |
getFileFromBuildDirectory(String filename)
Deprecated.
|
protected List<File> |
getInitialSourceFiles()
Deprecated.
|
protected List<File> |
getInitialTestFiles()
Deprecated.
|
List<File> |
getJavaSourceFiles()
Deprecated.
in 2.6, use
mainFiles(String...) instead |
static String |
getRelativePath(File file,
File dir)
Deprecated.
getRelativePath("c:/foo/src/my/package/Hello.java", "c:/foo/src") is "my/package/Hello.java"
|
static String |
getRelativePath(File file,
List<File> dirs)
Deprecated.
getRelativePath("c:/foo/src/my/package/Hello.java", ["c:/bar", "c:/foo/src"]) is "my/package/Hello.java".
|
File |
getReportOutputDir()
Deprecated.
|
File |
getSonarWorkingDirectory()
Deprecated.
|
Charset |
getSourceCharset()
Deprecated.
Source encoding.
|
List<File> |
getSourceDirs()
Deprecated.
Maven can modify source directories during Sonar execution - see MavenPhaseExecutor.
|
List<File> |
getSourceFiles(Language... langs)
Deprecated.
in 2.6, use
mainFiles(String...) instead |
List<File> |
getTestDirs()
Deprecated.
Maven can modify test directories during Sonar execution - see MavenPhaseExecutor.
|
List<File> |
getTestFiles(Language... langs)
Deprecated.
in 2.6, use
testFiles(String...) instead |
boolean |
hasJavaSourceFiles()
Deprecated.
Check if the project has Java files, excluding unit tests and files matching project exclusion patterns.
|
boolean |
hasTestFiles(Language lang)
Deprecated.
in 2.6
|
List<InputFile> |
mainFiles(String... langs)
Deprecated.
Source files, excluding unit tests and files matching project exclusion patterns.
|
File |
resolvePath(String path)
Deprecated.
|
protected List<File> |
resolvePaths(List<String> paths)
Deprecated.
|
List<InputFile> |
testFiles(String... langs)
Deprecated.
Source files of unit tests.
|
Resource |
toResource(File file)
Deprecated.
|
protected static File |
writeToFile(String content,
File dir,
String fileName)
Deprecated.
|
File |
writeToWorkingDirectory(String content,
String fileName)
Deprecated.
Save data into a new file of Sonar working directory.
|
protected static final com.google.common.base.Predicate<File> DIRECTORY_EXISTS
public DefaultProjectFileSystem(Project project, Languages languages)
public DefaultProjectFileSystem(Project project, Languages languages, FileFilter... fileFilters)
public Charset getSourceCharset()
ProjectFileSystemgetSourceCharset in interface ProjectFileSystempublic File getBasedir()
ProjectFileSystemgetBasedir in interface ProjectFileSystempublic File getBuildDir()
ProjectFileSystemgetBuildDir in interface ProjectFileSystempublic File getBuildOutputDir()
ProjectFileSystemgetBuildOutputDir in interface ProjectFileSystempublic List<File> getSourceDirs()
getSourceDirs in interface ProjectFileSystem@Deprecated public DefaultProjectFileSystem addSourceDir(File dir)
ProjectFileSystemaddSourceDir in interface ProjectFileSystempublic List<File> getTestDirs()
getTestDirs in interface ProjectFileSystem@Deprecated public DefaultProjectFileSystem addTestDir(File dir)
ProjectFileSystemaddTestDir in interface ProjectFileSystempublic File getReportOutputDir()
getReportOutputDir in interface ProjectFileSystempublic File getSonarWorkingDirectory()
getSonarWorkingDirectory in interface ProjectFileSystempublic File resolvePath(String path)
resolvePath in interface ProjectFileSystemprotected List<File> resolvePaths(List<String> paths)
@Deprecated public List<File> getSourceFiles(Language... langs)
mainFiles(String...) insteadProjectFileSystemgetSourceFiles in interface ProjectFileSystemlangs - language filter. Check all files, whatever their language, if null or empty.@Deprecated public List<File> getJavaSourceFiles()
mainFiles(String...) insteadProjectFileSystemgetJavaSourceFiles in interface ProjectFileSystempublic boolean hasJavaSourceFiles()
ProjectFileSystemhasJavaSourceFiles in interface ProjectFileSystem@Deprecated public List<File> getTestFiles(Language... langs)
testFiles(String...) insteadProjectFileSystemgetTestFiles in interface ProjectFileSystem@Deprecated public boolean hasTestFiles(Language lang)
ProjectFileSystemhasTestFiles in interface ProjectFileSystempublic File writeToWorkingDirectory(String content, String fileName) throws IOException
ProjectFileSystemwriteToWorkingDirectory in interface ProjectFileSystemIOExceptionprotected static File writeToFile(String content, File dir, String fileName) throws IOException
IOExceptionpublic static String getRelativePath(File file, File dir)
public static String getRelativePath(File file, List<File> dirs)
Relative path is composed of slashes. Windows backslaches are replaced by /
public File getFileFromBuildDirectory(String filename)
getFileFromBuildDirectory in interface ProjectFileSystempublic Resource toResource(File file)
toResource in interface ProjectFileSystempublic List<InputFile> mainFiles(String... langs)
ProjectFileSystemmainFiles in interface ProjectFileSystemlangs - language filter. If null or empty, will return empty listpublic List<InputFile> testFiles(String... langs)
ProjectFileSystemtestFiles in interface ProjectFileSystemlangs - language filter. If null or empty, will return empty listprotected List<File> getInitialSourceFiles()
protected List<File> getInitialTestFiles()
Copyright © 2009-2012 SonarSource. All Rights Reserved.