|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonar.api.batch.fs.internal.DefaultInputFile
public class DefaultInputFile
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.sonar.api.batch.fs.InputFile |
|---|
InputFile.Status, InputFile.Type |
| Constructor Summary | |
|---|---|
DefaultInputFile(String relativePath)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultInputFile(String relativePath)
| Method Detail |
|---|
public String relativePath()
InputFileFileSystem. File separator is the forward
slash ('/'), even on Microsoft Windows.
Returns src/main/java/com/Foo.java if module base dir is
/path/to/module and if file is
/path/to/module/src/main/java/com/Foo.java.
Relative path is not null and is normalized ('foo/../foo' is replaced by 'foo').
@CheckForNull public String absolutePath()
setFile(java.io.File)
previously.
public File file()
InputFileFile
@CheckForNull public String language()
setLanguage(String)
previously.
public InputFile.Type type()
InputFile
@CheckForNull public InputFile.Status status()
setStatus(org.sonar.api.batch.fs.InputFile.Status)
@CheckForNull public String hash()
setHash(String)
public int lines()
InputFile
@CheckForNull public String key()
setKey(String).
public DefaultInputFile setAbsolutePath(String s)
public DefaultInputFile setLanguage(String language)
public DefaultInputFile setFile(File file)
public DefaultInputFile setType(InputFile.Type type)
public DefaultInputFile setStatus(InputFile.Status status)
public DefaultInputFile setHash(String hash)
public DefaultInputFile setLines(int lines)
public DefaultInputFile setKey(String s)
public String deprecatedKey()
key on Java files.
public DefaultInputFile setDeprecatedKey(String s)
public String sourceDirAbsolutePath()
public DefaultInputFile setSourceDirAbsolutePath(String s)
public String pathRelativeToSourceDir()
public DefaultInputFile setPathRelativeToSourceDir(String s)
@Deprecated public File getFileBaseDir()
FileSystem.baseDir()
InputFileFor example in maven projects, the basedir of a source file stored in
src/main/java/org/foo/ is the directory src/main/java.
getFileBaseDir in interface InputFilepublic void setBasedir(File basedir)
@Deprecated public File getFile()
file()
InputFile
getFile in interface InputFile@Deprecated public String getRelativePath()
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.
getRelativePath in interface InputFile
public InputStream getInputStream()
throws FileNotFoundException
InputFileInputStream that reads from the file.
The returned stream is buffered so there is no need to use a
BufferedInputStream
getInputStream in interface InputFileFileNotFoundException - if the file is not foundpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||