get_enclosing_element
Identify the enclosing Java method, type, and package at a specific code position to understand code structure and context during analysis.
Instructions
Get the enclosing element at a position.
USAGE: Position anywhere in code OUTPUT: Enclosing method, type, and package info
IMPORTANT: Uses ZERO-BASED coordinates.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to source file | |
| line | Yes | Zero-based line number | |
| column | Yes | Zero-based column number |