analyze_control_flow
Analyze Java method control flow to identify branching points, loops, returns, throws, and nesting depth for code understanding and optimization.
Instructions
Analyze the control flow structure of a method.
USAGE: analyze_control_flow(filePath="path/to/File.java", line=10, column=5) OUTPUT: Branching points, loops, returns, throws, and nesting depth
Reports:
Branch count (if/switch/ternary)
Loop count and types (for/while/do-while/enhanced-for)
Return points with line numbers
Throw points with exception types and line numbers
Try-catch blocks with caught exception types
Maximum nesting depth
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | File containing the method | |
| line | Yes | Zero-based line number within the method | |
| column | Yes | Zero-based column number |