Package org.sonar.java.model
Class GeneratedFile
- java.lang.Object
-
- org.sonar.java.model.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 Summary
Constructors Constructor Description GeneratedFile(Path path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
absolutePath()
void
addSmap(SmapFile smap)
Charset
charset()
String
contents()
File
file()
String
filename()
InputStream
inputStream()
boolean
isEmpty()
boolean
isFile()
String
key()
String
language()
int
lines()
org.sonar.api.batch.fs.TextPointer
newPointer(int line, int lineOffset)
org.sonar.api.batch.fs.TextRange
newRange(int startLine, int startLineOffset, int endLine, int endLineOffset)
org.sonar.api.batch.fs.TextRange
newRange(org.sonar.api.batch.fs.TextPointer start, org.sonar.api.batch.fs.TextPointer end)
Path
path()
String
relativePath()
org.sonar.api.batch.fs.TextRange
selectLine(int line)
SourceMap
sourceMap()
org.sonar.api.batch.fs.InputFile.Status
status()
String
toString()
org.sonar.api.batch.fs.InputFile.Type
type()
URI
uri()
-
-
-
Constructor Detail
-
GeneratedFile
public GeneratedFile(Path path)
-
-
Method Detail
-
sourceMap
public SourceMap sourceMap()
-
addSmap
public void addSmap(SmapFile smap)
-
relativePath
public String relativePath()
- Specified by:
relativePath
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
relativePath
in interfaceorg.sonar.api.batch.fs.InputFile
- Specified by:
relativePath
in interfaceorg.sonar.api.batch.fs.InputPath
-
absolutePath
public String absolutePath()
- Specified by:
absolutePath
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
absolutePath
in interfaceorg.sonar.api.batch.fs.InputFile
- Specified by:
absolutePath
in interfaceorg.sonar.api.batch.fs.InputPath
-
file
public File file()
- Specified by:
file
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
file
in interfaceorg.sonar.api.batch.fs.InputFile
- Specified by:
file
in interfaceorg.sonar.api.batch.fs.InputPath
-
path
public Path path()
- Specified by:
path
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
path
in interfaceorg.sonar.api.batch.fs.InputFile
- Specified by:
path
in interfaceorg.sonar.api.batch.fs.InputPath
-
uri
public URI uri()
- Specified by:
uri
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
uri
in interfaceorg.sonar.api.batch.fs.InputPath
-
filename
public String filename()
- Specified by:
filename
in interfaceorg.sonar.api.batch.fs.IndexedFile
-
language
@CheckForNull public String language()
- Specified by:
language
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
language
in interfaceorg.sonar.api.batch.fs.InputFile
-
type
public org.sonar.api.batch.fs.InputFile.Type type()
- Specified by:
type
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
type
in interfaceorg.sonar.api.batch.fs.InputFile
-
inputStream
public InputStream inputStream() throws IOException
- Specified by:
inputStream
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
inputStream
in interfaceorg.sonar.api.batch.fs.InputFile
- Throws:
IOException
-
contents
public String contents() throws IOException
- Specified by:
contents
in interfaceorg.sonar.api.batch.fs.InputFile
- Throws:
IOException
-
status
public org.sonar.api.batch.fs.InputFile.Status status()
- Specified by:
status
in interfaceorg.sonar.api.batch.fs.InputFile
-
lines
public int lines()
- Specified by:
lines
in interfaceorg.sonar.api.batch.fs.InputFile
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceorg.sonar.api.batch.fs.InputFile
-
newPointer
public org.sonar.api.batch.fs.TextPointer newPointer(int line, int lineOffset)
- Specified by:
newPointer
in interfaceorg.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 interfaceorg.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 interfaceorg.sonar.api.batch.fs.InputFile
-
selectLine
public org.sonar.api.batch.fs.TextRange selectLine(int line)
- Specified by:
selectLine
in interfaceorg.sonar.api.batch.fs.InputFile
-
charset
public Charset charset()
- Specified by:
charset
in interfaceorg.sonar.api.batch.fs.InputFile
-
key
public String key()
- Specified by:
key
in interfaceorg.sonar.api.batch.fs.InputComponent
-
isFile
public boolean isFile()
- Specified by:
isFile
in interfaceorg.sonar.api.batch.fs.InputComponent
-
-