public class DeprecatedDefaultInputFile extends DefaultInputFile implements InputFile
InputFile.Status, InputFile.Type
Constructor and Description |
---|
DeprecatedDefaultInputFile(String relativePath) |
Modifier and Type | Method and Description |
---|---|
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.
|
absolutePath, equals, file, hash, hashCode, key, language, lines, relativePath, setAbsolutePath, setFile, setHash, setKey, setLanguage, setLines, setStatus, setType, status, toString, type
public DeprecatedDefaultInputFile(String relativePath)
@Deprecated public File getFileBaseDir()
FileSystem.baseDir()
InputFile
For example in maven projects, the basedir of a source file stored in
src/main/java/org/foo/
is the directory src/main/java
.
public DeprecatedDefaultInputFile setBasedir(File basedir)
@Deprecated public File getFile()
DefaultInputFile.file()
InputFile
@Deprecated public String getRelativePath()
DefaultInputFile.relativePath()
InputFile
'/'
, 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.
public String deprecatedKey()
DefaultInputFile.key
on Java files.public DeprecatedDefaultInputFile setDeprecatedKey(String s)
public String sourceDirAbsolutePath()
public DeprecatedDefaultInputFile setSourceDirAbsolutePath(String s)
public String pathRelativeToSourceDir()
public DeprecatedDefaultInputFile setPathRelativeToSourceDir(String s)
public InputStream getInputStream() throws FileNotFoundException
InputFile
InputStream
that reads from the file.
The returned stream is buffered so there is no need to use a
BufferedInputStream
FileNotFoundException
- if the file is not foundCopyright © 2009–2015 SonarSource. All rights reserved.