get_type_hierarchy
Retrieve the full type hierarchy (supertypes, interfaces, and subtypes) for a Java type using file position or fully qualified name. Reveals inheritance chain to understand class structures.
Instructions
Get the type hierarchy (supertypes and subtypes) for a Java type.
USAGE: Position on a type, returns full inheritance chain OUTPUT: Superclasses, interfaces, and all subtypes
Can be called with either:
File position (filePath, line, column) - finds type at cursor
Type name (typeName) - looks up type by qualified name
IMPORTANT: Uses ZERO-BASED coordinates when using file position.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxDepth | No | Maximum depth of hierarchy to return (default 10) | |
| line | No | Zero-based line number | |
| filePath | No | Path to source file (for position-based lookup) | |
| column | No | Zero-based column number | |
| typeName | No | Fully qualified type name (alternative to position) |