find_instanceof_checks
Locate all instanceof checks for a Java type to identify type checking patterns, find polymorphism opportunities, and understand type discrimination logic in your codebase.
Instructions
Find all instanceof checks for a type (x instanceof Foo).
JDT-UNIQUE: This fine-grained search is not available in LSP.
USAGE: Provide fully qualified type name OUTPUT: All locations where instanceof checks against this type occur
Useful for:
Identifying type checking patterns
Finding polymorphism opportunities (replace instanceof with virtual dispatch)
Understanding type discrimination logic
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| typeName | Yes | Fully qualified type name to find instanceof checks for | |
| maxResults | No | Maximum results to return (default 100) |