final class MethodTraversal extends AnyVal
A method, function, or procedure
- Annotations
- @Traversal()
- Alphabetic
- By Inheritance
- MethodTraversal
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MethodTraversal(traversal: Traversal[Method])
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 block: Traversal[Block]
Traverse to block
Traverse to block
- Annotations
- @Doc("Root of the abstract syntax tree", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def body: Traversal[Block]
Traverse to method body (alias for
block)Traverse to method body (alias for
block)- Annotations
- @Doc("Alias for `block`", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def break: Traversal[ControlStructure]
- Annotations
- @Doc("All breaks (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def cfgFirst: Traversal[Expression]
Traverse to first expression in CFG.
Traverse to first expression in CFG.
- Annotations
- @Doc("First control flow graph node", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def cfgLast: Traversal[Expression]
Traverse to last expression in CFG.
Traverse to last expression in CFG.
- Annotations
- @Doc("Last control flow graph node", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def cfgNode: Traversal[CfgNode]
- Annotations
- @Doc("Control flow graph nodes", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def continue: Traversal[ControlStructure]
- Annotations
- @Doc("All continues (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def controlStructure(regex: String): Traversal[ControlStructure]
Shorthand to traverse to control structures where condition matches
regex - def controlStructure: Traversal[ControlStructure]
All control structures of this method
All control structures of this method
- Annotations
- @Doc("Control structures (source frontends only)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def definingMethod: Traversal[Method]
The method in which this method is defined
The method in which this method is defined
- Annotations
- @Doc("Method this method is defined in", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def definingTypeDecl: Traversal[TypeDecl]
The type declaration associated with this method, e.g., the class it is defined in.
The type declaration associated with this method, e.g., the class it is defined in.
- Annotations
- @Doc("Type this method is defined in", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def doBlock: Traversal[ControlStructure]
- Annotations
- @Doc("All do blocks (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def elseBlock: Traversal[ControlStructure]
- Annotations
- @Doc("All else blocks (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def external: Traversal[Method]
Traverse to external methods, that is, methods not present but only referenced in the CPG.
Traverse to external methods, that is, methods not present but only referenced in the CPG.
- Annotations
- @Doc("External methods (called, but no body available)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def forBlock: Traversal[ControlStructure]
- Annotations
- @Doc("All for blocks (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def goto: Traversal[ControlStructure]
- Annotations
- @Doc("All gotos (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def ifBlock: Traversal[ControlStructure]
- Annotations
- @Doc("All if blocks (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def internal: Traversal[Method]
Traverse to internal methods, that is, methods for which code is included in this CPG.
Traverse to internal methods, that is, methods for which code is included in this CPG.
- Annotations
- @Doc("Internal methods, i.e., a body is available", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNotStub: Traversal[Method]
Traverse only to methods that are not stubs.
- def isStub: Traversal[Method]
Traverse only to methods that are stubs, e.g., their code is not available or the method body is empty.
- def isVariadic: Traversal[Method]
Traverse only to methods that accept variadic arguments.
- def literal: Traversal[Literal]
Traverse to literals of method
Traverse to literals of method
- Annotations
- @Doc("Literals used in the method", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def local: Traversal[Local]
Traverse to the methods local variables
Traverse to the methods local variables
- Annotations
- @Doc("Local variables declared in the method", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def methodReturn: Traversal[MethodReturn]
Traverse to formal return parameter
Traverse to formal return parameter
- Annotations
- @Doc("All formal return parameters", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def namespace: Traversal[Namespace]
Traverse to namespace
Traverse to namespace
- Annotations
- @Doc("Namespace this method is declared in", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def numberOfLines: Traversal[Int]
- def parameter: Traversal[MethodParameterIn]
Traverse to parameters of the method
Traverse to parameters of the method
- Annotations
- @Doc("All parameters", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def switchBlock: Traversal[ControlStructure]
- Annotations
- @Doc("All switch blocks (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def toString(): String
- Definition Classes
- Any
- def topLevelExpressions: Traversal[Expression]
- Annotations
- @Doc("Top level expressions (\"Statements\")", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- val traversal: Traversal[Method]
- def tryBlock: Traversal[ControlStructure]
- Annotations
- @Doc("All try blocks (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)
- def whileBlock: Traversal[ControlStructure]
- Annotations
- @Doc("All while blocks (`ControlStructure` nodes)", help.this.Doc.<init>$default$2, help.this.Doc.<init>$default$3)