Class InternalInputFile

java.lang.Object
org.sonar.java.checks.verifier.internal.InternalInputFile
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 final class InternalInputFile extends Object implements org.sonar.api.batch.fs.InputFile
  • Method Details

    • inputFile

      public static org.sonar.api.batch.fs.InputFile inputFile(String moduleKey, File file)
    • inputFile

      public static org.sonar.api.batch.fs.InputFile inputFile(String moduleKey, File file, org.sonar.api.batch.fs.InputFile.Status status)
    • emptyInputFile

      public static org.sonar.api.batch.fs.InputFile emptyInputFile(String filename, org.sonar.api.batch.fs.InputFile.Type type)
    • filename

      public String filename()
      Specified by:
      filename in interface org.sonar.api.batch.fs.IndexedFile
    • 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
    • isFile

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

      public String key()
      Specified by:
      key in interface org.sonar.api.batch.fs.InputComponent
    • 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
    • charset

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

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

      public String md5Hash()
      Specified by:
      md5Hash in interface org.sonar.api.batch.fs.InputFile
    • 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
    • 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
    • isEmpty

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

      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
    • lines

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

      public org.sonar.api.batch.fs.TextPointer newPointer(int line, int offset)
      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 startColumn, int endLine, int endColumn)
      Specified by:
      newRange in interface org.sonar.api.batch.fs.InputFile
    • 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
    • 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
    • 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
    • toString

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

      public org.sonar.api.batch.fs.TextRange selectLine(int arg0)
      Specified by:
      selectLine in interface org.sonar.api.batch.fs.InputFile
    • status

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