NodeTypeStarters

io.shiftleft.semanticcpg.language.NodeTypeStarters
class NodeTypeStarters(cpg: Cpg) extends TraversalSource

Attributes

Graph
Supertypes
class TraversalSource
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def all: Traversal[StoredNode]

Traverse to all nodes.

Traverse to all nodes.

Attributes

Definition Classes
TraversalSource
def annotation: Traversal[Annotation]

Traverse to all annotations

Traverse to all annotations

Attributes

def argument: Traversal[Expression]

Traverse to all arguments passed to methods

Traverse to all arguments passed to methods

Attributes

def argument(code: String): Traversal[Expression]

Shorthand for cpg.argument.code(code)

Shorthand for cpg.argument.code(code)

Attributes

def break: Traversal[ControlStructure]
def call: Traversal[Call]

Traverse to all call sites

Traverse to all call sites

Attributes

def call(name: String): Traversal[Call]

Shorthand for cpg.call.name(name)

Shorthand for cpg.call.name(name)

Attributes

def comment: Traversal[Comment]

Traverse to all comments in source-based CPGs.

Traverse to all comments in source-based CPGs.

Attributes

def comment(code: String): Traversal[Comment]

Shorthand for cpg.comment.code(code)

Shorthand for cpg.comment.code(code)

Attributes

def configFile: Traversal[ConfigFile]

Traverse to all config files

Traverse to all config files

Attributes

def configFile(name: String): Traversal[ConfigFile]

Shorthand for cpg.configFile.name(name)

Shorthand for cpg.configFile.name(name)

Attributes

def continue: Traversal[ControlStructure]
def controlStructure: Traversal[ControlStructure]
def dependency: Traversal[Dependency]

Traverse to all dependencies

Traverse to all dependencies

Attributes

def dependency(name: String): Traversal[Dependency]

Shorthand for cpg.dependency.name(name)

Shorthand for cpg.dependency.name(name)

Attributes

def doBlock: Traversal[ControlStructure]
def elseBlock: Traversal[ControlStructure]
def file: Traversal[File]

Traverse to all source files

Traverse to all source files

Attributes

def file(name: String): Traversal[File]

Shorthand for cpg.file.name(name)

Shorthand for cpg.file.name(name)

Attributes

def forBlock: Traversal[ControlStructure]
def goto: Traversal[ControlStructure]
def identifier: Traversal[Identifier]

Traverse to all identifiers, e.g., occurrences of local variables or class members in method bodies.

Traverse to all identifiers, e.g., occurrences of local variables or class members in method bodies.

Attributes

def identifier(name: String): Traversal[Identifier]

Shorthand for cpg.identifier.name(name)

Shorthand for cpg.identifier.name(name)

Attributes

def ifBlock: Traversal[ControlStructure]
def imports: Traversal[Import]
def jumpTarget: Traversal[JumpTarget]

Traverse to all jump targets

Traverse to all jump targets

Attributes

def literal: Traversal[Literal]

Traverse to all literals (constant strings and numbers provided directly in the code).

Traverse to all literals (constant strings and numbers provided directly in the code).

Attributes

def literal(code: String): Traversal[Literal]

Shorthand for cpg.literal.code(code)

Shorthand for cpg.literal.code(code)

Attributes

def local: Traversal[Local]

Traverse to all local variable declarations

Traverse to all local variable declarations

Attributes

def local(name: String): Traversal[Local]

Shorthand for cpg.local.name

Shorthand for cpg.local.name

Attributes

def member: Traversal[Member]

Traverse to all class members

Traverse to all class members

Attributes

def member(name: String): Traversal[Member]

Shorthand for cpg.member.name(name)

Shorthand for cpg.member.name(name)

Attributes

def metaData: Traversal[MetaData]

Traverse to all meta data entries

Traverse to all meta data entries

Attributes

def method: Traversal[Method]

Traverse to all methods

Traverse to all methods

Attributes

def method(namePattern: String): Traversal[Method]

Shorthand for cpg.method.name(name)

Shorthand for cpg.method.name(name)

Attributes

def methodRef: Traversal[MethodRef]

Traverse to all method references

Traverse to all method references

Attributes

def methodRef(name: String): Traversal[MethodRef]

Shorthand for cpg.methodRef.filter(_.referencedMethod.name(name))

Shorthand for cpg.methodRef.filter(_.referencedMethod.name(name))

Attributes

def methodReturn: Traversal[MethodReturn]

Traverse to all formal return parameters

Traverse to all formal return parameters

Attributes

def namespace: Traversal[Namespace]

Traverse to all namespaces, e.g., packages in Java.

Traverse to all namespaces, e.g., packages in Java.

Attributes

def namespace(name: String): Traversal[Namespace]

Shorthand for cpg.namespace.name(name)

Shorthand for cpg.namespace.name(name)

Attributes

def namespaceBlock: Traversal[NamespaceBlock]

Traverse to all namespace blocks, e.g., packages in Java.

Traverse to all namespace blocks, e.g., packages in Java.

Attributes

def namespaceBlock(name: String): Traversal[NamespaceBlock]

Shorthand for cpg.namespaceBlock.name(name)

Shorthand for cpg.namespaceBlock.name(name)

Attributes

def parameter: Traversal[MethodParameterIn]

Traverse to all input parameters

Traverse to all input parameters

Attributes

def parameter(name: String): Traversal[MethodParameterIn]

Shorthand for cpg.parameter.name(name)

Shorthand for cpg.parameter.name(name)

Attributes

def ret: Traversal[Return]

Traverse to all return expressions

Traverse to all return expressions

Attributes

def ret(code: String): Traversal[Return]

Shorthand for returns.code(code)

Shorthand for returns.code(code)

Attributes

def switchBlock: Traversal[ControlStructure]
def tag: Traversal[Tag]

Traverse to all tags

Traverse to all tags

Attributes

def tag(name: String): Traversal[Tag]
def throws: Traversal[ControlStructure]
def tryBlock: Traversal[ControlStructure]
def typ: Traversal[Type]

Traverse to all types, e.g., Set

Traverse to all types, e.g., Set

Attributes

def typ(name: String): Traversal[Type]

Shorthand for cpg.typ.name(name)

Shorthand for cpg.typ.name(name)

Attributes

def typeDecl: Traversal[TypeDecl]

Traverse to all declarations, e.g., Set

Traverse to all declarations, e.g., Set

Attributes

def typeDecl(name: String): Traversal[TypeDecl]

Shorthand for cpg.typeDecl.name(name)

Shorthand for cpg.typeDecl.name(name)

Attributes

def typeRef: Traversal[TypeRef]

Traverse to all type references

Traverse to all type references

Attributes

def whileBlock: Traversal[ControlStructure]

Inherited methods

def has(key: String, value: Any): Traversal[Node]

Start traversal with all nodes that have given property value

Start traversal with all nodes that have given property value

Attributes

Inherited from:
TraversalSource
def has(property: Property[_]): Traversal[Node]

Start traversal with all nodes that have given property value

Start traversal with all nodes that have given property value

Attributes

Inherited from:
TraversalSource
def hasLabel(label: String): Traversal[Node]

Attributes

Inherited from:
TraversalSource
def id[NodeType : DefaultsToNode](id: Long): Traversal[NodeType]

Attributes

Inherited from:
TraversalSource
def ids[NodeType : DefaultsToNode](ids: Long*): Traversal[NodeType]

Attributes

Inherited from:
TraversalSource
def label(label: String): Traversal[Node]

Attributes

Inherited from:
TraversalSource
def labelAndProperty(label: String, propertyKey: String, propertyValue: Any): Traversal[Node]

Start traversal with all nodes with given label that have given property value Inspects the cardinality of the indices of the properties and labels, and takes the smaller one

Start traversal with all nodes with given label that have given property value Inspects the cardinality of the indices of the properties and labels, and takes the smaller one

Attributes

Inherited from:
TraversalSource
def labelAndProperty(label: String, property: Property[_]): Traversal[Node]

Start traversal with all nodes with given label that have given property value Inspects the cardinality of the indices of the properties and labels, and takes the smaller one

Start traversal with all nodes with given label that have given property value Inspects the cardinality of the indices of the properties and labels, and takes the smaller one

Attributes

Inherited from:
TraversalSource
def labelTyped[A <: Node](label: String): Traversal[A]

Attributes

Inherited from:
TraversalSource