public class DefaultSymbolTable extends DefaultStorable implements NewSymbolTable
storage
Constructor and Description |
---|
DefaultSymbolTable(SensorStorage storage) |
Modifier and Type | Method and Description |
---|---|
protected void |
doSave() |
java.util.Map<TextRange,java.util.Set<TextRange>> |
getReferencesBySymbol() |
InputFile |
inputFile() |
NewSymbol |
newSymbol(int startOffset,
int endOffset)
Register a new symbol declaration.
|
NewSymbol |
newSymbol(int startLine,
int startLineOffset,
int endLine,
int endLineOffset)
Shortcut to avoid calling
InputFile.newRange(int, int, int, int) |
NewSymbol |
newSymbol(TextRange range)
Register a new symbol declaration.
|
DefaultSymbolTable |
onFile(InputFile inputFile)
The file the symbol table belongs to.
|
save, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
save
public DefaultSymbolTable(SensorStorage storage)
public java.util.Map<TextRange,java.util.Set<TextRange>> getReferencesBySymbol()
public DefaultSymbolTable onFile(InputFile inputFile)
NewSymbolTable
onFile
in interface NewSymbolTable
public InputFile inputFile()
public NewSymbol newSymbol(int startLine, int startLineOffset, int endLine, int endLineOffset)
NewSymbolTable
InputFile.newRange(int, int, int, int)
newSymbol
in interface NewSymbolTable
public NewSymbol newSymbol(int startOffset, int endOffset)
NewSymbolTable
newSymbol
in interface NewSymbolTable
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.public NewSymbol newSymbol(TextRange range)
NewSymbolTable
newSymbol
in interface NewSymbolTable
range
- Range of text for the symbol declaration. See for example InputFile.newRange(int, int, int, int)
.protected void doSave()
doSave
in class DefaultStorable