SymbolTable

io.joern.x2cpg.passes.frontend.SymbolTable
class SymbolTable[K <: SBKey](val keyFromNode: AstNode => Option[K])

A thread-safe symbol table that can represent multiple types per symbol. Each node in an AST gets converted to an SBKey which gives contextual information to identify an AST entity. Each value in this table represents a set of types that the key could be in a flow-insensitive manner.

The SymbolTable operates like a map with a few convenient methods that are designed for this structure's purpose.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def append(node: AstNode, typeFullName: String): Set[String]
def append(node: K, typeFullName: String): Set[String]
def append(node: AstNode, typeFullNames: Set[String]): Set[String]
def append(sbKey: K, typeFullNames: Set[String]): Set[String]
def apply(sbKey: K): Set[String]
def apply(node: AstNode): Set[String]
def clear(): Unit
def contains(sbKey: K): Boolean
def contains(node: AstNode): Boolean
def from(sb: IterableOnce[(K, Set[String])]): SymbolTable[K]
def get(sbKey: K): Set[String]
def get(node: AstNode): Set[String]
def put(sbKey: K, typeFullNames: Set[String]): Set[String]
def put(sbKey: K, typeFullName: String): Set[String]
def put(node: AstNode, typeFullNames: Set[String]): Set[String]
def remove(sbKey: K): Set[String]
def remove(node: AstNode): Set[String]
def view: MapView[K, Set[String]]

Concrete fields

val keyFromNode: AstNode => Option[K]