|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.batch.fs.internal.DefaultInputFile org.sonar.api.batch.fs.internal.DeprecatedDefaultInputFile
public class DeprecatedDefaultInputFile
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 |
---|
public DeprecatedDefaultInputFile(String moduleKey, String relativePath)
Method Detail |
---|
@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 found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |