final class NodeSteps[NodeType <: StoredNode] extends AnyVal
Steps for all node types
This is the base class for all steps defined on nodes.
- Annotations
- @Traversal()
- Alphabetic
- By Inheritance
- NodeSteps
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new NodeSteps(traversal: Traversal[NodeType])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def dump: List[String]
- Annotations
- @Doc("Display code (with syntax highlighting)", """
|For methods, dump the method code. For expressions,
|dump the method code along with an arrow pointing
|to the expression. Uses ansi-color highlighting.
|This only works for source frontends.
|""".stripMargin, help.this.Doc.<init>$default$3)
- def dumpRaw: List[String]
- Annotations
- @Doc("Display code (without syntax highlighting)", """
|For methods, dump the method code. For expressions,
|dump the method code along with an arrow pointing
|to the expression. No color highlighting.
|""".stripMargin, help.this.Doc.<init>$default$3)
- def file: Traversal[File]
- Annotations
- @Doc("The source file this code is in", """
|Not all but most node in the graph can be associated with
|a specific source file they appear in. `file` provides
|the file node that represents that source file.
|""".stripMargin, help.this.Doc.<init>$default$3)
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def location: Traversal[NewLocation]
- Annotations
- @Doc("Location, including filename and line number", """
|Most nodes of the graph can be associated with a specific
|location in code, and `location` provides this location.
|The return value is an object providing, e.g., filename,
|line number, and method name, as opposed to being a flat
|string. For example `.location.lineNumber` provides access
|to the line number alone, without requiring any parsing
|on the user's side.
|""".stripMargin, help.this.Doc.<init>$default$3)
- def newTagNode(tagName: String): NewTagNodePair
- Annotations
- @Doc("Tag node with `tagName`", """
|This method can be used to tag nodes in the graph such that
|they can later be looked up easily via `cpg.tag`. Tags are
|key value pairs, and they can be created with `newTagNodePair`.
|Since in many cases, a key alone is sufficient, we provide the
|utility method `newTagNode(key)`, which is equivalent to
|`newTagNode(key, "")`.
|""".stripMargin, """.newTagNode("foo")""")
- def newTagNodePair(tagName: String, tagValue: String): NewTagNodePair
- Annotations
- @Doc("Tag node with (`tagName`, `tagValue`)", "", """.newTagNodePair("key","val")""")
- def tag: Traversal[codepropertygraph.generated.nodes.Tag]
- Annotations
- @Doc("Tags attached to this node", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def tagList: List[List[TagBase]]
- Annotations
- @Doc("Tags attached to this node", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def toString(): String
- Definition Classes
- Any
- val traversal: Traversal[NodeType]
- def walkIn(edgeType: String): Traversal[Node]
- Attributes
- protected