SymbolTable

io.joern.x2cpg.passes.frontend.SymbolTable
class SymbolTable[K <: SBKey](fromNode: AstNode => 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

Concise view

Value members

Concrete methods

def append(node: AstNode, typeFullName: String): Option[Set[String]]
def append(node: AstNode, typeFullNames: Set[String]): Option[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]): Option[Set[String]]
def put(sbKey: K, typeFullName: String): Option[Set[String]]
def put(node: AstNode, typeFullNames: Set[String]): Option[Set[String]]
def view: MapView[K, Set[String]]