All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.shiftleft.semanticcpg.language.callgraphextension.CallTraversal.scala Maven / Gradle / Ivy

There is a newer version: 4.0.77
Show newest version
package io.shiftleft.semanticcpg.language.callgraphextension

import io.shiftleft.codepropertygraph.generated.nodes.{Call, Import, Method}
import io.shiftleft.semanticcpg.language.*

class CallTraversal(val traversal: Iterator[Call]) extends AnyVal {

  @deprecated("Use callee", "")
  def calledMethod(implicit callResolver: ICallResolver): Iterator[Method] = callee

  /** The callee method */
  def callee(implicit callResolver: ICallResolver): Iterator[Method] =
    traversal.flatMap(callResolver.getCalledMethodsAsTraversal)

  def referencedImports: Iterator[Import] =
    traversal.flatMap(_._importViaIsCallForImportOut)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy