Class DefaultSymbolTable
- java.lang.Object
-
- org.sonar.api.batch.sensor.internal.DefaultStorable
-
- org.sonar.api.batch.sensor.symbol.internal.DefaultSymbolTable
-
- All Implemented Interfaces:
NewSymbolTable
public class DefaultSymbolTable extends DefaultStorable implements NewSymbolTable
-
-
Field Summary
-
Fields inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
storage
-
-
Constructor Summary
Constructors Constructor Description DefaultSymbolTable(SensorStorage storage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoSave()java.util.Map<TextRange,java.util.Set<TextRange>>getReferencesBySymbol()InputFileinputFile()NewSymbolnewSymbol(int startOffset, int endOffset)Register a new symbol declaration.NewSymbolnewSymbol(int startLine, int startLineOffset, int endLine, int endLineOffset)Shortcut to avoid callingInputFile.newRange(int, int, int, int)NewSymbolnewSymbol(TextRange range)Register a new symbol declaration.DefaultSymbolTableonFile(InputFile inputFile)The file the symbol table belongs to.-
Methods inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
save, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.sonar.api.batch.sensor.symbol.NewSymbolTable
save
-
-
-
-
Constructor Detail
-
DefaultSymbolTable
public DefaultSymbolTable(SensorStorage storage)
-
-
Method Detail
-
getReferencesBySymbol
public java.util.Map<TextRange,java.util.Set<TextRange>> getReferencesBySymbol()
-
onFile
public DefaultSymbolTable onFile(InputFile inputFile)
Description copied from interface:NewSymbolTableThe file the symbol table belongs to.- Specified by:
onFilein interfaceNewSymbolTable
-
inputFile
public InputFile inputFile()
-
newSymbol
public NewSymbol newSymbol(int startLine, int startLineOffset, int endLine, int endLineOffset)
Description copied from interface:NewSymbolTableShortcut to avoid callingInputFile.newRange(int, int, int, int)- Specified by:
newSymbolin interfaceNewSymbolTable
-
newSymbol
public NewSymbol newSymbol(int startOffset, int endOffset)
Description copied from interface:NewSymbolTableRegister a new symbol declaration.- Specified by:
newSymbolin interfaceNewSymbolTable- Parameters:
startOffset- Starting position in file for the declaration of this symbol. Beginning of a file starts with offset '0'.endOffset- End position in file for this symbol declaration.
-
newSymbol
public NewSymbol newSymbol(TextRange range)
Description copied from interface:NewSymbolTableRegister a new symbol declaration.- Specified by:
newSymbolin interfaceNewSymbolTable- Parameters:
range- Range of text for the symbol declaration. See for exampleInputFile.newRange(int, int, int, int).
-
doSave
protected void doSave()
- Specified by:
doSavein classDefaultStorable
-
-