Package org.sonar.api.batch.fs.internal
Class DefaultIndexedFile
- java.lang.Object
-
- org.sonar.api.batch.fs.internal.DefaultInputComponent
-
- org.sonar.api.batch.fs.internal.DefaultIndexedFile
-
- All Implemented Interfaces:
org.sonar.api.batch.fs.IndexedFile
,org.sonar.api.batch.fs.InputComponent
,org.sonar.api.batch.fs.InputPath
@Immutable public class DefaultIndexedFile extends DefaultInputComponent implements org.sonar.api.batch.fs.IndexedFile
- Since:
- 6.3
-
-
Constructor Summary
Constructors Constructor Description DefaultIndexedFile(java.lang.String projectKey, java.nio.file.Path baseDir, java.lang.String relativePath, java.lang.String language)
Testing purposes only!DefaultIndexedFile(java.nio.file.Path absolutePath, java.lang.String projectKey, java.lang.String projectRelativePath, java.lang.String moduleRelativePath, org.sonar.api.batch.fs.InputFile.Type type, java.lang.String language, int batchId, SensorStrategy sensorStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
absolutePath()
boolean
equals(java.lang.Object o)
java.io.File
file()
java.lang.String
filename()
java.lang.String
getModuleRelativePath()
java.lang.String
getProjectRelativePath()
int
hashCode()
java.io.InputStream
inputStream()
boolean
isFile()
java.lang.String
key()
Component key (without branch).java.lang.String
language()
java.nio.file.Path
path()
java.lang.String
relativePath()
java.lang.String
toString()
org.sonar.api.batch.fs.InputFile.Type
type()
java.net.URI
uri()
-
Methods inherited from class org.sonar.api.batch.fs.internal.DefaultInputComponent
hasMeasureFor, scannerId, setHasMeasureFor
-
-
-
-
Constructor Detail
-
DefaultIndexedFile
public DefaultIndexedFile(java.lang.String projectKey, java.nio.file.Path baseDir, java.lang.String relativePath, @Nullable java.lang.String language)
Testing purposes only!
-
DefaultIndexedFile
public DefaultIndexedFile(java.nio.file.Path absolutePath, java.lang.String projectKey, java.lang.String projectRelativePath, java.lang.String moduleRelativePath, org.sonar.api.batch.fs.InputFile.Type type, @Nullable java.lang.String language, int batchId, SensorStrategy sensorStrategy)
-
-
Method Detail
-
relativePath
public java.lang.String relativePath()
- Specified by:
relativePath
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
relativePath
in interfaceorg.sonar.api.batch.fs.InputPath
-
getModuleRelativePath
public java.lang.String getModuleRelativePath()
-
getProjectRelativePath
public java.lang.String getProjectRelativePath()
-
absolutePath
public java.lang.String absolutePath()
- Specified by:
absolutePath
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
absolutePath
in interfaceorg.sonar.api.batch.fs.InputPath
-
file
public java.io.File file()
- Specified by:
file
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
file
in interfaceorg.sonar.api.batch.fs.InputPath
-
path
public java.nio.file.Path path()
- Specified by:
path
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
path
in interfaceorg.sonar.api.batch.fs.InputPath
-
inputStream
public java.io.InputStream inputStream() throws java.io.IOException
- Specified by:
inputStream
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Throws:
java.io.IOException
-
language
@CheckForNull public java.lang.String language()
- Specified by:
language
in interfaceorg.sonar.api.batch.fs.IndexedFile
-
type
public org.sonar.api.batch.fs.InputFile.Type type()
- Specified by:
type
in interfaceorg.sonar.api.batch.fs.IndexedFile
-
key
public java.lang.String key()
Component key (without branch).- Specified by:
key
in interfaceorg.sonar.api.batch.fs.InputComponent
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classDefaultInputComponent
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDefaultInputComponent
-
toString
public java.lang.String toString()
- Overrides:
toString
in classDefaultInputComponent
-
isFile
public boolean isFile()
- Specified by:
isFile
in interfaceorg.sonar.api.batch.fs.InputComponent
-
filename
public java.lang.String filename()
- Specified by:
filename
in interfaceorg.sonar.api.batch.fs.IndexedFile
-
uri
public java.net.URI uri()
- Specified by:
uri
in interfaceorg.sonar.api.batch.fs.IndexedFile
- Specified by:
uri
in interfaceorg.sonar.api.batch.fs.InputPath
-
-