org.sonar.api.batch.fs.internal
Class DeprecatedDefaultInputFile

java.lang.Object
  extended by org.sonar.api.batch.fs.internal.DefaultInputFile
      extended by org.sonar.api.batch.fs.internal.DeprecatedDefaultInputFile
All Implemented Interfaces:
Serializable, InputFile, InputPath

public class DeprecatedDefaultInputFile
extends DefaultInputFile
implements InputFile

Since:
4.2
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sonar.api.batch.fs.InputFile
InputFile.Status, InputFile.Type
 
Constructor Summary
DeprecatedDefaultInputFile(String moduleKey, String relativePath)
           
 
Method Summary
 String deprecatedKey()
          Key used before version 4.2.
 File getFile()
          Deprecated. in 4.2. Use DefaultInputFile.file()
 File getFileBaseDir()
          Deprecated. in 4.2. Replaced by FileSystem.baseDir()
 InputStream getInputStream()
          Get an InputStream that reads from the file.
 String getRelativePath()
          Deprecated. in 4.2. Use DefaultInputFile.relativePath()
 String pathRelativeToSourceDir()
          Used only for backward-compatibility.
 DeprecatedDefaultInputFile setBasedir(File basedir)
           
 DeprecatedDefaultInputFile setDeprecatedKey(String s)
           
 DeprecatedDefaultInputFile setPathRelativeToSourceDir(String s)
           
 DeprecatedDefaultInputFile setSourceDirAbsolutePath(String s)
           
 String sourceDirAbsolutePath()
          Used only for backward-compatibility.
 
Methods inherited from class org.sonar.api.batch.fs.internal.DefaultInputFile
absolutePath, encoding, equals, file, hash, hashCode, key, language, lineHashes, lines, moduleKey, originalLineOffsets, relativePath, setAbsolutePath, setEncoding, setFile, setHash, setLanguage, setLineHashes, setLines, setOriginalLineOffsets, setStatus, setType, status, toString, type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeprecatedDefaultInputFile

public DeprecatedDefaultInputFile(String moduleKey,
                                  String relativePath)
Method Detail

getFileBaseDir

@Deprecated
public File getFileBaseDir()
Deprecated. in 4.2. Replaced by FileSystem.baseDir()

Description copied from interface: InputFile
The source base directory, different than the project basedir.

For example in maven projects, the basedir of a source file stored in src/main/java/org/foo/ is the directory src/main/java.


setBasedir

public DeprecatedDefaultInputFile setBasedir(File basedir)

getFile

@Deprecated
public File getFile()
Deprecated. in 4.2. Use DefaultInputFile.file()

Description copied from interface: InputFile
Get the underlying file.

Returns:
the file

getRelativePath

@Deprecated
public String getRelativePath()
Deprecated. in 4.2. Use DefaultInputFile.relativePath()

Description copied from interface: InputFile
Path relative to basedir. Directory separator is slash '/', whatever the platform.

Example on windows: if file basedir is c:\project\src\ and file is c:\project\src\org\foo\Bar.java, then relative path is org/foo/Bar.java

Example on unix: if file basedir is /project/src and file is /project/src/org/foo/Bar.java, then relative path is org/foo/Bar.java as well.


deprecatedKey

public String deprecatedKey()
Key used before version 4.2. It can be different than DefaultInputFile.key() on Java files.


setDeprecatedKey

public DeprecatedDefaultInputFile setDeprecatedKey(String s)

sourceDirAbsolutePath

public String sourceDirAbsolutePath()
Used only for backward-compatibility. Meaningless since version 4.2.


setSourceDirAbsolutePath

public DeprecatedDefaultInputFile setSourceDirAbsolutePath(String s)

pathRelativeToSourceDir

public String pathRelativeToSourceDir()
Used only for backward-compatibility. Meaningless since version 4.2.


setPathRelativeToSourceDir

public DeprecatedDefaultInputFile setPathRelativeToSourceDir(String s)

getInputStream

public InputStream getInputStream()
                           throws FileNotFoundException
Description copied from interface: InputFile
Get an InputStream that reads from the file.

The returned stream is buffered so there is no need to use a BufferedInputStream

Returns:
the stream
Throws:
FileNotFoundException - if the file is not found


Copyright © 2009–2015 SonarSource. All rights reserved.