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.StringabsolutePath()booleanequals(java.lang.Object o)java.io.Filefile()java.lang.Stringfilename()java.lang.StringgetModuleRelativePath()java.lang.StringgetProjectRelativePath()inthashCode()java.io.InputStreaminputStream()booleanisFile()java.lang.Stringkey()Component key (without branch).java.lang.Stringlanguage()java.nio.file.Pathpath()java.lang.StringrelativePath()java.lang.StringtoString()org.sonar.api.batch.fs.InputFile.Typetype()java.net.URIuri()-
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:
relativePathin interfaceorg.sonar.api.batch.fs.IndexedFile- Specified by:
relativePathin 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:
absolutePathin interfaceorg.sonar.api.batch.fs.IndexedFile- Specified by:
absolutePathin interfaceorg.sonar.api.batch.fs.InputPath
-
file
public java.io.File file()
- Specified by:
filein interfaceorg.sonar.api.batch.fs.IndexedFile- Specified by:
filein interfaceorg.sonar.api.batch.fs.InputPath
-
path
public java.nio.file.Path path()
- Specified by:
pathin interfaceorg.sonar.api.batch.fs.IndexedFile- Specified by:
pathin interfaceorg.sonar.api.batch.fs.InputPath
-
inputStream
public java.io.InputStream inputStream() throws java.io.IOException- Specified by:
inputStreamin interfaceorg.sonar.api.batch.fs.IndexedFile- Throws:
java.io.IOException
-
language
@CheckForNull public java.lang.String language()
- Specified by:
languagein interfaceorg.sonar.api.batch.fs.IndexedFile
-
type
public org.sonar.api.batch.fs.InputFile.Type type()
- Specified by:
typein interfaceorg.sonar.api.batch.fs.IndexedFile
-
key
public java.lang.String key()
Component key (without branch).- Specified by:
keyin interfaceorg.sonar.api.batch.fs.InputComponent
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classDefaultInputComponent
-
hashCode
public int hashCode()
- Overrides:
hashCodein classDefaultInputComponent
-
toString
public java.lang.String toString()
- Overrides:
toStringin classDefaultInputComponent
-
isFile
public boolean isFile()
- Specified by:
isFilein interfaceorg.sonar.api.batch.fs.InputComponent
-
filename
public java.lang.String filename()
- Specified by:
filenamein interfaceorg.sonar.api.batch.fs.IndexedFile
-
uri
public java.net.URI uri()
- Specified by:
uriin interfaceorg.sonar.api.batch.fs.IndexedFile- Specified by:
uriin interfaceorg.sonar.api.batch.fs.InputPath
-
-