Java
knowledge skill
The agent reads and interprets Java source code to extract structural information such as class hierarchies, method signatures, and field declarations. It produces a JSON artifact listing these elements for downstream analysis or documentation generation.
Worked examples
- {"input": {"source": "public class Calculator { public int add(int a, int b) { return a + b; } }", "file_path": "Calculator.java"}, "output": {"classes": ["Calculator"], "methods": ["public int add(int a, int b)"], "fields": []}}
- {"input": {"source": "class Person { private String name; public void setName(String n) {} }", "file_path": "Person.java"}, "output": {"classes": ["Person"], "methods": ["public void setName(String n)"], "fields": ["private String name"]}}
Input
- source: string (Java source code as a string)
- file_path: string (optional path to Java file for reference)
Output
- classes: array (list of class names)
- methods: array (list of method signatures)
- fields: array (list of field declarations)
Details
- Skill type: knowledge skill
- Safety level: safe_public_research
- Version: 1.0.0