analyze_type
Retrieve Java type information, members, hierarchy, usage, and diagnostics in one call, replacing multiple queries.
Instructions
Comprehensive type analysis in a single call.
USAGE: analyze_type(typeName="com.example.Foo") OUTPUT: Type info, members, hierarchy, usage summary, diagnostics
Combines:
Type info (name, kind, modifiers, location)
All members (methods, fields, constructors)
Type hierarchy (superclass, interfaces, subtypes)
Usage summary (instantiations, casts, etc.)
Diagnostics for the type's file
Use this instead of multiple calls to get_type_members + get_type_hierarchy + get_type_usage_summary.
hierarchy.unresolvedSupertypes, present only when there are any, names each supertype the compiler cannot resolve (a missing dependency), as the declaration writes it, with the type whose declaration names it: this type or one of its supertypes. The hierarchy's potentialMatches are places naming the type as a supertype that JDT could not confirm; the usage summary's are uses it could not confirm, the first maxUsages of each category. maxUsages below 0 is INVALID_PARAMETER.
potentialMatches, present only when there are any, holds the places JDT's search reports as possible matches but cannot confirm, because a type or name there does not resolve (a missing dependency or a compile error): count is their exact number, and locations lists them, as many as the results it stands beside may list. They are never counted or listed as results.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| typeName | Yes | Fully qualified or simple type name | |
| maxUsages | No | Max usages per category, 0 or more (default 10) | |
| includeUsages | No | Include usage analysis (default true) |