Skip to content

Add Java code graph support and Spring dependency injection resolution - #122

Open
LudwigAndreas wants to merge 2 commits into
mex-memory:mainfrom
LudwigAndreas:main
Open

Add Java code graph support and Spring dependency injection resolution#122
LudwigAndreas wants to merge 2 commits into
mex-memory:mainfrom
LudwigAndreas:main

Conversation

@LudwigAndreas

Copy link
Copy Markdown

What

Added Java code graph support via tree-sitter-java.wasm and production-ready Spring dependency injection resolution.

This includes:

  • Java extraction for annotations, imports, inheritance, field/parameter/return type references, method calls, object instantiations, and decorator relationships.
  • Spring framework resolver supporting component scanning, constructor injection, @Bean providers, qualifiers, @Primary, and Lombok-generated constructor injection.
  • Registration of the Spring framework resolver.
  • Java/Spring fixtures, integration tests, and documentation updates.

Why

This enables MEX to build accurate code graphs for Java projects and resolve Spring dependency injection relationships that are implicit in source code. As a result, navigation and dependency analysis now include both static Java references and framework-managed bean dependencies.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Docs
  • CI/Tooling

How to test

  1. Run mex check on a Spring-based Java project.

  2. Verify the generated graph includes:

    • Java symbol relationships (imports, inheritance, type references, calls, and instantiations).
    • Spring dependency edges between injected beans (including constructor injection and @Bean providers).
  3. Run:

    npm test
    npm run typecheck
    npm run build

Checklist

  • Tests pass (npm test)
  • No breaking changes
  • Tested locally with a real project

Code-graph changes

  • This PR targets main
  • A linked issue agrees on the bounded extractor/resolver scope
  • The change follows the frozen LanguageExtractor or FrameworkResolver interface
  • A focused fixture and assertions for the expected node/edge shape are included
  • Any new grammar WASM, extension mapping, extractor, or resolver is registered
  • No graph identity, reconciliation, schema, or drift-semantics changes are included, or a core / discuss-first issue is linked above

@LudwigAndreas
LudwigAndreas marked this pull request as ready for review August 5, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant