final class AstNodeTraversal[A <: AstNode] extends AnyVal
- Annotations
- @Traversal()
- Alphabetic
- By Inheritance
- AstNodeTraversal
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AstNodeTraversal(traversal: Traversal[A])
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 ast(predicate: (AstNode) => Boolean): Traversal[AstNode]
All nodes of the abstract syntax tree rooted in this node, which match
predicate.All nodes of the abstract syntax tree rooted in this node, which match
predicate. Equivalent ofmatchin the original CPG paper. - def ast: Traversal[AstNode]
Nodes of the AST rooted in this node, including the node itself.
Nodes of the AST rooted in this node, including the node itself.
- Annotations
- @Doc()
- def astChildren: Traversal[AstNode]
Direct children of node in the AST.
Direct children of node in the AST. Siblings are ordered by their
orderfields - def astMinusRoot: Traversal[AstNode]
Nodes of the AST rooted in this node, minus the node itself
- def astParent: Traversal[AstNode]
Parent AST node
- def containsCallTo(regex: String): Traversal[A]
- def depth(p: (AstNode) => Boolean): Traversal[Int]
- def depth: Traversal[Int]
- Annotations
- @Doc()
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def inAst(root: AstNode): Traversal[AstNode]
Nodes of the AST obtained by expanding AST edges backwards until
rootor the method root is reached - def inAst: Traversal[AstNode]
Nodes of the AST obtained by expanding AST edges backwards until the method root is reached
- def inAstMinusLeaf(root: AstNode): Traversal[AstNode]
Nodes of the AST obtained by expanding AST edges backwards until
rootor the method root is reached, minus this node - def inAstMinusLeaf: Traversal[AstNode]
Nodes of the AST obtained by expanding AST edges backwards until the method root is reached, minus this node
- def isBlock: Traversal[Block]
Traverse only to those AST nodes that are blocks
- def isCall(calleeRegex: String): Traversal[Call]
Cast to call if applicable and filter on call code
calleeRegex - def isCall: Traversal[Call]
Traverse only to AST nodes that are calls
- def isCallTo(regex: String): Traversal[Call]
- def isCfgNode: Traversal[CfgNode]
Traverse only to those AST nodes that are also control flow graph nodes
- def isControlStructure: Traversal[ControlStructure]
Traverse only to those AST nodes that are control structures
- def isExpression: Traversal[Expression]
Traverse only to AST nodes that are expressions
- def isFieldIdentifier: Traversal[FieldIdentifier]
Traverse only to AST nodes that are field identifier
- def isFile: Traversal[File]
Traverse only to FILE AST nodes
- def isIdentifier: Traversal[Identifier]
Traverse only to AST nodes that are identifier
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isLiteral: Traversal[Literal]
Traverse only to AST nodes that are literals
- def isLocal: Traversal[Local]
- def isMember: Traversal[Member]
Traverse only to AST nodes that are MEMBER
- def isMethod: Traversal[Method]
Traverse only to AST nodes that are METHOD
- def isMethodRef: Traversal[MethodRef]
Traverse only to AST nodes that are method reference
- def isModifier: Traversal[Modifier]
Traverse only to AST nodes that are MODIFIER
- def isNamespaceBlock: Traversal[NamespaceBlock]
Traverse only to AST nodes that are NAMESPACE_BLOCK
- def isParameter: Traversal[MethodParameterIn]
Traverse only to AST nodes that are METHOD_PARAMETER_IN
- def isReturn: Traversal[Return]
Traverse only to AST nodes that are return nodes
- def isTypeDecl: Traversal[TypeDecl]
Traverse only to AST nodes that are TYPE_DECL
- def isTypeRef: Traversal[TypeRef]
Traverse only to AST nodes that are type reference
- def parentBlock: Traversal[Block]
Traverses up the AST and returns the first block node.
- def toString(): String
- Definition Classes
- Any
- val traversal: Traversal[A]
- def walkAstUntilReaching(labels: List[String]): Traversal[StoredNode]