NodeSteps

@Traversal(elementType = scala.Predef.classOf[io.shiftleft.codepropertygraph.generated.nodes.StoredNode])
final class NodeSteps[NodeType <: StoredNode](val traversal: Traversal[NodeType]) extends AnyVal

Steps for all node types

This is the base class for all steps defined on

class AnyVal
trait Matchable
class Any

Value members

Concrete methods

@Doc(info = "Display code (with syntax highlighting)", longInfo = "\n |For methods, dump the method code. For expressions,\n |dump the method code along with an arrow pointing\n |to the expression. Uses ansi-color highlighting.\n |This only works for source frontends.\n |")
def dump(implicit finder: NodeExtensionFinder): List[String]
@Doc(info = "Display code (without syntax highlighting)", longInfo = "\n |For methods, dump the method code. For expressions,\n |dump the method code along with an arrow pointing\n |to the expression. No color highlighting.\n |")
def dumpRaw(implicit finder: NodeExtensionFinder): List[String]
@Doc(info = "The source file this code is in", longInfo = "\n |Not all but most node in the graph can be associated with\n |a specific source file they appear in. `file` provides\n |the file node that represents that source file.\n |")
def file: Traversal[File]
@Doc(info = "Location, including filename and line number", longInfo = "\n |Most nodes of the graph can be associated with a specific\n |location in code, and `location` provides this location.\n |The return value is an object providing, e.g., filename,\n |line number, and method name, as opposed to being a flat\n |string. For example `.location.lineNumber` provides access\n |to the line number alone, without requiring any parsing\n |on the user\'s side.\n |")
def location(implicit finder: NodeExtensionFinder): Traversal[NewLocation]
@Doc(info = "Tag node with `tagName`", longInfo = "\n |This method can be used to tag nodes in the graph such that\n |they can later be looked up easily via `cpg.tag`. Tags are\n |key value pairs, and they can be created with `newTagNodePair`.\n |Since in many cases, a key alone is sufficient, we provide the\n |utility method `newTagNode(key)`, which is equivalent to\n |`newTagNode(key, \"\")`.\n |", example = ".newTagNode(\"foo\")")
def newTagNode(tagName: String): NewTagNodePairTraversal
@Doc(info = "Tag node with (`tagName`, `tagValue`)", longInfo = "", example = ".newTagNodePair(\"key\",\"val\")")
def newTagNodePair(tagName: String, tagValue: String): NewTagNodePairTraversal
@Doc(info = "Tags attached to this node")
def tag: Traversal[Tag]
@Doc(info = "Tags attached to this node")
def tagList: List[List[Tag]]

Concrete fields

val traversal: Traversal[NodeType]