ランキングに戻る

INRIA/spoon

Javaspoon.gforge.inria.fr

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.

code-analysiscode-transformationmetaprogrammingcode-generationabstract-syntax-treeaststatic-analysiscompile-time-reflectionjavajava9java-modulespoon
スター成長
スター
1.9k
フォーク
387
週間成長
Issue
352
5001k1.5k
2013年12月2018年2月2022年5月2026年7月
成果物Mavengit clone https://github.com/INRIA/spoon.git
README

Maven Central GHA tests Workflow Status Coverage Status Maintainability Rating Reproducible Builds

Spoon

Spoon is an open-source library to analyze, rewrite, transform, transpile Java source code. It parses source files to build a well-designed AST with powerful analysis and transformation API. It supports modern Java versions up to Java 25. Spoon is an official Inria open-source project, and member of the OW2 open-source consortium.

Documentation

The latest official documentation is available at https://spoon.gforge.inria.fr/.

Academic usage

If you use Spoon for academic purposes, please cite: Renaud Pawlak, Martin Monperrus, Nicolas Petitprez, Carlos Noguera, Lionel Seinturier. “Spoon: A Library for Implementing Analyses and Transformations of Java Source Code”. In Software: Practice and Experience, Wiley-Blackwell, 2015. Doi: 10.1002/spe.2346.

@article{pawlak:hal-01169705,
  TITLE = "{Spoon: A Library for Implementing Analyses and Transformations of Java Source Code}",
  AUTHOR = {Pawlak, Renaud and Monperrus, Martin and Petitprez, Nicolas and Noguera, Carlos and Seinturier, Lionel},
  JOURNAL = "{Software: Practice and Experience}",
  PUBLISHER = "{Wiley-Blackwell}",
  PAGES = {1155-1179},
  VOLUME = {46},
  URL = {https://hal.archives-ouvertes.fr/hal-01078532/document},
  YEAR = {2015},
  doi = {10.1002/spe.2346},
}

Professional support

If you need professional support on Spoon (development, training, extension), you are welcome to post a comment on https://github.com/INRIA/spoon/issues/3251

Getting started in 2 seconds

Required Java version:

  • Spoon 11.x requires JDK 17 or later.
  • Spoon 10.x requires JDK 11 or later.
  • Spoon 9.x requires Java 8.

Note that Spoon can of course still consume source code for older versions of Java, but it needs the above mentioned JDK version to run.

Get latest stable version with Maven, see https://search.maven.org/artifact/fr.inria.gforge.spoon/spoon-core

And start using it:

CtClass l = Launcher.parseClass("class A { void m() { System.out.println(\"yeah\");} }");

Documentation:

Contributing in 2 seconds

Create your first pull request to improve the documentation, see doc! Proceed with your first bug fix! The community is open-minded, respectful and patient. All external contributions are welcome.

Design Philosophy

R1) The Spoon metamodel is as close as possible to the language concepts.

R2) The Spoon model of a program is complete and sound.

R3) The text version of a Spoon model is well-formed and semantically equivalent to the original program.

R4) The analysis and transformation API is intuitive and regular.

R5) Transformation operators are designed to warn as fast as possible about invalid programs. This is done either with static type checking or with dynamic checks when the operators are used.

R6) When feasible, the text version of a Spoon model is close to the original one.

Compiling

To compile Spoon, you need a Java Development Kit (JDK) and Maven:

git clone https://github.com/INRIA/spoon
cd spoon
mvn compile

To run the tests:

mvn test

Releases

See Releases

License

Spoon is Free and Open Source, double-licensed under the (CeCILL-C license - French equivalent to LGPL) and the MIT license.

JProfiler

Spoon is developed with the help of JProfiler, a Java profiler by ej-technologies GmbH. JProfiler supports the development of Spoon by providing its full-featured Java Profiler for free. We thank ej-technologies GmbH for this support.

JProfiler

Powered by

JetBrains logo.

Github Contributors

This list is generated by chore/generate-contributor-list.py. If you're not listed or you'd like to have your full name, please post to https://github.com/INRIA/spoon/issues/3909.

  • adamjryan
  • Alcides Fonseca
  • Alexander Shopov
  • Aman Sharma
  • andrewbwogi
  • André Cruz
  • André Silva
  • Antoine Mottier
  • Anton Lyxell
  • argius
  • Arnaud Blouin
  • arsenkhy
  • Artamm
  • Artur Bosch
  • Arvid Siberov
  • aryan
  • Ashutosh Kumar Verma
  • aveuiller
  • Axel Howind
  • Benjamin DANGLOT
  • Benoit Cornu
  • Carlos Noguera
  • Ceki Gülcü
  • chammp
  • Charm
  • ChrisSquare
  • Christophe Dufour
  • Christopher Stokes
  • Clemens Bartz
  • Clément Fournier
  • César Soto Valero
  • Daniel Bobbert
  • Darius Sas
  • David Bernard
  • Didier Donsez
  • Diorcet Yann
  • Dorota Kopczyk
  • dufaux
  • dwayneb
  • dya-tel
  • Eddie T
  • Egor Bredikhin
  • Fabien DUMINY
  • Fan Long
  • fangzhen
  • fav
  • Favio DeMarco
  • Fernanda Madeiral
  • Filip Krakowski
  • Gabriel Chaperon Burgos
  • gibahjoe
  • GitHub Actions Bot
  • GluckZhang
  • Gregor Zeitlinger
  • gtoison
  • Guillaume Toison
  • Gérard Paligot
  • Hannes Greule
  • Haris Adzemovic
  • HectorSM
  • Henry Chu
  • Hervé Boutemy
  • Horia Constantin
  • I-Al-Istannen
  • intrigus-lgtm
  • jakobbraun
  • Jan Galinski
  • jon
  • Kai Luo
  • Lakshya A Agrawal
  • leventov
  • Lionel Seinturier
  • lodart
  • Lucas
  • Lukas Krejci
  • Luke Merrick
  • Marcel Manseer
  • Marcel Steinbeck
  • Martin Monperrus
  • Martin Wittlinger
  • MartinWitt
  • Matias Martinez
  • Maxim Stefanov
  • Maxime CLEMENT
  • Mehdi Kaytoue
  • Michael Täge
  • Mickael Istria
  • Miguel Sozinho Ramalho
  • Mikael Forsberg
  • Mr. Pine
  • Muhammet Ali AKBAY
  • Nicolas Harrand
  • Nicolas Pessemier
  • Nicolas Petitprez
  • Noah Santschi-Cooney
  • Olivier Barais
  • Ondřej Šebek
  • Patrick Schmitt
  • Pavel Vojtechovsky
  • peroksid90
  • Philippe Ombredanne
  • Phillip Schichtel
  • priyanka-28
  • Quentin LE DILAVREC
  • raymogg
  • Renaud Pawlak
  • Reza Gharibi
  • Rhys Compton
  • Rick Kellogg
  • Rijnard van Tonder
  • Rohitesh Kumar Jain
  • Roman Leventov
  • Ryota Hiyoshi
  • Sander Ploegsma
  • santos-samuel
  • scootafew
  • Scott Dickerson
  • Scott Pinwell
  • Sebastian Lamelas Marcote
  • Sergey Fedorov
  • Shantanu
  • Simon Larsén
  • Simon Urli
  • Spencer Williams
  • srlm
  • ST0NEWALL
  • Stefan Wolf
  • StepSecurity Bot
  • Sébastien Bertrand
  • The Spoon Bot
  • Thimo Seitz
  • Thomas Durieux
  • tiagodrcarvalho
  • Tomasz Zieliński
  • Urs Keller
  • Viktor
  • Vincenzo Musco
  • Wolfgang Schmiesing
  • Wouter Smeenk
  • Wreulicke
  • Yann Diorcet
  • Yogya Tulip Gamage
  • Zhang Xindong
  • Дмитрий
関連リポジトリ
Graphify-Labs/graphify

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

PythonPyPIMIT Licenseclaude-codegraphrag
graphify.com
93.3k9k
DeusData/codebase-memory-mcp

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

CMIT Licenseclaude-codecode-analysis
deusdata.github.io/codebase-memory-mcp/
33.8k2.6k
ycm-core/YouCompleteMe

A code-completion engine for Vim

PythonPyPIGNU General Public License v3.0vimcode-completion
ycm-core.github.io/YouCompleteMe/
25.9k2.8k
yusufkaraaslan/Skill_Seekers

Convert documentation websites, GitHub repositories, and PDFs into Claude AI skills with automatic conflict detection

PythonPyPIMIT Licenseai-toolsautomation
skillseekersweb.com
14.5k1.5k
wonderwhy-er/DesktopCommanderMCP

This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities

TypeScriptnpmMIT Licenseagentai
desktopcommander.app
8.7k962
universal-ctags/ctags

A maintained ctags implementation

CGNU General Public License v2.0ctagscode-navigation
ctags.io
7.2k661
larastan/larastan

⚗️ Adds code analysis to Laravel improving developer productivity and code quality.

PHPPackagistMIT Licenselaravelphpstan
6.5k497
javaparser/javaparser

Java 1-25 Parser and Abstract Syntax Tree for Java with advanced analysis functionalities.

JavaMavenOtherjavaparserparser
javaparser.org
6.1k1.2k
pmd/pmd

An extensible multilanguage static code analyzer.

JavaMavenOthercode-analysiscode-quality
pmd.github.io
5.5k1.6k
rrrene/credo

A static code analysis tool for the Elixir language with a focus on code consistency and teaching.

ElixirMIT Licenseelixircode-analysis
credo-ci.org
5.2k449
Kodezi/Chronos

Kodezi Chronos is a debugging-first language model that achieves state-of-the-art results on SWE-bench Lite (80.33%) and 67% real-world fix accuracy, over six times better than GPT-4. Built with Adaptive Graph-Guided Retrieval and Persistent Debug Memory. Model available Q1 2026 via Kodezi OS.

JavaMavenOtherartificial-intelligencebenchmark
chronos.so
4.9k210
braedonsaunders/codeflow

Paste any GitHub URL → interactive architecture map. See how files connect, find what breaks if you change something. No install, no accounts — runs entirely in your browser.

HTMLarchitecturebrowser-based
codeflow-five.vercel.app
4.7k716