|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonar.api.resources.DefaultProjectFileSystem
@Deprecated public class DefaultProjectFileSystem
An implementation of ProjectFileSystem.
For internal use only.
| Field Summary | |
|---|---|
protected static com.google.common.base.Predicate<File> |
DIRECTORY_EXISTS
Deprecated. |
| Constructor Summary | |
|---|---|
DefaultProjectFileSystem(Project project,
Languages languages)
Deprecated. |
|
DefaultProjectFileSystem(Project project,
Languages languages,
FileFilter... fileFilters)
Deprecated. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final com.google.common.base.Predicate<File> DIRECTORY_EXISTS
| Constructor Detail |
|---|
public DefaultProjectFileSystem(Project project,
Languages languages)
public DefaultProjectFileSystem(Project project,
Languages languages,
FileFilter... fileFilters)
| Method Detail |
|---|
public Charset getSourceCharset()
ProjectFileSystem
getSourceCharset in interface ProjectFileSystempublic File getBasedir()
ProjectFileSystem
getBasedir in interface ProjectFileSystempublic File getBuildDir()
ProjectFileSystem
getBuildDir in interface ProjectFileSystempublic File getBuildOutputDir()
ProjectFileSystem
getBuildOutputDir in interface ProjectFileSystempublic List<File> getSourceDirs()
getSourceDirs in interface ProjectFileSystem@Deprecated public DefaultProjectFileSystem addSourceDir(File dir)
ProjectFileSystem
addSourceDir in interface ProjectFileSystempublic List<File> getTestDirs()
getTestDirs in interface ProjectFileSystem@Deprecated public DefaultProjectFileSystem addTestDir(File dir)
ProjectFileSystem
addTestDir 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...) instead
ProjectFileSystem
getSourceFiles in interface ProjectFileSystemlangs - language filter. Check all files, whatever their language, if null or empty.@Deprecated public List<File> getJavaSourceFiles()
mainFiles(String...) instead
ProjectFileSystem
getJavaSourceFiles in interface ProjectFileSystempublic boolean hasJavaSourceFiles()
ProjectFileSystem
hasJavaSourceFiles in interface ProjectFileSystem@Deprecated public List<File> getTestFiles(Language... langs)
testFiles(String...) instead
ProjectFileSystem
getTestFiles in interface ProjectFileSystem@Deprecated public boolean hasTestFiles(Language lang)
ProjectFileSystem
hasTestFiles in interface ProjectFileSystem
public File writeToWorkingDirectory(String content,
String fileName)
throws IOException
ProjectFileSystem
writeToWorkingDirectory in interface ProjectFileSystemIOException
protected static File writeToFile(String content,
File dir,
String fileName)
throws IOException
IOException
public 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)
ProjectFileSystem
mainFiles in interface ProjectFileSystemlangs - language filter. If null or empty, will return empty listpublic List<InputFile> testFiles(String... langs)
ProjectFileSystem
testFiles in interface ProjectFileSystemlangs - language filter. If null or empty, will return empty listprotected List<File> getInitialSourceFiles()
protected List<File> getInitialTestFiles()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||