Class DefaultInputDir

    • Constructor Detail

      • DefaultInputDir

        public DefaultInputDir​(java.lang.String moduleKey,
                               java.lang.String relativePath)
    • Method Detail

      • relativePath

        public java.lang.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 java.lang.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()
      • moduleKey

        public java.lang.String moduleKey()
      • key

        public java.lang.String key()
        Description copied from interface: InputComponent
        Component key shared by all part of SonarQube (scanner, server, WS...). It doesn't include the branch. Warning. Do not use in SonarLint.
        Specified by:
        key in interface InputComponent
      • setModuleBaseDir

        public DefaultInputDir setModuleBaseDir​(java.nio.file.Path moduleBaseDir)
        For testing purpose. Will be automatically set when dir is added to DefaultFileSystem
      • uri

        public java.net.URI uri()
        Description copied from interface: InputPath
        Identifier of the component. The only guarantee is that it is unique in the project. You should not assume it is a file:// URI.
        Specified by:
        uri in interface InputPath