MethodRefLinker

io.joern.x2cpg.passes.callgraph.MethodRefLinker
class MethodRefLinker(cpg: Cpg) extends CpgPass with LinkingUtil

This pass has MethodStubCreator and TypeDeclStubCreator as prerequisite for language frontends which do not provide method stubs and type decl stubs.

Attributes

Graph
Supertypes
class CpgPass
class ForkJoinParallelCpgPass[AnyRef]
class NewStyleCpgPassBase[AnyRef]
trait CpgPassBase
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Inherited types

type DiffGraphBuilder = DiffGraphBuilder

Attributes

Inherited from:
NewStyleCpgPassBase

Value members

Concrete methods

override def run(dstGraph: DiffGraphBuilder): Unit

Attributes

Definition Classes
CpgPass

Inherited methods

override def createAndApply(): Unit

Attributes

Definition Classes
NewStyleCpgPassBase -> CpgPassBase
Inherited from:
NewStyleCpgPassBase
override def createApplySerializeAndStore(serializedCpg: SerializedCpg, inverse: Boolean, prefix: String): Unit

Attributes

Definition Classes
ForkJoinParallelCpgPass -> CpgPassBase
Inherited from:
ForkJoinParallelCpgPass
def finish(): Unit

Attributes

Inherited from:
NewStyleCpgPassBase
final override def generateParts(): Array[_ <: AnyRef]

Attributes

Definition Classes
CpgPass -> NewStyleCpgPassBase
Inherited from:
CpgPass
def init(): Unit

Attributes

Inherited from:
NewStyleCpgPassBase
def linkToMultiple[SRC_NODE_TYPE <: StoredNode](cpg: Cpg, srcLabels: List[String], dstNodeLabel: String, edgeType: String, dstNodeMap: String => Option[StoredNode], getDstFullNames: SRC_NODE_TYPE => Iterable[String], dstFullNameKey: String, dstGraph: DiffGraphBuilder): Unit

Attributes

Inherited from:
LinkingUtil
def linkToSingle(cpg: Cpg, srcLabels: List[String], dstNodeLabel: String, edgeType: String, dstNodeMap: String => Option[StoredNode], dstFullNameKey: String, dstGraph: DiffGraphBuilder, dstNotExistsHandler: Option[(StoredNode, String) => Unit]): Unit

For all nodes n with a label in srcLabels, determine the value of n.$dstFullNameKey, use that to lookup the destination node in dstNodeMap, and create an edge of type edgeType between n and the destination node.

For all nodes n with a label in srcLabels, determine the value of n.$dstFullNameKey, use that to lookup the destination node in dstNodeMap, and create an edge of type edgeType between n and the destination node.

Attributes

Inherited from:
LinkingUtil
protected def logFailedDstLookup(edgeType: String, srcNodeType: String, srcNodeId: String, dstNodeType: String, dstFullName: String): Unit

Attributes

Inherited from:
LinkingUtil
protected def logFailedSrcLookup(edgeType: String, srcNodeType: String, srcFullName: String, dstNodeType: String, dstNodeId: String): Unit

Attributes

Inherited from:
LinkingUtil
def methodFullNameToNode(cpg: Cpg, x: String): Option[Method]

Attributes

Inherited from:
LinkingUtil
def name: String

Name of the pass. By default it is inferred from the name of the class, override if needed.

Name of the pass. By default it is inferred from the name of the class, override if needed.

Attributes

Inherited from:
CpgPassBase
def namespaceBlockFullNameToNode(cpg: Cpg, x: String): Option[NamespaceBlock]

Attributes

Inherited from:
LinkingUtil
def nodesWithFullName(cpg: Cpg, x: String): Seq[NodeRef[_ <: NodeDb]]

Attributes

Inherited from:
LinkingUtil
final override def runOnPart(builder: DiffGraphBuilder, part: AnyRef): Unit

Attributes

Definition Classes
CpgPass -> NewStyleCpgPassBase
Inherited from:
CpgPass
override def runWithBuilder(externalBuilder: DiffGraphBuilder): Int

Runs the cpg pass, adding changes to the passed builder. Use with caution -- API is unstable. Returns max(nParts, 1), where nParts is either the number of parallel parts, or the number of iterarator elements in case of legacy passes. Includes init() and finish() logic.

Runs the cpg pass, adding changes to the passed builder. Use with caution -- API is unstable. Returns max(nParts, 1), where nParts is either the number of parallel parts, or the number of iterarator elements in case of legacy passes. Includes init() and finish() logic.

Attributes

Definition Classes
NewStyleCpgPassBase -> CpgPassBase
Inherited from:
NewStyleCpgPassBase
def runWithBuilderLogged(builder: DiffGraphBuilder): Int

Wraps runWithBuilder with logging, and swallows raised exceptions. Use with caution -- API is unstable. A return value of -1 indicates failure, otherwise the return value of runWithBuilder is passed through.

Wraps runWithBuilder with logging, and swallows raised exceptions. Use with caution -- API is unstable. A return value of -1 indicates failure, otherwise the return value of runWithBuilder is passed through.

Attributes

Inherited from:
CpgPassBase
def typeDeclFullNameToNode(cpg: Cpg, x: String): Option[TypeDecl]

Attributes

Inherited from:
LinkingUtil
def typeFullNameToNode(cpg: Cpg, x: String): Option[Type]

Attributes

Inherited from:
LinkingUtil

Inherited fields

val logger: Logger

Attributes

Inherited from:
LinkingUtil