public class DefaultInputDir extends DefaultInputComponent implements InputDir
Constructor and Description |
---|
DefaultInputDir(java.lang.String moduleKey,
java.lang.String relativePath) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
absolutePath()
Normalized absolute path.
|
boolean |
equals(java.lang.Object o) |
java.io.File |
file()
The underlying absolute
File |
int |
hashCode() |
boolean |
isFile()
Is the component an
InputFile |
java.lang.String |
key()
Component key shared by all part of SonarQube (scanner, server, WS...).
|
java.lang.String |
moduleKey() |
java.nio.file.Path |
path()
The underlying absolute
Path |
java.lang.String |
relativePath()
Path relative to module base directory.
|
DefaultInputDir |
setModuleBaseDir(java.nio.file.Path moduleBaseDir)
For testing purpose.
|
java.lang.String |
toString() |
java.net.URI |
uri()
Identifier of the component.
|
hasMeasureFor, scannerId, setHasMeasureFor
public DefaultInputDir(java.lang.String moduleKey, java.lang.String relativePath)
public java.lang.String relativePath()
InputDir
FileSystem
. File separator is the forward
slash ('/'), even on Microsoft Windows.
src/main/java/com
if module base dir is
/path/to/module
and if directory is
/path/to/module/src/main/java/com
.
relativePath
in interface InputDir
relativePath
in interface InputPath
InputFile.relativePath()
,
InputDir.relativePath()
public java.lang.String absolutePath()
InputDir
file().getCanonicalPath()
to resolve symbolic link.absolutePath
in interface InputDir
absolutePath
in interface InputPath
InputFile.absolutePath()
,
InputDir.absolutePath()
public java.io.File file()
InputDir
File
file
in interface InputDir
file
in interface InputPath
InputFile.file()
,
InputDir.file()
public java.nio.file.Path path()
InputDir
Path
path
in interface InputDir
path
in interface InputPath
InputFile.path()
,
InputDir.path()
public java.lang.String moduleKey()
public java.lang.String key()
InputComponent
key
in interface InputComponent
public DefaultInputDir setModuleBaseDir(java.nio.file.Path moduleBaseDir)
DefaultFileSystem
public boolean isFile()
InputComponent
InputFile
isFile
in interface InputComponent
public boolean equals(java.lang.Object o)
equals
in class DefaultInputComponent
public int hashCode()
hashCode
in class DefaultInputComponent
public java.lang.String toString()
toString
in class DefaultInputComponent