PythonModuleDefinedCallLinker
Attempts to set the methodFullName
and dispatchType
properties of calls where the callees
are defined under a module.
Attributes
- cpg
the target code property graph.
- Graph
- Supertypes
- class SimpleCpgPassclass CpgPassclass ForkJoinParallelCpgPass[AnyRef]class NewStyleCpgPassBase[AnyRef]trait CpgPassBaseclass Objecttrait Matchableclass Any
Members list
Type members
Classlikes
Defines how a procedure is available to be called in the current scope.
Defines how a procedure is available to be called in the current scope.
Attributes
- callingName
how this procedure is to be called, i.e., alias name, name with path, etc.
- fullNameAsPyFile
the full name to where this method is defined where it's assumed to be defined under a named Python file.
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Inherited types
Attributes
- Inherited from:
- NewStyleCpgPassBase
Value members
Concrete methods
Returns all method declarations within this module that are not defined under a class definition.
Returns all method declarations within this module that are not defined under a class definition.
TODO: Some classes may annotate their methods as static
Attributes
- module
the module to search within.
- Returns:
a mapping of the method names and their procedures.
Parses all imports and identifies their full names and how they are to be called in this scope.
Parses all imports and identifies their full names and how they are to be called in this scope.
Attributes
- i
the import call.
- Returns:
the procedure information in this scope.
If we can find the method that this name belongs to, then link the call edge.
If we can find the method that this name belongs to, then link the call edge.
Attributes
- builder
the diff graph builder.
- call
the source call node.
- procInScope
scope information about the callee.
Attributes
- Definition Classes
- CpgPass
Inherited methods
Attributes
- Definition Classes
- NewStyleCpgPassBase -> CpgPassBase
- Inherited from:
- NewStyleCpgPassBase
Attributes
- Definition Classes
- ForkJoinParallelCpgPass -> CpgPassBase
- Inherited from:
- ForkJoinParallelCpgPass
Attributes
- Inherited from:
- NewStyleCpgPassBase
Attributes
- Definition Classes
- CpgPass -> NewStyleCpgPassBase
- Inherited from:
- CpgPass
Attributes
- Inherited from:
- NewStyleCpgPassBase
Name of the pass. By default it is inferred from the name of the class, override if needed.
Name of the pass. By default it is inferred from the name of the class, override if needed.
Attributes
- Inherited from:
- CpgPassBase
Attributes
- Definition Classes
- CpgPass -> NewStyleCpgPassBase
- Inherited from:
- CpgPass
Runs the cpg pass, adding changes to the passed builder. Use with caution -- API is unstable. Returns max(nParts, 1), where nParts is either the number of parallel parts, or the number of iterarator elements in case of legacy passes. Includes init() and finish() logic.
Runs the cpg pass, adding changes to the passed builder. Use with caution -- API is unstable. Returns max(nParts, 1), where nParts is either the number of parallel parts, or the number of iterarator elements in case of legacy passes. Includes init() and finish() logic.
Attributes
- Definition Classes
- NewStyleCpgPassBase -> CpgPassBase
- Inherited from:
- NewStyleCpgPassBase
Wraps runWithBuilder with logging, and swallows raised exceptions. Use with caution -- API is unstable. A return value of -1 indicates failure, otherwise the return value of runWithBuilder is passed through.
Wraps runWithBuilder with logging, and swallows raised exceptions. Use with caution -- API is unstable. A return value of -1 indicates failure, otherwise the return value of runWithBuilder is passed through.
Attributes
- Inherited from:
- CpgPassBase