Class GeneratedFile

  • All Implemented Interfaces:
    org.sonar.api.batch.fs.IndexedFile, org.sonar.api.batch.fs.InputComponent, org.sonar.api.batch.fs.InputFile, org.sonar.api.batch.fs.InputPath

    public class GeneratedFile
    extends Object
    implements org.sonar.api.batch.fs.InputFile
    • Constructor Detail

      • GeneratedFile

        public GeneratedFile​(Path path)
    • Method Detail

      • addSmap

        public void addSmap​(SmapFile smap)
      • relativePath

        public String relativePath()
        Specified by:
        relativePath in interface org.sonar.api.batch.fs.IndexedFile
        Specified by:
        relativePath in interface org.sonar.api.batch.fs.InputFile
        Specified by:
        relativePath in interface org.sonar.api.batch.fs.InputPath
      • absolutePath

        public String absolutePath()
        Specified by:
        absolutePath in interface org.sonar.api.batch.fs.IndexedFile
        Specified by:
        absolutePath in interface org.sonar.api.batch.fs.InputFile
        Specified by:
        absolutePath in interface org.sonar.api.batch.fs.InputPath
      • file

        public File file()
        Specified by:
        file in interface org.sonar.api.batch.fs.IndexedFile
        Specified by:
        file in interface org.sonar.api.batch.fs.InputFile
        Specified by:
        file in interface org.sonar.api.batch.fs.InputPath
      • path

        public Path path()
        Specified by:
        path in interface org.sonar.api.batch.fs.IndexedFile
        Specified by:
        path in interface org.sonar.api.batch.fs.InputFile
        Specified by:
        path in interface org.sonar.api.batch.fs.InputPath
      • uri

        public URI uri()
        Specified by:
        uri in interface org.sonar.api.batch.fs.IndexedFile
        Specified by:
        uri in interface org.sonar.api.batch.fs.InputPath
      • filename

        public String filename()
        Specified by:
        filename in interface org.sonar.api.batch.fs.IndexedFile
      • language

        @CheckForNull
        public String language()
        Specified by:
        language in interface org.sonar.api.batch.fs.IndexedFile
        Specified by:
        language in interface org.sonar.api.batch.fs.InputFile
      • type

        public org.sonar.api.batch.fs.InputFile.Type type()
        Specified by:
        type in interface org.sonar.api.batch.fs.IndexedFile
        Specified by:
        type in interface org.sonar.api.batch.fs.InputFile
      • inputStream

        public InputStream inputStream()
                                throws IOException
        Specified by:
        inputStream in interface org.sonar.api.batch.fs.IndexedFile
        Specified by:
        inputStream in interface org.sonar.api.batch.fs.InputFile
        Throws:
        IOException
      • contents

        public String contents()
                        throws IOException
        Specified by:
        contents in interface org.sonar.api.batch.fs.InputFile
        Throws:
        IOException
      • status

        public org.sonar.api.batch.fs.InputFile.Status status()
        Specified by:
        status in interface org.sonar.api.batch.fs.InputFile
      • lines

        public int lines()
        Specified by:
        lines in interface org.sonar.api.batch.fs.InputFile
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.sonar.api.batch.fs.InputFile
      • newPointer

        public org.sonar.api.batch.fs.TextPointer newPointer​(int line,
                                                             int lineOffset)
        Specified by:
        newPointer in interface org.sonar.api.batch.fs.InputFile
      • newRange

        public org.sonar.api.batch.fs.TextRange newRange​(org.sonar.api.batch.fs.TextPointer start,
                                                         org.sonar.api.batch.fs.TextPointer end)
        Specified by:
        newRange in interface org.sonar.api.batch.fs.InputFile
      • newRange

        public org.sonar.api.batch.fs.TextRange newRange​(int startLine,
                                                         int startLineOffset,
                                                         int endLine,
                                                         int endLineOffset)
        Specified by:
        newRange in interface org.sonar.api.batch.fs.InputFile
      • selectLine

        public org.sonar.api.batch.fs.TextRange selectLine​(int line)
        Specified by:
        selectLine in interface org.sonar.api.batch.fs.InputFile
      • charset

        public Charset charset()
        Specified by:
        charset in interface org.sonar.api.batch.fs.InputFile
      • key

        public String key()
        Specified by:
        key in interface org.sonar.api.batch.fs.InputComponent
      • isFile

        public boolean isFile()
        Specified by:
        isFile in interface org.sonar.api.batch.fs.InputComponent
      • toString

        public String toString()
        Specified by:
        toString in interface org.sonar.api.batch.fs.InputFile
        Overrides:
        toString in class Object