org.sonar.batch.scan.filesystem
Class ProjectFileSystemAdapter

java.lang.Object
  extended by org.sonar.batch.scan.filesystem.ProjectFileSystemAdapter
All Implemented Interfaces:
BatchComponent, ProjectFileSystem

public class ProjectFileSystemAdapter
extends Object
implements ProjectFileSystem

Adapter for keeping the backward-compatibility of the deprecated component ProjectFileSystem

Since:
3.5

Constructor Summary
ProjectFileSystemAdapter(DefaultModuleFileSystem target, Project project)
           
ProjectFileSystemAdapter(DefaultModuleFileSystem target, Project project, org.apache.maven.project.MavenProject pom)
           
 
Method Summary
 ProjectFileSystem addSourceDir(File dir)
           
 ProjectFileSystem addTestDir(File dir)
           
 File getBasedir()
           
 File getBuildDir()
           
 File getBuildOutputDir()
           
 File getFileFromBuildDirectory(String filename)
           
 List<File> getJavaSourceFiles()
           
 File getReportOutputDir()
           
 File getSonarWorkingDirectory()
           
 Charset getSourceCharset()
           
 List<File> getSourceDirs()
           
 List<File> getSourceFiles(Language... langs)
           
 List<File> getTestDirs()
           
 List<File> getTestFiles(Language... langs)
           
 boolean hasJavaSourceFiles()
           
 boolean hasTestFiles(Language lang)
           
 List<InputFile> mainFiles(String... langs)
           
 File resolvePath(String path)
           
 void start()
           
 List<InputFile> testFiles(String... langs)
           
 Resource toResource(File file)
           
 File writeToWorkingDirectory(String content, String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectFileSystemAdapter

public ProjectFileSystemAdapter(DefaultModuleFileSystem target,
                                Project project,
                                @Nullable
                                org.apache.maven.project.MavenProject pom)

ProjectFileSystemAdapter

public ProjectFileSystemAdapter(DefaultModuleFileSystem target,
                                Project project)
Method Detail

start

public void start()

getSourceCharset

public Charset getSourceCharset()
Specified by:
getSourceCharset in interface ProjectFileSystem

getBasedir

public File getBasedir()
Specified by:
getBasedir in interface ProjectFileSystem

getBuildDir

public File getBuildDir()
Specified by:
getBuildDir in interface ProjectFileSystem

getBuildOutputDir

public File getBuildOutputDir()
Specified by:
getBuildOutputDir in interface ProjectFileSystem

getSourceDirs

public List<File> getSourceDirs()
Specified by:
getSourceDirs in interface ProjectFileSystem

addSourceDir

public ProjectFileSystem addSourceDir(File dir)
Specified by:
addSourceDir in interface ProjectFileSystem

getTestDirs

public List<File> getTestDirs()
Specified by:
getTestDirs in interface ProjectFileSystem

addTestDir

public ProjectFileSystem addTestDir(File dir)
Specified by:
addTestDir in interface ProjectFileSystem

getReportOutputDir

public File getReportOutputDir()
Specified by:
getReportOutputDir in interface ProjectFileSystem

getSonarWorkingDirectory

public File getSonarWorkingDirectory()
Specified by:
getSonarWorkingDirectory in interface ProjectFileSystem

resolvePath

public File resolvePath(String path)
Specified by:
resolvePath in interface ProjectFileSystem

getSourceFiles

public List<File> getSourceFiles(Language... langs)
Specified by:
getSourceFiles in interface ProjectFileSystem

getJavaSourceFiles

public List<File> getJavaSourceFiles()
Specified by:
getJavaSourceFiles in interface ProjectFileSystem

hasJavaSourceFiles

public boolean hasJavaSourceFiles()
Specified by:
hasJavaSourceFiles in interface ProjectFileSystem

getTestFiles

public List<File> getTestFiles(Language... langs)
Specified by:
getTestFiles in interface ProjectFileSystem

hasTestFiles

public boolean hasTestFiles(Language lang)
Specified by:
hasTestFiles in interface ProjectFileSystem

writeToWorkingDirectory

public File writeToWorkingDirectory(String content,
                                    String fileName)
                             throws IOException
Specified by:
writeToWorkingDirectory in interface ProjectFileSystem
Throws:
IOException

getFileFromBuildDirectory

public File getFileFromBuildDirectory(String filename)
Specified by:
getFileFromBuildDirectory in interface ProjectFileSystem

toResource

public Resource toResource(File file)
Specified by:
toResource in interface ProjectFileSystem

mainFiles

public List<InputFile> mainFiles(String... langs)
Specified by:
mainFiles in interface ProjectFileSystem

testFiles

public List<InputFile> testFiles(String... langs)
Specified by:
testFiles in interface ProjectFileSystem


Copyright © 2009–2015 SonarSource. All rights reserved.