spoon

INRIA活跃维护

Spoon 是一个 Java 元编程库,能解析源码构建结构良好的 AST,并提供强大的分析与变换 API,用于代码分析、生成和编译期反射。

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.

v11.5.1-beta-17发布于 2026-11-08 06:03 UTC1,964star +1 / 7 天394fork同步于 2026-11-10 11:45 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/INRIA/spoon
cd spoon
mvn compile
硬件要求按 README 说明

README 未说明,仅要求 JDK 运行环境:Spoon 11.x 需 JDK 17+,10.x 需 JDK 11+,9.x 需 Java 8

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

解析 Java 源码构建 AST 的元编程库,用于分析和改写代码

Spoon 是一个 Java 元编程库,能解析源码构建结构良好的 AST,并提供强大的分析与变换 API,用于代码分析、生成和编译期反射。

核心能力

  • 解析 Java 源文件构建结构良好的 AST
  • 提供强大的分析与变换 API
  • 支持转译 Java 源码
  • 支持到 Java 25 的现代版本
  • 变换算子尽早提示非法程序

容易踩的坑

不同 Spoon 大版本对运行 JDK 要求不同,需按版本选 JDK;通过 Maven 引入 spoon-core 依赖,版本见 Maven Central;编译源码需 JDK 和 Maven

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v11.5.1-beta-17
  1. v11.5.1-beta-17Release v11.5.1-beta-17pre-release最新正式版2026-11-08 · 2026-11-08 06:03 UTC

    Changelog

    🐛 Fixes

    • 291df8c fix(prettyprinter): prevent crash when sniper-printing records (#6926)

    🛠 Build

    • 7082a6e build(deps): update dependency com.fasterxml.jackson.core:jackson-databind to v2.23.0 (#6979)
    • 8fae5da build(deps): update gradle to v9.9.0 (#6978)
    • 151cb69 build(deps): update step-security/harden-runner action to v2.22.4 (#6977)
    • 7fedbf9 build(deps): update actions/setup-java action to v6.2.0 (#6974)
    • ada22aa build(deps): update github/codeql-action action to v4.39.3 (#6973)
    • 3a91142 build(deps): update github/codeql-action digest to 33d7b85 (#6972)
    • b97b433 build(deps): update github/codeql-action action to v4.39.2 (#6969)
    • 30604d1 build(deps): update dependency java-jdk to v17.0.21+9 (#6964)
    • 4ed285a build(deps): update github/codeql-action digest to 1fc58d0 (#6968)
    • 9ee7a53 build(deps): update dependency com.google.guava:guava to v33.8.0 (#6967)
    • 8be85ce build(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.11.0 (#6966)
    • b0574fe build(deps): update plugin com.github.ben-manes.versions to v0.67.0 (#6963)
    • 8294c11 build(deps): update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.7.0 (#6962)
    • 65bb801 build(deps): update step-security/harden-runner action to v2.22.3 (#6960)
    • 92b2853 build(deps): update dependency org.jacoco:jacoco-maven-plugin to v0.8.16 (#6959)
    • 75852c2 build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.6.1 (#6958)
    • 155e802 build(deps): update dependency ch.qos.logback:logback-classic to v1.6.6 (#6956)
    • a717e81 build(deps): update github/codeql-action action to v4.39.1 (#6954)
    • d9f2790 build(deps): update github/codeql-action digest to 9b32540 (#6953)
    • df5824e build(deps): update step-security/harden-runner action to v2.22.2 (#6952)
    • cd5c641 build(deps): update gradle to v9.8.2 (#6951)
    • 4c7eca7 build(deps): lock file maintenance (#6950)
    • 45c3b3d build(deps): update dependency com.fasterxml.jackson.core:jackson-databind to v2.22.4 (#6949)
    • eedfd65 build(deps): update github/codeql-action action to v4.39.0 (#6948)
    • cfcb197 build(deps): update github/codeql-action digest to 6f2ac81 (#6947)
    • b76730d build(deps): update actions/setup-java digest to b843ebf (#6946)
    • e24f542 build(deps): update actions/setup-java action to v6.1.0 (#6945)
    • b1037bd build(deps): lock file maintenance (#6943)
    • aca5baa build(deps): update step-security/harden-runner action to v2.22.1 (#6942)
    • 002812e build(deps): update ossf/scorecard-action action to v2.5.0 (#6944)
    • 2532aa3 build(deps): update plugin com.github.ben-manes.versions to v0.66.0 (#6941)
    • 07ef536 build(deps): update javafx monorepo to v28-ea+12 (#6940)
    • d4109ca build(deps): update github/codeql-action action to v4.38.3 (#6938)
    • 5856885 build(deps): update gradle to v9.8.1 (#6939)
    • d6a8832 build(deps): update actions/upload-artifact action to v7.0.2 (#6936)
    • 49e5906 build(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.4 (#6937)
    • 2936c49 build(deps): update github/codeql-action digest to 24c5418 (#6935)
    • fd7969f build(deps): update actions/upload-artifact digest to cf430e0 (#6934)
    • 9a5454e build(deps): update determinatesystems/flake-checker-action action to v14 (#6897)
    • 8977c4b build(deps): update determinatesystems/magic-nix-cache-action action to v15 (#6898)
    • 1d92d56 build(deps): lock file maintenance (#6933)
    • 1cd523e build(deps): update javafx monorepo to v28-ea+11 (#6932)
    • 9abc4c0 build(deps): lock file maintenance (#6925)
    • b9082fd build(deps): update dependency ch.qos.logback:logback-classic to v1.6.5 (#6930)
    • b75af3b build(deps): update dependency org.apache.commons:commons-lang3 to v3.21.0 (#6929)
    • 6bbcb50 build(deps): update dependency com.google.guava:guava to v33.7.2-jre (#6928)
    • 5d335c9 build(deps): update jetbrains/qodana-action action to v2026.2.2 (#6927)
    • 74a1bed build(deps): update mockito monorepo to v5.24.0 (#6924)
    • 4d316ef build(deps): update javafx monorepo to v28-ea+10 (#69
  2. v11.5.1-beta-16Release v11.5.1-beta-16pre-release2026-11-01 · 2026-11-01 06:21 UTC
    查看更新说明

    Changelog

    🐛 Fixes

    • 291df8c fix(prettyprinter): prevent crash when sniper-printing records (#6926)

    🛠 Build

    • b0574fe build(deps): update plugin com.github.ben-manes.versions to v0.67.0 (#6963)
    • 8294c11 build(deps): update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.7.0 (#6962)
    • 65bb801 build(deps): update step-security/harden-runner action to v2.22.3 (#6960)
    • 92b2853 build(deps): update dependency org.jacoco:jacoco-maven-plugin to v0.8.16 (#6959)
    • 75852c2 build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.6.1 (#6958)
    • 155e802 build(deps): update dependency ch.qos.logback:logback-classic to v1.6.6 (#6956)
    • a717e81 build(deps): update github/codeql-action action to v4.39.1 (#6954)
    • d9f2790 build(deps): update github/codeql-action digest to 9b32540 (#6953)
    • df5824e build(deps): update step-security/harden-runner action to v2.22.2 (#6952)
    • cd5c641 build(deps): update gradle to v9.8.2 (#6951)
    • 4c7eca7 build(deps): lock file maintenance (#6950)
    • 45c3b3d build(deps): update dependency com.fasterxml.jackson.core:jackson-databind to v2.22.4 (#6949)
    • eedfd65 build(deps): update github/codeql-action action to v4.39.0 (#6948)
    • cfcb197 build(deps): update github/codeql-action digest to 6f2ac81 (#6947)
    • b76730d build(deps): update actions/setup-java digest to b843ebf (#6946)
    • e24f542 build(deps): update actions/setup-java action to v6.1.0 (#6945)
    • b1037bd build(deps): lock file maintenance (#6943)
    • aca5baa build(deps): update step-security/harden-runner action to v2.22.1 (#6942)
    • 002812e build(deps): update ossf/scorecard-action action to v2.5.0 (#6944)
    • 2532aa3 build(deps): update plugin com.github.ben-manes.versions to v0.66.0 (#6941)
    • 07ef536 build(deps): update javafx monorepo to v28-ea+12 (#6940)
    • d4109ca build(deps): update github/codeql-action action to v4.38.3 (#6938)
    • 5856885 build(deps): update gradle to v9.8.1 (#6939)
    • d6a8832 build(deps): update actions/upload-artifact action to v7.0.2 (#6936)
    • 49e5906 build(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.4 (#6937)
    • 2936c49 build(deps): update github/codeql-action digest to 24c5418 (#6935)
    • fd7969f build(deps): update actions/upload-artifact digest to cf430e0 (#6934)
    • 9a5454e build(deps): update determinatesystems/flake-checker-action action to v14 (#6897)
    • 8977c4b build(deps): update determinatesystems/magic-nix-cache-action action to v15 (#6898)
    • 1d92d56 build(deps): lock file maintenance (#6933)
    • 1cd523e build(deps): update javafx monorepo to v28-ea+11 (#6932)
    • 9abc4c0 build(deps): lock file maintenance (#6925)
    • b9082fd build(deps): update dependency ch.qos.logback:logback-classic to v1.6.5 (#6930)
    • b75af3b build(deps): update dependency org.apache.commons:commons-lang3 to v3.21.0 (#6929)
    • 6bbcb50 build(deps): update dependency com.google.guava:guava to v33.7.2-jre (#6928)
    • 5d335c9 build(deps): update jetbrains/qodana-action action to v2026.2.2 (#6927)
    • 74a1bed build(deps): update mockito monorepo to v5.24.0 (#6924)
    • 4d316ef build(deps): update javafx monorepo to v28-ea+10 (#6922)
    • 71afb9d build(deps): update gradle to v9.8.0 (#6923)
    • 2b836b9 build(deps): update github/codeql-action action to v4.38.2 (#6921)
    • 0c31518 build(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.3 (#6920)
    • 2909837 build(deps): update dependency ch.qos.logback:logback-classic to v1.6.4 (#6919)
    • b282dac build(deps): update github/codeql-action digest to 2892aa5 (#6918)
    • 7c9d8e1 build(deps): update dependency org.slf4j:slf4j-api to v2.0.20 (#6916)
    • 596f20a build(deps): update dependency com.fasterxml.jackson.core:jackson-databind to v2.22.3 (#6914)
    • 74ae45a build(deps): update javafx monorepo to v28-ea+9 (#6913)
    • 0e0251a build(deps): lock file maintenance (#6912)
    • 9b74d80 build(deps): update github/codeql-action action to v4.38.1 (#6910)
    • 449fd36 build(deps): update github/codeql-action digest to 1c5b675 (#6909)
    • 0185789 build(deps
  3. v11.5.1-beta-15Release v11.5.1-beta-15pre-release2026-10-25 · 2026-10-25 04:28 UTC
    查看更新说明

    Changelog

    🐛 Fixes

    • 291df8c fix(prettyprinter): prevent crash when sniper-printing records (#6926)

    🛠 Build

    • a717e81 build(deps): update github/codeql-action action to v4.39.1 (#6954)
    • d9f2790 build(deps): update github/codeql-action digest to 9b32540 (#6953)
    • df5824e build(deps): update step-security/harden-runner action to v2.22.2 (#6952)
    • cd5c641 build(deps): update gradle to v9.8.2 (#6951)
    • 4c7eca7 build(deps): lock file maintenance (#6950)
    • 45c3b3d build(deps): update dependency com.fasterxml.jackson.core:jackson-databind to v2.22.4 (#6949)
    • eedfd65 build(deps): update github/codeql-action action to v4.39.0 (#6948)
    • cfcb197 build(deps): update github/codeql-action digest to 6f2ac81 (#6947)
    • b76730d build(deps): update actions/setup-java digest to b843ebf (#6946)
    • e24f542 build(deps): update actions/setup-java action to v6.1.0 (#6945)
    • b1037bd build(deps): lock file maintenance (#6943)
    • aca5baa build(deps): update step-security/harden-runner action to v2.22.1 (#6942)
    • 002812e build(deps): update ossf/scorecard-action action to v2.5.0 (#6944)
    • 2532aa3 build(deps): update plugin com.github.ben-manes.versions to v0.66.0 (#6941)
    • 07ef536 build(deps): update javafx monorepo to v28-ea+12 (#6940)
    • d4109ca build(deps): update github/codeql-action action to v4.38.3 (#6938)
    • 5856885 build(deps): update gradle to v9.8.1 (#6939)
    • d6a8832 build(deps): update actions/upload-artifact action to v7.0.2 (#6936)
    • 49e5906 build(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.4 (#6937)
    • 2936c49 build(deps): update github/codeql-action digest to 24c5418 (#6935)
    • fd7969f build(deps): update actions/upload-artifact digest to cf430e0 (#6934)
    • 9a5454e build(deps): update determinatesystems/flake-checker-action action to v14 (#6897)
    • 8977c4b build(deps): update determinatesystems/magic-nix-cache-action action to v15 (#6898)
    • 1d92d56 build(deps): lock file maintenance (#6933)
    • 1cd523e build(deps): update javafx monorepo to v28-ea+11 (#6932)
    • 9abc4c0 build(deps): lock file maintenance (#6925)
    • b9082fd build(deps): update dependency ch.qos.logback:logback-classic to v1.6.5 (#6930)
    • b75af3b build(deps): update dependency org.apache.commons:commons-lang3 to v3.21.0 (#6929)
    • 6bbcb50 build(deps): update dependency com.google.guava:guava to v33.7.2-jre (#6928)
    • 5d335c9 build(deps): update jetbrains/qodana-action action to v2026.2.2 (#6927)
    • 74a1bed build(deps): update mockito monorepo to v5.24.0 (#6924)
    • 4d316ef build(deps): update javafx monorepo to v28-ea+10 (#6922)
    • 71afb9d build(deps): update gradle to v9.8.0 (#6923)
    • 2b836b9 build(deps): update github/codeql-action action to v4.38.2 (#6921)
    • 0c31518 build(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.3 (#6920)
    • 2909837 build(deps): update dependency ch.qos.logback:logback-classic to v1.6.4 (#6919)
    • b282dac build(deps): update github/codeql-action digest to 2892aa5 (#6918)
    • 7c9d8e1 build(deps): update dependency org.slf4j:slf4j-api to v2.0.20 (#6916)
    • 596f20a build(deps): update dependency com.fasterxml.jackson.core:jackson-databind to v2.22.3 (#6914)
    • 74ae45a build(deps): update javafx monorepo to v28-ea+9 (#6913)
    • 0e0251a build(deps): lock file maintenance (#6912)
    • 9b74d80 build(deps): update github/codeql-action action to v4.38.1 (#6910)
    • 449fd36 build(deps): update github/codeql-action digest to 1c5b675 (#6909)
    • 0185789 build(deps): update plugin com.github.ben-manes.versions to v0.64.0 (#6907)
    • 0deb2fb build(deps): update dependency org.apache.maven.plugins:maven-install-plugin to v3.2.0 (#6905)
    • a0bce87 build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3.2.0 (#6903)
    • a6bd0fc build(deps): update plugin com.github.ben-manes.versions to v0.63.1 (#6904)
    • bfe4ff3 build(deps): update dependency java-jdk to v17.0.20+101 (#6902)
    • 29363ab build(deps): update plugin com.github.ben-manes.versions to v0.63.0 (#6901)
    • 3181dc9 build(deps): update plugin com.g
  4. v11.5.1-beta-14Release v11.5.1-beta-14pre-release2026-10-18 · 2026-10-18 04:18 UTC
    查看更新说明

    Changelog

    🐛 Fixes

    • 291df8c fix(prettyprinter): prevent crash when sniper-printing records (#6926)

    🛠 Build

    • eedfd65 build(deps): update github/codeql-action action to v4.39.0 (#6948)
    • cfcb197 build(deps): update github/codeql-action digest to 6f2ac81 (#6947)
    • b76730d build(deps): update actions/setup-java digest to b843ebf (#6946)
    • e24f542 build(deps): update actions/setup-java action to v6.1.0 (#6945)
    • b1037bd build(deps): lock file maintenance (#6943)
    • aca5baa build(deps): update step-security/harden-runner action to v2.22.1 (#6942)
    • 002812e build(deps): update ossf/scorecard-action action to v2.5.0 (#6944)
    • 2532aa3 build(deps): update plugin com.github.ben-manes.versions to v0.66.0 (#6941)
    • 07ef536 build(deps): update javafx monorepo to v28-ea+12 (#6940)
    • d4109ca build(deps): update github/codeql-action action to v4.38.3 (#6938)
    • 5856885 build(deps): update gradle to v9.8.1 (#6939)
    • d6a8832 build(deps): update actions/upload-artifact action to v7.0.2 (#6936)
    • 49e5906 build(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.4 (#6937)
    • 2936c49 build(deps): update github/codeql-action digest to 24c5418 (#6935)
    • fd7969f build(deps): update actions/upload-artifact digest to cf430e0 (#6934)
    • 9a5454e build(deps): update determinatesystems/flake-checker-action action to v14 (#6897)
    • 8977c4b build(deps): update determinatesystems/magic-nix-cache-action action to v15 (#6898)
    • 1d92d56 build(deps): lock file maintenance (#6933)
    • 1cd523e build(deps): update javafx monorepo to v28-ea+11 (#6932)
    • 9abc4c0 build(deps): lock file maintenance (#6925)
    • b9082fd build(deps): update dependency ch.qos.logback:logback-classic to v1.6.5 (#6930)
    • b75af3b build(deps): update dependency org.apache.commons:commons-lang3 to v3.21.0 (#6929)
    • 6bbcb50 build(deps): update dependency com.google.guava:guava to v33.7.2-jre (#6928)
    • 5d335c9 build(deps): update jetbrains/qodana-action action to v2026.2.2 (#6927)
    • 74a1bed build(deps): update mockito monorepo to v5.24.0 (#6924)
    • 4d316ef build(deps): update javafx monorepo to v28-ea+10 (#6922)
    • 71afb9d build(deps): update gradle to v9.8.0 (#6923)
    • 2b836b9 build(deps): update github/codeql-action action to v4.38.2 (#6921)
    • 0c31518 build(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.3 (#6920)
    • 2909837 build(deps): update dependency ch.qos.logback:logback-classic to v1.6.4 (#6919)
    • b282dac build(deps): update github/codeql-action digest to 2892aa5 (#6918)
    • 7c9d8e1 build(deps): update dependency org.slf4j:slf4j-api to v2.0.20 (#6916)
    • 596f20a build(deps): update dependency com.fasterxml.jackson.core:jackson-databind to v2.22.3 (#6914)
    • 74ae45a build(deps): update javafx monorepo to v28-ea+9 (#6913)
    • 0e0251a build(deps): lock file maintenance (#6912)
    • 9b74d80 build(deps): update github/codeql-action action to v4.38.1 (#6910)
    • 449fd36 build(deps): update github/codeql-action digest to 1c5b675 (#6909)
    • 0185789 build(deps): update plugin com.github.ben-manes.versions to v0.64.0 (#6907)
    • 0deb2fb build(deps): update dependency org.apache.maven.plugins:maven-install-plugin to v3.2.0 (#6905)
    • a0bce87 build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3.2.0 (#6903)
    • a6bd0fc build(deps): update plugin com.github.ben-manes.versions to v0.63.1 (#6904)
    • bfe4ff3 build(deps): update dependency java-jdk to v17.0.20+101 (#6902)
    • 29363ab build(deps): update plugin com.github.ben-manes.versions to v0.63.0 (#6901)
    • 3181dc9 build(deps): update plugin com.github.ben-manes.versions to v0.62.0 (#6896)
    • 4e40a52 build(deps): lock file maintenance (#6900)
    • ec00856 build(deps): update github/codeql-action action to v4.38.0 (#6895)
    • f6287ac build(deps): update dependency org.eclipse.jdt:org.eclipse.jdt.core to v3.47.0 (#6894)
    • 6990b2e build(deps): update actions/setup-java action to v6.0.1 (#6893)
    • 0ccc149 build(deps): update github/codeql-action digest to b96794f (#6892)
    • 5783b48 build(deps): updat
  5. v11.5.1-beta-13Release v11.5.1-beta-13pre-release2026-10-11 · 2026-10-11 05:43 UTC
    查看更新说明

    Changelog

    🐛 Fixes

    • 291df8c fix(prettyprinter): prevent crash when sniper-printing records (#6926)

    🛠 Build

    • 9a5454e build(deps): update determinatesystems/flake-checker-action action to v14 (#6897)
    • 8977c4b build(deps): update determinatesystems/magic-nix-cache-action action to v15 (#6898)
    • 1d92d56 build(deps): lock file maintenance (#6933)
    • 1cd523e build(deps): update javafx monorepo to v28-ea+11 (#6932)
    • 9abc4c0 build(deps): lock file maintenance (#6925)
    • b9082fd build(deps): update dependency ch.qos.logback:logback-classic to v1.6.5 (#6930)
    • b75af3b build(deps): update dependency org.apache.commons:commons-lang3 to v3.21.0 (#6929)
    • 6bbcb50 build(deps): update dependency com.google.guava:guava to v33.7.2-jre (#6928)
    • 5d335c9 build(deps): update jetbrains/qodana-action action to v2026.2.2 (#6927)
    • 74a1bed build(deps): update mockito monorepo to v5.24.0 (#6924)
    • 4d316ef build(deps): update javafx monorepo to v28-ea+10 (#6922)
    • 71afb9d build(deps): update gradle to v9.8.0 (#6923)
    • 2b836b9 build(deps): update github/codeql-action action to v4.38.2 (#6921)
    • 0c31518 build(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.3 (#6920)
    • 2909837 build(deps): update dependency ch.qos.logback:logback-classic to v1.6.4 (#6919)
    • b282dac build(deps): update github/codeql-action digest to 2892aa5 (#6918)
    • 7c9d8e1 build(deps): update dependency org.slf4j:slf4j-api to v2.0.20 (#6916)
    • 596f20a build(deps): update dependency com.fasterxml.jackson.core:jackson-databind to v2.22.3 (#6914)
    • 74ae45a build(deps): update javafx monorepo to v28-ea+9 (#6913)
    • 0e0251a build(deps): lock file maintenance (#6912)
    • 9b74d80 build(deps): update github/codeql-action action to v4.38.1 (#6910)
    • 449fd36 build(deps): update github/codeql-action digest to 1c5b675 (#6909)
    • 0185789 build(deps): update plugin com.github.ben-manes.versions to v0.64.0 (#6907)
    • 0deb2fb build(deps): update dependency org.apache.maven.plugins:maven-install-plugin to v3.2.0 (#6905)
    • a0bce87 build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3.2.0 (#6903)
    • a6bd0fc build(deps): update plugin com.github.ben-manes.versions to v0.63.1 (#6904)
    • bfe4ff3 build(deps): update dependency java-jdk to v17.0.20+101 (#6902)
    • 29363ab build(deps): update plugin com.github.ben-manes.versions to v0.63.0 (#6901)
    • 3181dc9 build(deps): update plugin com.github.ben-manes.versions to v0.62.0 (#6896)
    • 4e40a52 build(deps): lock file maintenance (#6900)
    • ec00856 build(deps): update github/codeql-action action to v4.38.0 (#6895)
    • f6287ac build(deps): update dependency org.eclipse.jdt:org.eclipse.jdt.core to v3.47.0 (#6894)
    • 6990b2e build(deps): update actions/setup-java action to v6.0.1 (#6893)
    • 0ccc149 build(deps): update github/codeql-action digest to b96794f (#6892)
    • 5783b48 build(deps): update actions/setup-java digest to de7274f (#6891)

    • 460dd7d release: Releasing version 11.5.1-beta-13

    Contributors

    We'd like to thank the following people for their contributions:

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    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
    • Дмитрий