# INRIA/spoon

Spoon is a metaprogramming library to analyze and transform Java source code. :spoon: is made with :heart:, :beers: and :sparkles:. It parses source files to build a well-designed AST with powerful analysis and transformation API.

Repository: https://github.com/INRIA/spoon
Canonical: https://ross.abutalabs.com/products/inria-spoon
Homepage: http://spoon.gforge.inria.fr/
Language: Java
License: NOASSERTION
License Family: other
Topics: code-analysis, code-transformation, metaprogramming, code-generation, abstract-syntax-tree, ast, static-analysis, compile-time-reflection, java, java9, java-module, spoon, parser, inria, java10, hacktoberfest
Last push: 2026-08-26T19:12:06+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 69, longevity 100
- inputs: {"age_days": 4683, "days_push": 7, "days_rel": 50, "gap_med": 159.5, "n_releases_24m": 5}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1954, forks 388 (observed 2026-08-28T04:05:58.841995+00:00)

## What it is
Spoon is an open-source Java metaprogramming library that parses Java source code into a well-designed AST and provides powerful APIs for analysis, rewriting, transformation, and code generation. It is an official Inria project, supports Java up to version 25, and ships with Maven/Gradle plugins and a fluent testing API for transformations.

## Use cases
- analyze java source code with an ast
- refactor java code programmatically
- generate java source code from templates
- write static analysis tools for java
- apply semantic patches to java codebases
- test java code transformations
- transpile or rewrite java source files

## When to choose
- you need to parse, query, or transform Java source code at the AST level
- you are building static analysis, refactoring, or code generation tools for Java
- you want a mature, well-documented library with Maven/Gradle integration and transformation testing support

## When to avoid
- you need to analyze bytecode rather than source code
- you work with languages other than Java
- you only need simple linting that existing linters already cover

## Facets
- artifact type: library
- maturity: active
- function: parser, developer-tools, code-review, testing
- domain: parsers, developer-tools, programming-languages
- platform: jvm, cli, cross-platform
- tags: ast, metaprogramming, static-analysis, code-transformation, code-generation, java, source-code-analysis, semantic-patching, automation

## Member repositories
- INRIA/spoon (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:58.841995+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:06:31.579468+00:00, confidence not recorded.
  - readme: https://github.com/INRIA/spoon (fetched 2026-08-28T04:05:58.841995+00:00, sha 719d810efb57)
  - homepage: http://spoon.gforge.inria.fr/ (fetched 2026-08-29T10:46:10.115111+00:00, sha 5a48535d1031)
  - site_page: https://spoon.gforge.inria.fr/about.html (fetched 2026-08-29T10:46:10.118255+00:00, sha 68236adc80db)
  - site_page: https://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs (fetched 2026-08-29T10:46:10.120175+00:00, sha 26d267185ae0)
  - site_page: https://spoon.gforge.inria.fr/testing_quickstart.html (fetched 2026-08-29T10:46:10.123855+00:00, sha 3ef55a527022)
  - site_page: https://spoon.gforge.inria.fr/faq.html (fetched 2026-08-29T10:46:10.122097+00:00, sha debf5a5389a3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
