trait SymbolIndexer extends AnyRef
A key/value store with String keys (by symbol syntax) and SymbolData as values.
A good implementation of this trait should be: - Fast: lookups should be instant to be useful from the editor. - Compact: memory footprint should be small to fit in-memory even for large corpora (>millions of loc) on commodity hardware (dev laptop). - Incremental: can register references to a symbol without the symbol's definition, and vice-versa. - Parallel: all updates are thread safe. - Persistable: it's possible to dump this index to file, and load up later. (TODO(olafur) not yet implemented) All of these features may not be fully implemented yet, but the plan is to reach there eventually.
It's possible to rebuild a scala.meta.Database from a SymbolIndexer with InverseSymbolIndexer.
- Self Type
- SymbolIndexer
- Alphabetic
- By Inheritance
- SymbolIndexer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
addDefinition(symbol: String, position: index.Position): Unit
Register the definition of a symbol at a given position.
Register the definition of a symbol at a given position.
Overrides existing registered definition.
-
abstract
def
addDenotation(symbol: String, flags: Long, name: String, signature: String): Unit
Register metadata about a symbol.
Register metadata about a symbol.
- flags
the modifiers of this symbol, see org.langmeta.semanticdb.HasFlags
- name
the name of the symbol, example "get" for scala.Option.get
- signature
the type signature of this symbol, example "List[T]" for List.tail
-
abstract
def
addReference(filename: String, range: index.Range, symbol: String): Unit
Reguster a reference/call-site to this symbol.
Reguster a reference/call-site to this symbol.
- filename
must be URI, can either be file on local disk or entry in jar/zip.
- range
start/end offset where this symbol is referenced.
-
abstract
def
allSymbols: Traversable[SymbolData]
Iterator for all indexed symbols
-
abstract
def
get(symbol: String): Option[SymbolData]
Lookup symbol by its syntax.
-
abstract
def
get(symbol: org.langmeta.semanticdb.Symbol): Option[SymbolData]
Lookup scala.meta.Symbol
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unapply(arg: Any): Option[SymbolData]
Lookup symbol from inside a pattern match
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )