org.sonar.api.batch.fs.internal
Class DefaultInputDir
java.lang.Object
org.sonar.api.batch.fs.internal.DefaultInputDir
- All Implemented Interfaces:
- Serializable, InputDir, InputPath
public class DefaultInputDir
- extends Object
- implements InputDir, Serializable
- Since:
- 4.5
- See Also:
- Serialized Form
DefaultInputDir
public DefaultInputDir(String moduleKey,
String relativePath)
relativePath
public String relativePath()
- Description copied from interface:
InputDir
- Path relative to module base directory. Path is unique and identifies directory
within given
FileSystem
. File separator is the forward
slash ('/'), even on Microsoft Windows.
Returns src/main/java/com
if module base dir is
/path/to/module
and if directory is
/path/to/module/src/main/java/com
.
Relative path is not null and is normalized ('foo/../foo' is replaced by 'foo').
- Specified by:
relativePath
in interface InputDir
- Specified by:
relativePath
in interface InputPath
- See Also:
InputFile.relativePath()
,
InputDir.relativePath()
absolutePath
public String absolutePath()
- Description copied from interface:
InputDir
- Normalized absolute path. File separator is forward slash ('/'), even on Microsoft Windows.
This is not canonical path. Symbolic links are not resolved. For example if /project/src links
to /tmp/src and basedir is /project, then this method returns /project/src. Use
file().getCanonicalPath()
to resolve symbolic link.
- Specified by:
absolutePath
in interface InputDir
- Specified by:
absolutePath
in interface InputPath
- See Also:
InputFile.absolutePath()
,
InputDir.absolutePath()
file
public File file()
- Description copied from interface:
InputDir
- The underlying absolute
File
- Specified by:
file
in interface InputDir
- Specified by:
file
in interface InputPath
- See Also:
InputFile.file()
,
InputDir.file()
moduleKey
public String moduleKey()
key
public String key()
setAbsolutePath
public DefaultInputDir setAbsolutePath(String s)
setFile
public DefaultInputDir setFile(File file)
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009–2015 SonarSource. All rights reserved.