INRIA Spoon Versions Save

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.

spoon-core-8.3.0

3 years ago

spoon-core-8.2.0

3 years ago

spoon-core-8.1.0

4 years ago

spoon-core-8.0.0

4 years ago

New features

  • Add new variable refactoring class. (PR: #3162)
  • Add role EMODIFIER for extended modifier. (PR: #3098)
  • CtImportVisitor#visitUnresolvedImport. (PR: #3086)
  • DecompiledResource: Add a SpoonResource that can be used in any launcher. (PR: #3124)
  • SpoonifierVisitor: A visitor that generates the spoon code to recreate a spoon model. (PR: #3105)
  • decompiler: Add support for procyon. (PR: #3123)
  • visualisation
    • Panel added to show Spoon objects' properties. (PR: #3107)
    • Spoon visualiser improvement for accessing JavaDoc. (PR: #3101)
  • spoon-visualisation: Spoon AST visualisation tool. (PR: #3072)

Bug Fixes

  • CreateVariableAssignment now creates a CtVariableWrite. (PR: #3157)
  • Fixes the toString() call on an array. (PR: #3134)
  • CtCompilationUnitImpl: Fix regression after auto-import refactoring. (PR: #3131)
  • Fix regression when rewriting static field access. (PR: #3115)
  • The type of string concatenation is not null. (PR: #3075)
  • (ParentExiter.java): set position for implicit loop body block. (PR: #3084)
  • Fix regression in field accesses of static fields. (PR: #3139)
  • Improve backward compatibility of toString and add toDebugString. (PR: #3099)
  • Don't check modifiers in CtVariable#getDeclaringType. (PR: #3066)
  • Fix regression in pretty printer (default DJPP is fully qualified). (PR: #3132)
  • Fix incorrect model for empty for loop. (PR: #3108)
  • Fix more regressions after auto-import refactoring. (PR: #3127)
  • ToStringWithImports works even with no position. (PR: #3110)
  • Fix regression in auto-import. (PR: #3125)
  • Indeed call the preprocessors in toString/autoimports. (PR: #3103)
  • CtElementImpl#toString: Fix toString for SniperPrinter. (PR: #3147)
  • DefaultJavaPrettyPrinter: Support for inline else if. (PR: #3088)
  • ImportCleaner: Import must be kept when they are used in Javadoc. (PR: #3160)
  • Iterators: Next() first checks hasNext and throws the correct error. (PR: #3164)
  • PositionBuilder: Fix lambda parameters position. (PR: #3137)
  • SourceFragmentContext: Visit field reference in import as well. (PR: #3161)
  • SourceOptions: Close the output stream in SourceOptions. (PR: #3089)
  • TypeNameScope: Order of processing LexicalScope elements of Type. (PR: #3085)
  • core: Parsing a one-line class produces correct line numbers. (PR: #3069)
  • import: Fix regression after import refactoring. (PR: #3149)
  • pom: Update/add license header in poms. (PR: #3143)

Documentation

  • Add API documentation to public methods. (PR: #3152)
  • Add archunit to related work in architecture enforcement. (PR: #3146)
  • Improve documentation while preparing the MadridJUG meetup. (PR: #3141)
  • Improve landing page. (PR: #3128)
  • Minor improvement to example page. (PR: #3100)
  • Add example for snippet filtering. (PR: #3062)
  • ROADMAP.md: Roadmap 100% points to issues. (PR: #3119)
  • launcher.md: Improve decompilation doc. (PR: #3130)
  • visualisation: Mention the visualisation tool on the website. (PR: #3102)

Refactoring

  • Use .equals() when comparing Strings and Boxed types. (PR: #3165)
  • Rename internal method with particularly confusing name. (PR: #3109)
  • Handling of imports in pretty printer. (PR: #2683)
  • Decompiler: Update interface (in preparation for DecompiledResource). (PR: #3122)
  • NoSourcePosition: Applies the null design pattern to compilation units. (PR: #3151)

Authors

Name Nb Commit
Martin Monperrus 30
Nicolas Harrand 14
arno 5
Haris Adzemovic 3
Pavel Vojtechovsky 3
Egor Bredikhin 2
Rhys Compton 1
Muhammet Ali AKBAY 1
Simon Urli 1
Thomas Durieux 1
HectorSM 1
Lionel Seinturier 1

spoon-decompiler-0.1.0

4 years ago

Initial release of spoon-decompiler

This release contains the following functionalities:

  • JarLauncher
  • DecompiledResource
  • SpoonCLassFileTransformer
  • Wwrapper for two decompilers (CFR and Procyon)

spoon-core-7.5.0

4 years ago

spoon-core-7.4.0

5 years ago

New features

  • Add CtType#toStringWithImports. (PR: #2945)
  • Check if a CtType is an array type. (PR: #2882)
  • CtBFSIterator: Add an iterator that explores a CtElement's children in breadth first order. (PR: #2904)
  • CtElement: Add a method to get all direct children of an element. (PR: #2906)
  • CtCommentImpl: Add _setRawContent to be able to bypass cleanComment. (PR: #2889)

Bug Fixes

  • Handle special cases in CtAnnotationType. (PR: #2947)
  • Test and fix untested method createNewClass(). (PR: #2943)
  • Give appropriate permissions of files in doc folder. (PR: #2949)
  • Improve getCorrespondingRuntimeObject/convertElementToRuntimeObject to handle shadow fields. (PR: #2899)
  • JarLauncher: Fix #2951, Really delete temporary decompiled source directory. (PR: #2952)
  • ContextBuilder: Catch PositionBuilder exception and log it instead of crashing. (PR: #2907)
  • CtCompilationUnitImpl: ToString() no longer throws a NPE. (PR: #2918)
  • position: Type of CtNewClass is implicit without position. (PR: #2834)
  • TypeFactory: Raise an exception for deprecated createTypeParameterReference wildcard. (PR: #2890)

Documentation

  • Add example for CtAssert#setExpressiont #2917. (PR: #2917)
  • Fix links in doc page "Examples of Spoon Usages". (PR: #2932)
  • CONTRIBUTING.md mentions our architectural rules. (PR: #2929)
  • Add & update links in the example page. (PR: #2925)
  • Fix jenkins badge. (PR: #2924)
  • Fix typos in slides. (PR: #2948)
  • Add example for CtAssert#setExpression. (PR: #2917)
  • Fix broken documentation. (PR: #2968)
  • Fix remaining Javadoc issues. (PR: #2910)
  • Fix doc in JavadocDescription.java. (PR: #2909)
  • Improve documentation on AST traversal. (PR: #2905)
  • Add slide decks. (PR: #2937)
  • Release.md: Improve documentation about releasing after release of 7.3.0. (PR: #2881)
  • spoon-control-flow: Fix javadoc errors. (PR: #2916)
  • command_line.md: Remove link to decommissioned Gforge. (PR: #2900)

Refactoring

  • JDTCommentBuilder: Improve error message with position of offending comment. (PR: #2908)

Tests

  • SourcePositionTest: Don't save temporary files in ./src. (PR: #2969)
  • Rename ArchitectureTest into DecompilerArchitectureTest in spoon-decompiler to avoid confusion. (PR: #2930)
  • CtTypeReference: Add test for methods CtTypeReference#unbox() and box(), fix #1842. (PR: #2919)
  • FieldAccessTest: Nested field access, and example for #2884.

Other

  • Exclude GUI from coverage. (PR: #2940)
  • Switch to junit5. (PR: #2939)
  • Add Sonar Quality Gate badge. (PR: #2935)
  • Fix javadoc and reporting config and check it in CI. (PR: #2911)
  • Clean parent pom.xml. (PR: #2883)
  • Bump to 7.4.0-snapshot. (PR: #2874)

Unknown

  • Adopt dual licensing MIT-CECILL-C (#2950). (PR: #2950)
  • Up. (PR: #2941)
  • Update the list of contributors. (PR: #2912)
  • Eclipse` in README. (PR: #2903)

Authors

Name Nb Commit
Martin Monperrus 28
Nicolas Harrand 9
Alexander Shopov 2
Charm 1
Pavel Vojtechovsky 1
GluckZhang 1
Fabien DUMINY 1
Simon Urli 1
Mickael Istria 1

spoon-core-7.3.0

5 years ago

New features

  • Introduce the concept of lexical scope (interface LexicalScope). (PR: #2813)
  • Allow spoon to support duplicate definitions. (PR: #2772)
  • Add module for control-flow analysis. (PR: #2827)

Bug Fixes

  • Fix NPE for multicatch qualified exceptions. (PR: #2862)
  • Reference of CtImport is fully qualified and has no generics. (PR: #2819)
  • IndexOutOfBoundsException in JDTCommentBuilder. (PR: #2840)
  • Fix static type wildcard imports. (PR: #2865)
  • Refactor code->runtime methods so that CtAnnotation#getValueOfObject does not overflow. (PR: #2866)
  • Fix classpath error with surefire. (PR: #2867)
  • Security issue with jackson-databind. (PR: #2856)
  • CompilationUnit has lineSeparatorPositions even for empty class. (PR: #2824)
  • Fix position of type modifier after comment. (PR: #2825)
  • NPE in JDTCommentBuilder. (PR: #2822)
  • PositionBuilder: Prevents exception for incomplete modifiers' position information. (PR: #2848)
  • position
    • Source position of CtFieldReference. (PR: #2830)
    • Position of reference of import and package declaration. (PR: #2832)
    • Fix source position of new ArrayList<>(). (PR: #2833)
  • doc: Fixes#2790 javadoc site deployment, adapting to new modules organization. (PR: #2826)

Documentation

  • Fix broken link. (PR: #2871)
  • Fix unrendered link in doc. (PR: #2851)
  • Fix broken snippet. (PR: #2841)

Refactoring

  • Rename getCurrentNameScope to getCurrentLexicalScope. (PR: #2857)
  • Access to JDK CompilationUnit contents and lineSeparatorPositions. (PR: #2831)
  • Refactor refactoring code :-) in Refactoring#copyType(). (PR: #2820)
  • performance: Optimize incremental launcher. (PR: #2821)

Tests

  • MavenLauncher: Test that system dependencies are resolved in classpath fix #1682. (PR: #2836)

Other

  • pom.xml: Updating commons-io and commons-lang3. (PR: #2853)
  • Moves JUnit dependency to parent pom. (PR: #2828)
  • Clean old Travis scripts. (PR: #2829)

Community

  • Nicolas Harrand becomes integrator. (PR: #2818)

Authors

Name Nb Commit
Pavel Vojtechovsky 10
Martin Monperrus 9
Egor Bredikhin 3
Nicolas Harrand 3
Thomas Durieux 1
Kai Luo 1
Benjamin DANGLOT 1
Lionel Seinturier 1
Simon Urli 1
Clément Fournier 1

spoon-core-7.2.0

5 years ago

New features

  • Add CtImportVisitor. (PR: #2730)
  • Add CtTypeReference#canAccess(CtTypeMember). (PR: #2815)
  • AllTypeMembersFunction has new mode SKIP_PRIVATE. (PR: #2803)
  • Add support for javadoc inline tags. (PR: #2802)
  • Add encoding detection callback. (PR: #2788)
  • EarlyTerminatingScanner can scan content of compilation units. (PR: #2793)
  • Add assertCtElementEquals. (PR: #2767)
  • Add CtAbstractImportVisitor. (PR: #2764)
  • Add CtTypeReference#implicitParent. (PR: #2805)
  • Add CtComment#getRawContent(). (PR: #2746)
  • New CtTypeMemberWildcardImportReference for import package.Type.*. (PR: #2731)
  • CtScannerListener knows role of scanned element. (PR: #2739)
  • Add CtCompilationUnit for future import and sniper improvements. (PR: #2702)
  • Use Apache Common Compressor API to [de]compress serialized models. (PR: #2165)
  • Add metamodel concept CtPackageDeclaration. (PR: #2707)
  • Add support for Fernflower for decompilation. (PR: #2668)
  • Add support for transformation at load-time in the JVM. (PR: #2645)

Bug Fixes

  • CtQueryImpl#detectTargetClassFromCCE, FilterTest#testInvalidQueryStep: Adapt parsing of ClassCastException message which has changed in oracle jdk 11. (PR: #2787)
  • FieldAccessTest: Adapt FieldAccessTest to oracle jdk 11/jdt changes. (PR: #2789)
  • MainTest: Quickfix for Travis 10min timeout. (PR: #2667)
  • doc: Explain the different kinds of pull-requests. (PR: #2647)
  • documentation: Pattern.md. (PR: #2735)
  • javadoc: Replace deprecated by better javadoc. (PR: #2663)
  • printer: Add space before else of if statement. (PR: #2679)
  • test
    • MainTest#testGenericContract on MS Windows. (PR: #2814)
    • ImportTest. (PR: #2816)
  • Modifiers of enum members. (PR: #2630)
  • One can call getModifiers on ".class" of "Aclass.class". (PR: #2776)
  • Fix incomplete behavior: Javadoc#setContent should parse tags. (PR: #2765)
  • Parsing of java version not starting with "1." in pom.xml. (PR: #2729)
  • CtPackageDeclaration has a valid source position. (PR: #2760)
  • JDT spoon compiler builds imports and then comments. (PR: #2807)
  • Broken link in papers.md. (PR: #2749)
  • CtImport position includes its comment. (PR: #2810)
  • PatternMatcher ignores isImplicit. (PR: #2726)
  • CtExecutableReference cannot use CtTypeParameterReference. (PR: #2725)
  • Upgrade insecure commons-compress to latest version. (PR: #2717)
  • Fix comment of CtAnnotation value. (PR: #2587)
  • MetamodelProperty#containerKindOf knows Collection. (PR: #2705)
  • Invalid error log message in ContextBuilder#getVariableDeclaration. (PR: #2677)
  • CtPackageDeclaration position doesn't include top file comment. (PR: #2811)
  • Sniper printer leaves when no more child tokens. (PR: #2808)
  • ChangeCollector detects changes in CtCompilationUnit too. (PR: #2794)
  • Use Environment encoding when writing files on disk. (PR: #2796)
  • Fix invalid if model with empty statements in then/else branch. (PR: #2733)

Documentation

  • Improve documentation about release process. (PR: #2650)
  • Remove all hard coded version numbers to simplify release. (PR: #2786)
  • Spoon-decompiler is not spoon-bytecode. (PR: #2784)
  • Getting started for external dependency. (PR: #2752)
  • Fix broken link in doc. (PR: #2743)
  • Fix javadoc in TypeFactory.java. (PR: #2688)
  • Remove link to decommissioned Gforge. (PR: #2792)
  • Updated spelling and formatting of path.md page. (PR: #2696)
  • Add missing javadoc for PatternPrinter. (PR: #2689)
  • Fix @link in javadoc. (PR: #2685)
  • Fix contract sentence. (PR: #2691)
  • Add example in path.md. (PR: #2661)
  • website: Document IncrementalLauncher. (PR: #2651)

Refactoring

  • Fix sonarqube - use Java array syntax (not C-like). (PR: #2686)
  • Better handling of SourceFragment in CompilationUnit. (PR: #2806)
  • Sort modifiers in ModelStreamerTest.java. (PR: #2755)
  • Excluding decompiler related features from spoon-core. (PR: #2766)
  • GetDocComment uses the same implementation as pretty-printer. (PR: #2775)
  • Improve error message with Spoon testing fluent API. (PR: #2769)
  • In clone code, builder.copy is called first. (PR: #2768)
  • JavaOutputProcessor uses Environment#createPrinter(). (PR: #2759)
  • Better error handling in CtFieldReference#getActualField. (PR: #2754)
  • Replace List<? extends Object> by List<?> in PatternTest. (PR: #2753)
  • Remove redundant cast. (PR: #2700)
  • Remove useless assignment in JDTTreeBuilderHelper.java. (PR: #2690)
  • Simplify negation (fix SonarQube). (PR: #2695)
  • CtTypeAccess#implicit is derived now. (PR: #2804)
  • Change assertion from assertSame to assertEquals. (PR: #2687)
  • Remove redundant parentheses in PatternBuilder. (PR: #2653)
  • Use static import for asserts in tests. (PR: #2655)
  • Remove redundant 'super' call from SpoonClassFileTransformerTest.java. (PR: #2678)
  • SourcePosition#equals should take into account all information. (PR: #2660)
  • Replace extends Object> by >. (PR: #2675)
  • Flip order of comparison - put literal first to lower risk of NPE. (PR: #2674)
  • Add missing braces to tests. (PR: #2673)
  • Remove deprecated annotation (for sonarqube). (PR: #2665)
  • Add final modifier. (PR: #2664)
  • Stream handling in SerializationModelStreamer#load(InputStream). (PR: #2635)
  • Replace length()==0 by isEmpty(). (PR: #2658)

Performance

  • .travis.yml: Merge travis builds to fall under 5 builds. (PR: #2782)
  • MainTest: Parallelize execution of testElementToPathToElementEquivalency. (PR: #2694)
  • Cache result of CtTypeReference#findClass(). (PR: #2591)

Tests

  • Remove long logs fof CtGenerationTest which makes CI log unreadable. (PR: #2750)
  • Minimize logs in FilterTest. (PR: #2756)
  • Generic contracts are run only on .testclasses.. (PR: #2716)
  • Use contains instead of indexOf. (PR: #2715)
  • Relax intercession test to prepare #2615. (PR: #2706)
  • Remove redundant cast. (PR: #2704)
  • Relax intercession test to prepare #2615.
  • Constructor with this(xxx) replaced by super(xxx)?. (PR: #2680)
  • In tests also, windows's classpath elements are separated by semi column. (PR: #2692)
  • IncrementalLauncherTest: Attempt to remove flackiness on windows CI. (PR: #2745)

Other

  • Do not execute checkstyle for all jobs. (PR: #2799)
  • Maven-javadoc-plugin now supports the doclint parameter. (PR: #2800)
  • Check style doesn't check left curly on lambda. (PR: #2795)
  • Update build.sh to use the correct snapshot repo in Jenkins. (PR: #2777)
  • Change jenkins/build.sh to allow passing maven parameters. (PR: #2723)
  • Fix security issue in dependency. (PR: #2697)
  • Prepares checkstyle checking for src/test/java. (PR: #2611)
  • Remove deprecated methods after release. (PR: #2649)
  • Bump info after release of 7.1.0. (PR: #2648)

Unknown

  • 7.2.0 released on Central.
  • Explicit rule on how integrators are chosen. (PR: #2791)
  • AccessFullyQualifiedFieldTest.java. (PR: #2656)

Authors

Name Nb Commit
Pavel Vojtechovsky 38
Martin Monperrus 27
Tomasz Zieliński 23
Nicolas Harrand 12
Egor Bredikhin 3
Simon Urli 3
Mehdi Kaytoue 1
lodart 1
raymogg 1

spoon-core-7.1.0

5 years ago