public interface InputFile extends InputPath
File
adds information for code analyzers.Modifier and Type | Interface and Description |
---|---|
static class |
InputFile.Status
Status regarding previous analysis
|
static class |
InputFile.Type |
Modifier and Type | Method and Description |
---|---|
String |
absolutePath()
Normalized absolute path.
|
File |
file()
The underlying absolute
File |
String |
language()
Language, for example "java" or "php".
|
int |
lines()
Number of physical lines.
|
Path |
path()
The underlying absolute
Path |
String |
relativePath()
Path relative to module base directory.
|
InputFile.Status |
status()
Status regarding previous analysis
|
InputFile.Type |
type()
Does it contain main or test code ?
|
String relativePath()
FileSystem
. 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').relativePath
in interface InputPath
relativePath()
,
InputDir.relativePath()
String absolutePath()
file().getCanonicalPath()
to resolve symbolic link.absolutePath
in interface InputPath
absolutePath()
,
InputDir.absolutePath()
File file()
File
file
in interface InputPath
file()
,
InputDir.file()
Path path()
Path
path
in interface InputPath
path()
,
InputDir.path()
@CheckForNull String language()
InputFile.Type type()
InputFile.Status status()
int lines()
Copyright © 2009–2015 SonarSource. All rights reserved.