Skip to content

Releases: INRIA/spoon

spoon-core-6.2.0

08 Mar 10:27
Compare
Choose a tag to compare

Thanks for the new contributors on this release 👍

New features

  • Add support to change the destination file on disk for modules, packages and types. (PR: #1610)
  • Add CtScanner#scan(Map) for a better EarlyTerminatingScanner. (PR: #1805)
  • Add support for paths for all elements from model root (CtElement#getPath). (PR: #1874)
  • One could add a type member that already exists (equals but not same) and modify it afterwards. (PR: #1864)
  • Add method CtMethod#getTopDefinitions. (PR: #1844)
  • Add Refactoring#copyType and #copyMethod for advanced cloning. (PR: #1884)
  • All RoleHandlers supports set/add/remove. (PR: #1793)
  • Add methods getRoleHandlers(Class), forEachRoleHandler, getRoleHandlerWrtParent in RoleHandlerHelper. (PR: #1794)
  • SpoonModelTree GUI can be created with a custom root element. (PR: #1799)
  • Add support for clone process customization with CloneHelper#addClone. (PR: #1802)
  • Spoon Filter implements java.util.function.Predicate. (PR: #1798)

Bug Fixes

  • GetDocComment returns the complete Javadoc comment, incl. tags. (PR: #1822)
  • Add RoleHandler setter for SUPER_TYPE and INTERFACE. (PR: #1890)
  • CtCatchVariable#multiType role TYPE changed to MULTI_TYPE. (PR: #1877)
  • Fully comply with the contract of CtScannerTest#testScannerCallsAllProperties. (PR: #1870)
  • Change how DJPP prints "return" so that it's checkstyle-compliant. (PR: #1871)
  • Unsettable properties are now really unsettable, and there is a test for this. (PR: #1893)
  • Fix equality for assignments. (PR: #1845)
  • GetDocComment() returns asterisk (*) and spaces before comment. (PR: #1841)
  • Small bugs in MethodTypingContext and CtTypeReference. (PR: #1838)
  • ClassTypingContext resolveTypeParameter can gracefully handle outer parameters. (PR: #1837)
  • Fix StringIndexOutOfBoundsException in CtJavadoc#getShortDescription. (PR: #1827)
  • TypeFactory#get(qualifiedName) for class names containing $. (PR: #1891)
  • Stackoverflow on AbstractTypingContext. (PR: #1817)
  • NPE when using MavenLauncher on module containing dependency with variable. (PR: #1810)
  • Undo #1798 for backward compatibility. (PR: #1811)
  • Filter extends Predicate is now working with projects in JDK7. (PR: #1808)
  • Shadow classes should be interpreted according to their kind (enum, interface, etc). (PR: #1806)
  • Easier specification of template parameters (without annotations). (PR: #1801)
  • DefaultJavaPrettyPrinter prints an ERROR comment instead of raising an exception when a field is missing in the model. (PR: #1797)
  • Various fixes in VisitorPartialEvaluator. (PR: #1800)
  • DefaultJavaPrettyPrinter exposes the tokenWriter for subclasses. (PR: #1796)
  • ParentFunction doesn't fail on null parent. (PR: #1795)
  • Add generic typing to TypeFactory constants. (PR: #1792)
  • serialization: SourcePosition#getFile() after deserialization. (PR: #1847)
  • Fix order of type members. (PR: #1787)

Documentation

  • Add missing javadoc. (PR: #1843)
  • Add missing Javadoc in ModelsUtils. (PR: #1860)
  • Missing documentation in public methods used for pretty-printing. (PR: #1854)
  • Another set of Javadoc comments for public methods. (PR: #1856)
  • Add API documentation to interface JavaReflectionVisitor. (PR: #1850)
  • Add doc for public method in RtMethod. (PR: #1858)
  • Fix Javadoc (incorrect starting tag). (PR: #1839)
  • Fix missing javadoc. (PR: #1840)
  • Improve Javadoc of #getAllMethods. (PR: #1836)
  • Improves the documentation of getOverridingExecutable. (PR: #1828)
  • Bump Spoon number in doc. (PR: #1790)

Refactoring

  • Improve Meta-Metamodel classes in src/test. (PR: #1894)
  • Refactor cloning code to increase extendability. (PR: #1878)
  • Remove CtParameterReferenceImpl#declaringExecutable. (PR: #1875)
  • Push down the equality checking code in EqualsVisitor. (PR: #1853)
  • Hide some methods that are clearly meant to be package visible. (PR: #1855)
  • Internal utility type in JDTTreeBuilder should be package-visible. (PR: #1848)
  • Package-visible class CommentHelper should have package-visible methods. (PR: #1849)
  • Remove wrong comments and unused imports. (PR: #1803)
  • prettyprinter: Restore DJPP#writeHeaders that clients can override. (PR: #1866)

Tests

  • architecture: All public API methods should be documented with Javadoc. (PR: #1867)
  • Fix CI failure due to interaction between #1864 and #1787. (PR: #1868)
  • Move metamodel related method to class SpoonMetaModel for better discoverability. (PR: #1851)
  • Add method ModelUtils#getOptimizedString for handling EOL, TAB, etc in assertions. (PR: #1804)

Chores

  • Enable unchecked compiler warnings. (PR: #1886)
  • Enables incremental compilation. (PR: #1885)
  • Fix javadoc linter config in pom.xml. (PR: #1881)
  • Add Eclipse's .checkstyle to .gitignore. (PR: #1882)
  • Add a script to update pom.xml for running pit-descartes. (PR: #1820)
  • Add CI script to check whether Spoon compiles with Maven 3.3.9. (PR: #1815)
  • revapi: Fix revapi commenting bot. (PR: #1863)
  • Prepare for next development iteration.

Authors

Name Nb Commit
Martin Monperrus 30
Pavel Vojtechovsky 21
Simon Urli 9
Egor18 4
Nicolas Harrand 2
Thomas Durieux 1
Shantanu 1

spoon-core-6.1.0

20 Dec 16:20
Compare
Choose a tag to compare

Christmas release! 🎄 🎅 ✨

The main new feature of this release is the integration of Java 9 module in Spoon model, but it also contains some other new features and bug fixes.
Thanks for the contributors, merry christmas and happy new year for all of you :)

New features

  • Add Factory#createQuery(Iterable). (PR: #1777)
  • Add a method to get the unit type of the compilation unit. (PR: #1776)
  • Add support for Java9 constructs in the Spoon metamodel (CtModule and related concepts). (PR: #1730)
  • Support partial evaluation of new Object[]{...}.length -> Literal. (PR: #1750)
  • Add an explicit construct for imports in the metamodel (CtImport). (PR: #1707)
  • Add method hasAnnotation. (PR: #1737)
  • Add inheritance between roles (CtRole#getSuperRole(), CtRole#getSubRole()). (PR: #1725)
  • CtModel implements CtQueryable. (PR: #1739)
  • Processor properties can be passed as string. (PR: #1734)

Bug Fixes

  • CompilationUnits are created on demand. (PR: #1782)
  • Start prefix space in ElementPrinterHelper. (PR: #1768)
  • Fix a NPE in CtTypeImpl#isSameParameter in noclasspath. (PR: #1767)
  • CtQueryImpl handles well preallocated exceptions done by JVM optimization. (PR: #1759)
  • Fix bug in partial evaluator. (PR: #1751)
  • Fix dirty exception in checking code at the end of model building. (PR: #1749)
  • annotation: Bug when using an annotation targeting declaration and types. (PR: #1774)
  • test: Improve CtGenerationTest and CtScannerTest. (PR: #1736)

Documentation

  • Add explanation in Javadoc of CtTypeReference#getActualClass. (PR: #1761)
  • Bump version number after release 6.0.0. (PR: #1732)

Refactoring

  • OutputType is available in Environment. (PR: #1784)
  • CompilationUnit returns an unmodifiable collection. (PR: #1781)
  • Manage sourceOutputDirectory in Environment. (PR: #1770)
  • SetSourceClasspath throws an exception in case a .class is given. (PR: #1766)
  • Add a new way to build a query in QueryFactory. (PR: #1740)

Tests

  • Check inheritance behaviour when using noclasspath with a sourceclasspath. (PR: #1760)
  • Refactor test to be independent from JDK version. (PR: #1764)
  • Metamodel's MMField valueTypes are not implicit. (PR: #1756)
  • Add test for substitution of return expression.S() with expressions. (PR: #1755)
  • Prepare upcoming behavioral change in template matcher. (PR: #1748)
  • Add test for getAnnotation().value() on shadow classes. (PR: #1738)

Other

  • Skip checkstyle in Travis install phase. (PR: #1746)

Unknown

  • Prepare for next development iteration.

Authors

Name Nb Commit
Simon Urli 20
Pavel Vojtechovsky 9
Martin Monperrus 3

spoon-core-6.0.0

17 Nov 15:07
Compare
Choose a tag to compare

New major Spoon 6.0.0 release 🎉

⚠️ This release breaks some existing API. Here follows the changelog with indication of what is breaking.
Thanks to all contributors on this amazing release 👍

New features

  • Roles
    • Add method CtElement#getRoleInParent(). (PR: #1669)
    • CtScanner supports scanning based on roles. (PR: #1632)
    • Add CtRole to CtReference. (PR: #1586)
    • One can get and set children of elements based on roles. (PR: #1582)
    • Spoon GUI shows roles of nodes. (PR: #1715)
  • Introduction of TokenWriter to support custom formatting of pretty-printed code. (PR: #1494)
  • Spoon runs on Java9 JVM with JDK9. (PR: #1585)
  • Add TypeFactory LIST, SET, MAP, ... constant type references. (PR: #1660)
  • Add new create method in Factory. (PR: #1659)
  • Add CtPackage#getQualifiedName. (PR: #1652)
  • The cloning behavior can be subclassed. (PR: #1580)
  • Add a static method to getting started with one single line of code. (PR: #1559)
  • Add support for analyzing whether a type reference is generic or not (method isGeneric). (PR: #1562)
  • Add support for implicit / explicit modifiers (CtExtendedModifier). (PR: #1649)
  • Add simple support for enter/exit in DJPP as in CtScanner. (PR: #1538)
  • Create a launcher to analyze maven projects. (PR: #1533)
  • Add utility methods in CtModifiable. (PR: #1726)

Bug Fixes

  • ⚠️ [BREAKING] Fix ClassTypingContext#isSameSignature for generic methods. (PR: #1639)
  • ⚠️ [BREAKING] SetVisibility should only be used with private, public or protected. (PR: #1705)
  • ⚠️ [MAYBE BREAKING] Less hashcode collisions for CtReference. (PR: #1717)
  • ⚠️ [BREAKING] Move deprecated classes to spoon.legacy. (PR: #1518)
  • ⚠️ [BREAKING] Template: Replacing of field access by refining behaviour of String parameter. (PR: #1476)
  • ⚠️ [BREAKING] Remove the useless factory in Environment. (PR: #1673)
  • ⚠️ Fix bug with repeatable annotations. (PR: #1724)
  • Typo in RoleHandlersGenerator. (PR: #1709)
  • Method with varargs should never be transient. (PR: #1701)
  • JDTImportBuilder should not import all public methods from interfaces. (PR: #1620)
  • Explicit "final" modifier are possible in catch variables and should be kept when pretty-printing. (PR: #1690)
  • CtVariableAccess#getVariable() sets the type of "super". (PR: #1684)
  • MavenLauncher warns when a provided dependency is not loaded. (PR: #1681)
  • Add position for implicit blocks. (PR: #1678)
  • Bug related with cloning newClass invocation with anonymous class. (PR: #1667)
  • Improve contract+test of CtScanner and it relation to roles. (PR: #1642)
  • In CtCatchVariable set/getType is derived from multiType. (PR: #1668)
  • AbstractTypingContext should set consistent parents. (PR: #1664)
  • [BREAKING] CtTypeParameterReference#getBoundingType() consistently returns null when Object is the bound. (PR: #1661)
  • Remove useless code on CtElement#setParent. (PR: #1662)
  • Change default log level. (PR: #1646)
  • Fix StackOverflow in MethodTypingContext on <T, U extends T>. (PR: #1640)
  • Fix NPE in MavenLauncher when there is no build section. (PR: #1720)
  • CtTypeInformationTest now use patch JDK version for the expected test number. (PR: #1721)
  • Optional maven dependencies should not be passed to SpoonMavenLauncher. (PR: #1619)
  • Fix bug related to generics in CtTypeReference in noclasspath. (PR: #1609)
  • Auto-imports works for package-info. (PR: #1611)
  • CtNewClassImpl#setAnonymousClass has CtRole.NESTED_TYPE not CtRole.EXECUTABLE. (PR: #1605)
  • Pretty printer adds no space before comma in new array expression. (PR: #1602)
  • Spoon model is a tree not a lattice. (PR: #1592)
  • ImportBuilder checks visibility when importing starred imports. (PR: #1588)
  • The query engine also works on JVMs where lambdas are not in stack trace elements. (PR: #1579)
  • Cleaning of method signature computation. (PR: #1561)
  • DJPP sends "class" as keyword and wildcard "?" as separator token. (PR: #1568)
  • PotentialVariableDeclarationFunction should consider static scopes. (PR: #1536)
  • Fix issue with recursively defined annotation in shadow class. (PR: #1711)
  • Remove an hardcoded encoding value in CompilationUnitWrapper. (PR: #1544)
  • SetSimpleName of CtRootPackage if now fail-silent to simplify client code. (PR: #1523)
  • File resource leak in pretty printing. (PR: #1521)
  • Bump commons-io version. (PR: #1530)
  • prettyprinter
    • Invalid use of type access generics. (PR: #1454)
    • Bug related with "--lines" argument. (PR: #1558)
  • role
    • CtPackage.types is CtRole.CONTAINED_TYPE. (PR: #1600)
    • CtTypeAccess getTypeAccess uses CtRole.ACCESSED_TYPE. (PR: #1637)
    • CtTypeAccess.getAccessedType has CtRole.TYPE. (PR: #1630)
  • template
    • Relax template parameter constraint. (PR: #1535)

Refactoring

  • ⚠️ [BREAKING] Get rid of snapshotLength and hasNewContent. (PR: #1576)
  • ⚠️ [BREAKING] CompilationUnit#create renamed to getOrCreate. (PR: #1645)
  • ⚠️ [BREAKING] CtModifiable add/removeModifier stick to convention on returned object. (PR: #1706)
  • ⚠️ [BREAKING] Remove ant related code and dependency. (PR: #1540)
  • ⚠️ [BREAKING] Move ElementPrinterHelper to the appropriate package. (PR: #1551)
  • ⚠️ [BREAKING] GetBoundingType returns Object by default. (PR: #1672)
  • All non-leaf interfaces of the metamodel should be visited by CtInheritanceScanner. (PR: #1703)
  • Remove replace methods which pollute code completion and do not provide additional behavior. (PR: #1704)
  • Move package spoon.generating.* from src/main to src/test. (PR: #1647)
  • Introduce CommentHelper, LiteralHelper and OperatorHelper. (PR: #1525)
  • Compute CtRole#forName automatically based on enum value names. (PR: #1702)
  • PrinterHelper prints tabs automatically. (PR: #1566)
  • DefaultJavaPrettyPrinter better uses OperatorHelper. (PR: #1553)
  • Delete old/useless config files. (PR: #1548)
  • Launcher#buildModel returns a CtModel. (PR: #1549)
  • Add constant for code compliance level. (PR: #1543)
  • Test code assumes java 8 compliance so as to allow lambdas in spoon code. (PR: #1539)
  • Use LiteralHelper in DefaultJavaPrettyPrinter. (PR: #1529)
  • modifier: CreateCtModifierHandler that handles the modifiers. (PR: #1677)
  • role
    • New CtRoles ARGUMENT_TYPE and TYPE_ARGUMENT. (PR: #1622)
    • Add CtRole.TYPE_MEMBER. (PR: #1625)
    • CtThrows uses EXPRESSION now. Rolls back usage of THROWN. (PR: #1624)
    • CtCodeSnippet has CtRole.SNIPPET. (PR: #1623)
    • Add and refactor CtRole annotations of model. (PR: #1606)

Performance

  • MainTest#checkModelIsTree needs less memory. (PR: #1596)
  • Avoid slow CCE. Check acceptable type when possible. (PR: #1541)

Tests

  • Add a test about the behavior of PropertySetter. (PR: #1612)
  • SpoonMetaModel checks whether provided model is complete. (PR: #1714)
  • Add an architectural test to catch package creation during code review. (PR: #1696)
  • Fix typo in MMType. (PR: #1708)
  • Check that CtComment works with \r separator. (PR: #1679)
  • Add explicit Spoon metamodel to facilitate consistency checks and code generation. (PR: #1627)
  • Declares missing packages for new architecture enforcing test. (PR: #1710)
  • Adds a test on roles for CtReference fields. (PR: #1601)
  • Don't use Junit3 classes in test suite, only use Junit4 org.junit.*. (PR: #1577)
  • Add a test to verify an important contract of setParent. (PR: #1591)
  • Add a new test to check if static imports are placed after type imports. (PR: #1572)
  • Enforce test naming discipline. (PR: #1554)
  • The ant dependency was removed so the test should be changed. (PR: #1547)
  • Fix test assertion with JDK8 1.8.0_15 on Travis. (PR: #1718)
  • Refactor: Faster test execution. (PR: #1552)

Documentation

  • Improve getting started. (PR: #1676)
  • Clarify CtType#getAllMethods documentation. (PR: #1644)
  • End-of-life for mailing list spoon-discuss. (PR: #1643)
  • Clarifies contracts of @DerivedProperty. (PR: #1613)
  • Move around some documentation items for easier finding. (PR: #1564)
  • Add recent papers that use Spoon. (PR: #1556)
  • Update version number after the new release 5.9.0. (PR: #1517)

Other

  • Change Revapi template to have class name shortening by a bunch of Freemarker macros. (PR: #1697)
  • Revapi reports are smaller on screen to save space on the corresponding Github page. (PR: #1692)
  • Revapi now deletes its own comments before commenting. (PR: #1683)
  • Improve Travis configuration for parallel jobs. (PR: #1655)
  • Bump revapi version. (PR: #1665)
  • Upgrade to org.eclipse.tycho:org.eclipse.jdt.core:3.13.0. (PR: #1492)
  • Now depends on Java8/JDK8. (PR: #1528)
  • maven: Remove maven reporting plugins that we never use. (PR: #1560)
  • Prepare for next development iteration.

Authors

Name Nb Commit
Simon Urli 49
Pavel Vojtechovsky 44
Martin Monperrus 22
Thomas Durieux 4
tiagodrcarvalho 1
Lukas Krejci 1

spoon-core-5.9.0

06 Sep 09:05
Compare
Choose a tag to compare

Spoon release on this back-to-work times!

Thanks to all contributors 👍

Changelog

New features

  • Introduce NamedElementFilter (because NameFilter is ill-designed). (PR: #1500)
  • In auto-import mode, imports from original source code are reused. (PR: #1499)
  • Add automatically generated comments in template-produced code. (PR: #1465)
  • Add support for short pretty-printing of annotation value when appropriate. (PR: #1485)
  • prettyprinter: DefaultJavaPrettyPrinter#setLineSeparator(String). (PR: #1490)

Bug Fixes

  • Fix a stack overflow when calling getDeclaration in noclasspath. (PR: #1515)
  • Fix issue related to processing generic types. (PR: #1504)
  • Fix NPE in noclasspath mode. (PR: #1502)
  • Compute positions of elements. (PR: #1493)
  • Support substitution of references to target type in inner type. (PR: #1477)
  • setInputClassloader: Bug when using a URLClassLoader with standard URLs. (PR: #1507)
  • comment: Splitting of comment by EOL. (PR: #1455)
  • template: Object is not an template parameter implicitly. (PR: #1461)
  • reference: Fix getReference of an unknown class that has the same name as an existing class. (PR: #1480)

Documentation

  • Update usage of maven plugin to latest version 2.5. (PR: #1508)
  • Remove information about deleted stable branch. (PR: #1474)
  • release: Update release information in documentation. (PR: #1471)

Refactoring

  • Encoding is correctly handled in Environment. (PR: #1498)
  • Deprecate PrettyPrinter#getPackageDeclaration. (PR: #1489)
  • printer: Remove deprecated method from PrinterHelper. (PR: #1472)

Performance

  • Compile comments only if needed. (PR: #1487)
  • Collect list of source files only once. (PR: #1486)
  • No call to expensive toString in DoNotFurtherTemplateThisElement. (PR: #1478)

Tests

  • Fix CtRenameLocalVariableRefactoringTest#testRenameAllLocalVariablesOfRenameTestSubject. (PR: #1491)

Community

Other

  • Fix pom.xml to allow deploying snapshots. (PR: #1495)
  • Prepare for next development iteration.

Authors

Name Nb Commit
Pavel Vojtechovsky 11
Simon Urli 10
Wreulicke 1
Marcel Steinbeck 1
Lionel Seinturier 1
Thomas Durieux 1
Jan Galinski 1
Martin Monperrus 1

spoon-core-5.8.0

11 Jul 11:50
Compare
Choose a tag to compare

This summer release mainly fixes a lot of bugs, in particular in the resolution of TypeParameters which were introduced in previous version.
New experimental features are also introduced in this release.

Thanks all our amazing contributors 👍

New features

  • experimental: Add experimental support for model change listeners. (PR: #1417)
  • import: Sort imports alphabetically. (PR: #1434)
  • metamodel
    • CtTypeMember extends CtNamedElement. (PR: #1452)
    • Add a method to insert a statement at a specific position. (PR: #1423)
    • Annotes getter and setter with a CtRole. (PR: #1377)
    • Add first metamodel support. (PR: #1378)
  • role: Add field annotation with a role. (PR: #1368)
  • template: SubstitutionVisitor can replace substrings in NamedElements and References. (PR: #1441)
  • Add support for replacement by multiple elements CtElement#replace(Collection). (PR: #1369)
  • Add generic type information in shadow classes. (PR: #1352)
  • The template engine supports insertion of literals. (PR: #1403)

Bug Fixes

  • Ignore null items in ReplacementVisitor. (PR: #1400)
  • CtComment#getContent should never return "null". (PR: #1442)
  • Fix a bug with import static. (PR: #1412)
  • Fix issue related to overridden methods in getAllMethods. (PR: #1375)
  • Fix issue in ClassTypingContext#isOverriding. (PR: #1411)
  • Fix bug related to CtTypeParameterReference and getDeclaration. (PR: #1383)
  • Refactor SubstitutionVisitor to support null parameter values. (PR: #1359)
  • Bug with escaped literal. (PR: #1394)
  • Use getTypeDeclaration in CtTypeParameterReference. (PR: #1387)
  • Ignore only ClassCastException in query code. (PR: #1462)
  • Bugs related to continue algorithm of ClassTypingContext. (PR: #1379)
  • Fix regression related to ReferenceBuilder and generics. (PR: #1373)
  • Fix stackoverflow in ReferenceBuilder. (PR: #1367)
  • Calls to default constructors outside the factory should still be possible, and a default factory is made available. (PR: #1448)
  • Fix NPE with union catch inside lambda in noclasspath. (PR: #1416)
  • comment: Printing of comments on MS Windows. (PR: #1435)
  • factory: Create type reference from inner class. (PR: #1361)
  • import: Fix NPE with import scanner. (PR: #1437)
  • prettyprinter: Throws SpoonException with info instead of NPE in Pretty Printer on missing variable declaration. (PR: #1451)
  • reflection: Add annotation value in the model. (PR: #1384)
  • role: Fix wrong roles. (PR: #1397)
  • template
    • Clarifies the contract of proxy template parameters. (PR: #1457)
    • Substitution#insertAll should bypass Template methods. (PR: #1348)
  • printer: Reset import context on reset. (PR: #1360)

Documentation

  • community: Add the integrator rules. (PR: #1413)
  • Explicit the difference between isOverriding and isSubsignature. (PR: #1449)
  • Update roadmap (inline comments are supported + link to 'features' issues). (PR: #1440)
  • Add cool idea in roadmap (by @tdurieux). (PR: #1433)
  • Improve explanation of getDeclaration. (PR: #1429)
  • Update roadmap. (PR: #1432)
  • Adds AutoJMH in the ecosystem page. (PR: #1401)
  • Clean bad comment. (PR: #1380)

Refactoring

  • Change Substitution#createTypeFromTemplate return type to avoid cast. (PR: #1464)
  • Add not-null check. (PR: #1443)
  • Explicit handlingErrorPolicy of JDT in noClasspath and normal mode. (PR: #1424)
  • Printing of lists in Spoon pretty printer. (PR: #1428)
  • GetLabelledStatement is a derived propertty shared between CtContinue and CtBreak. (PR: #1398)
  • role: Rename CtPathRole to CtRole and add new roles. (PR: #1372)

Tests

  • Use the factory instead of the constructor. (PR: #1395)
  • Add test for template substitution of enum values. (PR: #1389)
  • Add test for template substitution of variable access. (PR: #1390)
  • Add test for template substitution of return. (PR: #1391)
  • Add test for SubstitionVisitor class access. (PR: #1388)
  • Test Template array access. (PR: #1353)

Other

  • Remove old useless file. (PR: #1421)
  • Change revapi config for more relevant messages. (PR: #1392)
  • Removes one checkstyle rule. (PR: #1336)
  • Add new architectural rule. (PR: #1355)
  • travis: Fix issue by using the last image on Travis #1414. (PR: #1418)
  • Update release numbers in documentation. (PR: #1351)
  • Prepare for next development iteration.
  • Remove deprecated methods in ImportScanner. (PR: #1366)

Authors

Name Nb Commit
Pavel Vojtechovsky 23
Simon Urli 16
Martin Monperrus 12
Thomas Durieux 11
Benjamin DANGLOT 1

spoon-core-5.7.0

01 Jun 07:59
Compare
Choose a tag to compare

New features

  • Add support for Java 8 receiver parameters. (PR: #1298)
  • Function to find all executables with the same signature. (PR: #1291)
  • Add new filter for finding lamdas (class LambdaFilter). (PR: #1315)
  • Add new function to collect subtypes (class SubInheritanceHierarchyFunction). (PR: #1290)
  • Add refactoring class CtParameterRemoveRefactoring. (PR: #1317)
  • Add SubInheritanceHierarchyResolver as helper for query mechanisms. (PR: #1309)
  • New filter ExecutableReferenceFilter. (PR: #1318)
  • Add public method MethodTypingContext#adaptMethod. (PR: #1288)
  • Add method GenericTypeAdapter#getAdaptationScope. (PR: #1287)
  • Add CtMethod#isOverriding(CtMethod). (PR: #1220)
  • Add support for typing analysis of generic types. (PR: #1218)
  • Add support for type erasure (CtType/CtTypeReference#getTypeErasure()). (PR: #1216)
  • Support for better analysis of generic type arguments (TypeReference#getTypeParameterReference() and TypeFactory#createReference(type,includingFormalTypeParams)). (PR: #1237)
  • SuperInheritanceHierarchyFunction supports references and listener. (PR: #1242)
  • Add support for renaming local variables. (PR: #1005)
  • comment: Add an AST node for the javadoc tags. (PR: #1310)
  • template: The template engine supports substitution of method names in method calls. (PR: #1325)

Bug Fixes

  • Fix bug in CtExecutableReference#getActualMethod when parameters are generically typed. (PR: #1277)
  • Fix bug in getActualMethod() due to missing information in CtTypeParameterReference. (PR: #1286)
  • Improve line preservation mode. (PR: #1335)
  • Auto-import works for compilation units with multiple classes in the same file. (PR: #1322)
  • Fix import bug with java.lang.subpackage. (PR: #1327)
  • Fix NPE in isTypeInCollision. (PR: #1326)
  • Improve ImportScanner to support variables called "java". (PR: #1321)
  • Fix bug in qualified names in a special case due to missing information in JDT. Fix #1307. (PR: #1312)
  • Fix bug in import inference (auto-import mode). Close #1306. (PR: #1308)
  • In noClasspath, a type without import should be considered in the same package as the current class. (PR: #1302)
  • Fix SuperInheritanceHierarchyFunction in noClassPath mode. (PR: #1281)
  • Fix AnnotationFactory#create. (PR: #1340)
  • Fix JDT error when input resource contains an entirely commented class. (PR: #1279)
  • Fix special case not handled in factory.Annotation().annotate(). (PR: #1278)
  • Fix a couple of bugs in recent feature "generic type adaptation". (PR: #1275)
  • Fix regression regarding actual type arguments resolving. (PR: #1273)
  • #setParent is not a normal metamodel setter, and is excluded from SpoonTestHelpers#getAllSetters. (PR: #1261)
  • TestFactorySubFactory must only check public factory methods. (PR: #1263)
  • CtBlock#getLastStatement is a @DerivedProperty. (PR: #1262)
  • Fix a bug in wrongly qualified type in executable references. (PR: #1259)
  • Fix issue #1246. (PR: #1251)
  • Fix NPE in CtElement#getMetadataKeys. Closes #1239. (PR: #1240)

Documentation

  • Add pointer to new Template example. (PR: #1343)
  • Document and refactor TemplateMatcher. (PR: #1319)
  • Update examples links from gforge.inria.fr to github.com. (PR: #1226)
  • Adds InspectorGuidget in ecosystem page. (PR: #1304)
  • Clarifies page on architectural rule checking with Spoon. (PR: #1301)
  • Fix link mix. (PR: #1297)
  • Fix javadoc of SuperInheritanceHierarchyFunction. (PR: #1289)
  • Update doc with release 5.6.0 information. (PR: #1227)

Refactoring

  • Remove or update deprecation related to queries & filters. (PR: #1300)
  • Improve ImportScanner design, add getAllImports. (PR: #1339)
  • Renamed confusing duplicate classes. (PR: #1333)
  • Improve PrinterHelper (less duplication, more encapsulation). (PR: #1332)
  • Handle some rare limit cases. (PR: #1331)
  • Remove call to deprecated File#toURL. (PR: #1313)
  • Change generic type bound. (PR: #1314)
  • Replace string literals by constants. (PR: #1316)
  • Remove deprecated method computeImports. (PR: #1311)
  • Remove useless 'final' modifier in interface methods. (PR: #1334)
  • MethodTypingContext#isOverriding/isSameSignature/isSubSignature moved to ClassTypingContext. (PR: #1299)
  • MethodTypingContext#adaptMethod moved to ClassTypingContext. (PR: #1296)
  • AllTypeMembersFunction accepts now CtTypeInformation as parameter. (PR: #1285)
  • Use new CtMethod#isOverriding in method overriding/overriden filters. (PR: #1276)
  • Refactor and test initProperties. (PR: #1260)
  • Remove unused field. (PR: #1253)
  • Adds an architural rule for helper classes with static methods. (PR: #1247)
  • CtFormalTypeDeclarer extends CtTypeMember. (PR: #1235)
  • Refactor *VariableReferenceFunction around LocalVariableReferenceFunction. (PR: #1193)

Performance

  • Use factory.Type().OBJECT to save memory. (PR: #1241)
  • Use TypeFactory#OBJECT. (PR: #1231)

Tests

  • Improve TemplateMatcher test. (PR: #1323)

Other

  • Checkstyle checks that the end of lines are consistent (unix-style \n only). (PR: #1344)
  • Fix broken revapi reports due to regression in revapi-reporter-text 0.8.0.
  • Revapi check should fail only for breaking changes. (PR: #1282)
  • Fix revapi bug. (PR: #1280)

Unknown

  • Add 'getBinaryFiles' to CompilationUnit. Fixes #1230. (PR: #1232)
  • Prepare for next development iteration.

Authors

Name Nb Commit
Pavel Vojtechovsky 38
Simon Urli 18
Martin Monperrus 17
Thomas Durieux 1
Marcel Steinbeck 1

spoon-core-5.6.0

16 Mar 13:45
Compare
Choose a tag to compare

Thanks all contributors to this new release, and special thanks to @pvojtechovsky who continue to do an amazing work on Spoon!

New features

  • Add filter helpers (FieldReferenceFunction, FieldScopeFunction, SubtypeFilter). (PR: #1141)
  • ParentFunction is able to terminate early. (PR: #1211)
  • Introduces CtScannerFunction as basic infrastructure for advanced functions and queries. (PR: #1180)
  • Add support for CtScannerListener in EarlyTerminatingScanner. (PR: #1210)
  • Automatic explicit ThisAccess for fields. (PR: #1192)
  • CtLambda#getMethod() and fix of #1159. (PR: #1164)
  • Add helper for query variables (VariableReferenceFunction, VariableScopeFunction). (PR: #1114)
  • Add helper for query to get parents of element. (PR: #1153)
  • Add query functions AllTypeMembersFunction and SuperInheritanceHierarchyFunction. (PR: #1195)
  • Add filter helpers (LocalVariableReferenceFunction, LocalVariableScopeFunction). (PR: #1144)
  • Add filtering helpers (CatchVariableReferenceFunction, CatchVariableScopeFunction). (PR: #1145)
  • Add filtering helpers (ParameterReferenceFunction, ParameterScopeFunction). (PR: #1136)
  • Add support for early terminating queries with CtQuery#first(). (PR: #1138)
  • Add support for getting all children with CtQuery#filterChildren(null). (PR: #1140)
  • Add CtQuery#select(Filter). (PR: #1142)
  • Add query factory. (PR: #1093)
  • Add metamodel method CtTypeParameter#getTypeParameterDeclarer(). (PR: #1217)
  • Reusable and efficient CtQueries. (PR: #1090)
  • filter: Template matchers can be used as filter. (PR: #1110)

Bug Fixes

  • CtMethod#isDefaultMethod. (PR: #1165)
  • Fix wrong behavior for special cases in removeStatement. Closes #1221. (PR: #1224)
  • Inner interfaces should be properly handled in CtTypeReferenceImpl#canAccess. (PR: #1189)
  • LocalVariableScopeFunction handles CtFor, CtTryWithResource, local classes. (PR: #1154)
  • Fix regression with a lambda expression extends Function. (PR: #1178)
  • CtExecutableReference#isOverriding correctly handles anonymous classes. (PR: #1219)
  • Fix autoimport regression. (PR: #1162)
  • Bug in isSubtypeOf (broken contract X.isSubtypeOf(X)==true). (PR: #1157)
  • Improve static import support in auto-import mode. (PR: #1155)
  • Fix regression (NPE) in DefaultJavaPrettyPrinter. (PR: #1214)
  • GetSuperClass does not throw exception in noClassPath mode. (PR: #1128)
  • Fix NPE when Spoon in executed from an empty working dir. (PR: #1208)
  • Visibility detection issue in CtElement #1099. (PR: #1102)
  • CtQuery: CCE on Query#forEach call of CtConsumer#apply. (PR: #1126)
  • comment: Support comment on string concatenation. (PR: #1124)
  • noclasspath: Fix the qualified name of partial qualified reference (inner class). (PR: #1201)

Documentation

  • Adds hyperlink to the Spoon paper.
  • Announces the OW2 membership. (PR: #1151)
  • Update ecosystem (one single file to maintain + added syringe). (PR: #1147)
  • Add links to changelogs (#1133). (PR: #1133)
  • Add support files for FOSDEM'17. (PR: #1148)
  • Remove outdated last-updated information on pages. (PR: #1177)
  • More specific doc about the release process. (PR: #1131)
  • Fixes broken menu (#1122). (PR: #1122)
  • Fix javadoc JDK8 rules. (PR: #1112)
  • Prepare internal doc for the new release. (PR: #1109)
  • license: Update license year. (PR: #1130)

Refactoring

  • Improve and simplify usage of PotentialVariableDeclarationFunction. (PR: #1194)
  • Remove FieldScopeFunction. (PR: #1186)
  • Remove deprecated elements from version 5.4.0. (PR: #1135)

Performance

  • Improve performance of DirectReferenceFilter. (PR: #1132)

Tests

  • Reduce the scope of the testSettersAreAllGood test. (PR: #1196)

Other

  • Only publish revapi report if the PR is edited or opened. (PR: #1161)
  • Revapi configuration and helper scripts to detect API breaking changes. (PR: #1115)
  • travis: Travis must check that javadoc is well-formed. (PR: #1107)

Unknown

  • Prepare for next development iteration.

Authors

Name Nb Commit
Pavel Vojtechovsky 29
Simon Urli 17
Martin Monperrus 5
Thomas Durieux 3
Marcel Steinbeck 1

spoon-core-5.5.0

11 Jan 15:57
Compare
Choose a tag to compare

Thanks to all contributors!

New features

  • New query architecture with support for Java8 queries. (PR: #1018)
  • Allow spoon to do static imports for methods and fields. (PR: #1040)
  • Interface to Exclude Compilation Units From CtModel. (PR: #1037)
  • API: Add CtTypeMember.getTopLevelType(). (PR: #1004)
  • CoreFactory
    • Add create(Class) so as to create elements by reflection. (PR: #949)
  • evaluation: Simplify classes based on static evaluation (first support). (PR: #1003)
  • filter: Compute filtered types by reflection from parameter of method matches. (PR: #1015)
  • getDeclaredOrInheritedField: Add CtTypeInformation.getDeclaredOrInheritedField(String fieldName). (PR: #967)
  • model: Add interface CtBodyHolder. (PR: #943)
  • position: Improve the element position. (PR: #984)
  • snippet:
    • Add support for compiling statements with return. (PR: #947)
    • Print Comment in CtSnippet. (PR: #1101)

Bug Fixes

  • DefaultJavaPrettyPrinted: Fix bug when printing implicit accesses to static fields in autoimport. (PR: #913)
  • JDTBasedSpoonCompiler: Fix annotation bug when templates are used. (PR: #934)
  • NPE: Fix NullPointerException resulting from variable accesses in constructors. (PR: #1098)
  • Fixed name of test class. (PR: #1037)
  • Generate expected EOL even on Windows. (PR: #977)
  • No exception when writing to log. (PR: #920)
  • Test: APITest.testSetterInNodes() was not testing anything . fix #972. (PR: #1022)
  • Close input stream after creating a compilation unit to prevent TooManyOpenFilesException. (PR: #1097)
  • Fix ReferenceBuilder#getLambdaExecutableReference to return the innermost lambda #1100. (PR: #1103)
  • Set the type of a parameter declared in a lambda to Object instead of ommitting them when unknown. (PR: #1108)
  • Fixed formatting. (PR: #1037)
  • Fix inconsistencies between interface contract and double implementations of getAllExecutables. (PR: #1019)
  • Removes unused imports. (PR: #988)
  • Clean exception when Spoon is given a wrong path for input resource. (PR: #1057)
  • SignaturePrinter: Overrides visitCtAnnotationMethod in SignaturePrinter. (PR: #1030)
  • ThisAccess
    • The type access associated to a this must be the type containing the this. (PR: #1008)
    • Shorter this access. (PR: #1031)
  • access path: Fix regression with type parameters in access paths. (PR: #1007)
  • annotations: Fix Dropwazrd regression by fixing substituteAnnotation. (PR: #1032)
  • array: The qualified name of an array is not java.lang.reflect.Array. (PR: #995)
  • clone: Clone preserves comments and implicitness. (PR: #1028)
  • comments
    • Fixes pretty-printing bug for inline arrays with comments. (PR: #912)
    • Fix bug in comments in array initialization. (PR: #1088)
    • Fix a bug concerning multiple comments before a catch block. (PR: #1074)
    • Handle stacked comments in package-info.java. (PR: #1011)
    • Add support of comments in snippets. (PR: #930)
  • enum: GetAllMethods also returns the methods of Enum. (PR: #1016)
  • equal
    • Regenerate EqualVisitor based on new Scanner, which fixes a number of bugs incl. #978. (PR: #993)
    • Actual type references must be part of equality. (PR: #997)
  • getTypeDeclaration
    • First lookup in sources, then in classpath. (PR: #962)
    • GetTypeDeclaration('?') should point to Object. (PR: #973)
  • imports
    • Correct interplay between fully-qualified types and variable names . (PR: #1026)
    • Fix regressions with static imports and inner classes or enums. (PR: #1048)
    • Fix a static import bug, ripple of adb2fd7. (PR: #1060)
  • importscanner: Fix regression in fuly-qualified mode. (PR: #1052)
  • isAssignableFrom: Deprecate isAssignableFrom that is totally confusing, and for which there is an alternative. (PR: #948)
  • isSubtypeOf: Spoon can resolve anonymous references. (PR: #953)
  • launcher: Easy way to parse a complete class with package. (PR: #982)
  • log: Filter out some JDT errors in noclasspath. (PR: #926)
  • model
    • Fix NPE when compilation units array contains null elements. (PR: #928)
    • Complex access paths for types with visibility are now correctly handled. (PR: #974)
  • newinstance: Forces usage of the newest version of the class. (PR: #909)
  • parent: Stops furious useless exceptions. (PR: #963)
  • performance
    • Improves performance of VirtualFolder.getAllFiles() and getSubFolders(). (PR: #915)
    • Keep shadow classes. (PR: #898)
  • position: Implicit elements do not have position. (PR: #1086)
  • precompile: Specifies and fixes precompile option. (PR: #923)
  • pretty-print
    • Fix pretty-printing of 'this' access for inner classes. (PR: #1061)
    • The annotation values are now pretty-printed in the original order. (PR: #1067)
    • Parentheses are missing when pretty-pretting some ternary expressions. (PR: #927)
  • reference: Fix reference in ctconstructor. (PR: #1095)
  • scanner
    • Add missing scan properties based on a new powerful specification. (PR: #966)
  • serialization: Fix serialization issue in Factory. (PR: #955)
  • shadow: No ClassNotFoundException when building shadow classes by reflection. (PR: #1012)
  • subtype: Removes CtTypeImpl#isSubtypeOf that is wrong and anyway overridden by all subclasses. (PR: #954)
  • template: Check that Template is on source path of builder. (PR: #976)
  • test
    • Much stronger contracts for setter spec and tests. (PR: #975)
    • Fixes OS-dependent path in LauncherTest. (PR: #919)

Documentation

  • Add --noclasspath for reducing first-usage friction.
  • Clarifies responsibility of CtNamedElement. (PR: #1062)
  • Adds adt poster and InDesign source. (PR: #1051)
  • Fix markdown issue in code_elements.md.
  • Improve readability and wording of doc/comments.md. (PR: #1079)
  • Fix broken link.
  • Improve navigability and first contact.
  • Update README.md (compiling, ecosystem, contributors). (PR: #1089)
  • Adds doc about constructor calls and the associated reference. (PR: #994)
  • Improve template documentation. (PR: #1068)
  • Adds documentation for explaining the code elements. (PR: #922)
  • SignaturePrinter: Improves doc of SignaturePrinter. (PR: #987)
  • info: Fix broken link to mailing list.
  • Fixes a typo in doc/gradle.md. (PR: #1078)
  • Fix issues related to javadoc in java 8. (PR: #1105)

Refactoring

  • Same algorithm for building sources, templates and snippet. (PR: #946)
  • Remove code duplication and fix inconsistencies of class Substitution. (PR: #992)
  • Removes dead code. (PR: #989)
  • Check everywhere that Template is on source path of builder. (PR: #979)
  • Removes old unseless code. (PR: #983)
  • Remove unused printer code of visitCtCatchVariable. (PR: #965)
  • JDTBatchCompiler arg.sources not needed. (PR: #958)
  • Regenerate files with short this for future clean diffs. (PR: #1039)
  • Avoid creation of JDT hacking TMP files. (PR: #944)
  • JDTBatchCompiler.getUnits() parameter not required anymore. (PR: #942)
  • Remove old unmaintained/broken code. (PR: #937)
  • All factory methods are also in main Factory for usability and discoverability. (PR: #1082)
  • Removes duplicated code. (PR: #936)
  • Remove unused imports. (PR: #935)
  • Reuse existing CU in JDTBatchCompiler.getUnits(). (PR: #933)
  • Introduce JDTBasedSpoonCompiler.buildModel to remove code duplication. (PR: #931)
  • Improves JDTCommentBuilder. (PR: #924)
  • classloader: Adds test for classloader. (PR: #897)
  • printerContext: Assure correct restore of state. (PR: #999)
  • processingmanager: Removes duplicated code, improves readability. (PR: #1054)
  • Deprecate reference filtering that is now handled by standard element filtering. (PR: #1013)
  • Renamed label from units to unitLoop. (PR: #1037)
  • Remove dependency to CompilationUnitDeclaration. (PR: #1037)
  • Use filter to exclude instead of accapt units. (PR: #1037)
  • We must always have a source + exception handling. (PR: #996)
  • Added an interface used to filter particular CompilationUnitDeclaraions. (PR: #1037)

Performance

  • Cache inputClassLoader corresponding to sourceClasspath. (PR: #990)
  • Improve performance of FindCommentParentScanner. (PR: #917)

Tests

  • ParentContractTest: Improves contract about setting parents. (PR: #956)
  • TemplateMatcher: Add tests for named template matchers (uncovered cases). (PR: #1092)
  • VisitorPartialEvaluator: Add tests for VisitorPartialEvaluator. (PR: #939)
  • metamodel: Enforce the package design of the metamodel. (PR: #945)
  • superClass: Adds test that verifies the compilation of complex superclass references that use access paths with tricky visibility. (PR: #971)
  • template: Add test for super interface templates. (PR: #1020)
  • templatematcher: Add a new Junit test and dynamic assertion for TemplateMatcher. (PR: #1034)
  • Add test for method parameter templating. (PR: #1064)
  • Add tests and doc for template engine. (PR: #1072)
  • Add a test to check if TemplateMatcher can match two equivalent snippets. (PR: #1059)
  • Reduces I/O footprint (and found two IO bugs on the way). (PR: #969)
  • Add coverage for templates (and unify API thanks to this). (PR: #1049)
  • Add missing @test. (PR: #950)
  • One test was not named correctly, hence was not run by Maven in CI, hiding a bug. (PR: #1036)
  • Update CompilationTest to match latest compiler changes. (PR: #940)
  • Remove unused imports. (PR: #941)
  • replacevisitor: Add a strong test and fix many bugs accordingly. (PR: #957)
  • Added a test for new compilation unit filter. (PR: #1037)

Other

  • changelog: Improve the changelog generator. (PR: #1087)
  • jenkins: Purge local repository of all Spoon snapshots. (PR: #1065)
  • Change eclipse jdt core dependency now depends on Maven central only. (PR: #1063)
  • Update version of spoon-maven-plugin. (PR: #906)
  • build.sh: Update minimum version to fix problem with repo.eclipse.org.
  • coverage: Update coveralls version. (PR: #1001)
  • release: Update version number in documen...
Read more

spoon-core-5.4.0

27 Oct 16:07
Compare
Choose a tag to compare

Important changes

  • CtElement are not comparable anymore (no natural order), they cannot be put in raw TreeSet (PR: #844)
  • The processing and scanning order has changed, it now follows the source code order (Issue: #681) (PR: #841)

New feature

  • ast
    • Always a block for CtIf and CtLoop. (PR: #805)
  • cttype : New method to know whether a given method is part of a CtType. (PR: #880)
  • position : Defines a default source position for all elements. (PR: #861)

Fixes

  • factory : Handles null parameter in Type#createReference(Class) and isSubTypeOf. (Closes #825). (Issue: #825) (PR: #837)
  • getDeclaration : Incorrect between getReference and getDeclaration for local variables. (PR: #888)
  • Fixes potential NullPointerException in JDTTreeBuilderQuery. (PR: #887)
  • Enables parallel tests. (PR: #838)
  • GetAllMethods in noclasspath return when encounter an unknown class. (PR: #864)
  • Better getDeclaration of CtLocalVariable (Fixes #868). (Issue: #868) (PR: #873)
  • compilation : Always uses the content of the ast to compile the ast (fixes #878). (Issue: #878) (PR: #879)
  • exception : Improves snippet compilation error message. (PR: #858)
  • if : Print the else body when the body is not a block (closes #881). (Issue: #881) (PR: #883)
  • isLocalType : Proper support for creating internal classes (fixes #776). (Issue: #776) (PR: #860)
  • literal
    • Fix literal type. (PR: #891)
    • Set the type of the CtLiteral via the CodeFactory. (PR: #829)
  • loop : Always use CtBlock in CtForeach. (PR: #847)
  • method : Avoid Concurrent modification with CtType#addMethod. (PR: #850)
  • position : Add default compilation unit when pretty-printing a new CtClass (closes #885). (Issue: #885) (PR: #886)
  • travis : The logs of Travis are not polluted by Javadoc warnings. (PR: #866)

Documentation

  • Add missing paper information. (PR: #889)
  • Adds doc about architecture checking. (PR: #843)
  • Update papers.md. (PR: #834)
  • Update on release doc. (PR: #830)
  • gradle : Improves Gradle doc (fixes #875). (Issue: #875) (PR: #876)
  • support : Improves support documentation. (PR: #865)
  • release : Update release number. (PR: #831)

Refactoring

  • Allow Launcher to use an existing Factory (Closes #862). (Issue: #862) (PR: #863)
  • Fix a test that fails on Eclipse due to its classloader. (PR: #859)
  • Removes all useless conditions with CtReference. (Closes #824). (Issue: #824) (PR: #836)
  • ast : Improves generic parameter type of setActualTypeReferences. (Closes #823). (Issue: #823) (PR: #835)
  • release : Remove deprecated code. (PR: #833)

Other

  • jenkins : Clean. (PR: #848)
  • pom : Updates commons-io from 1.3.2 to 1.4. (Closes #845). (Issue: #845) (PR: #851)
  • release
    • Scripts to publish automatically a release. (PR: #852)
    • Adds nodejs script to generate changelog. (PR: #832)
  • travis : Avoid running several times the tests on Travis. (PR: #839)
  • version : Update spoon maven plugin version. (PR: #849)
  • website : Add a link checker (fixes #797). (Issue: #797) (PR: #872)

spoon-core-5.3.0

19 Sep 13:13
Compare
Choose a tag to compare

New feature

  • ast
    • Adds CtTypeInformation#isGenerics method. (PR: #799)
    • Introduces new metamodel class CtTypeParameter for representing a generic type parameter. (Closes #606). (Issue: #606) (PR: #798)
  • wildcard : Creates a new metamodel element for representing a generics wildcard. (Closes #605). (Issue: #605) (PR: #796)

Fixes

  • access
    • Qualified field access with import static. (PR: #789)
    • Qualified fieldaccess in noclasspath mode. (PR: #762)
  • Typecasts on conditionals are not scanned hence not cloned. (PR: #753)
  • Avoid NullPointerException in CtExecutableReferenceImpl.getDeclaration. (closes #808). (Issue: #808) (PR: #809)
  • Fix NPE in getUsedTypes (Closes #650). (Issue: #650) (PR: #800)
  • Fix regressions introduced by #748. (Issue: #748) (PR: #789)
  • GetAllMethods returns all methods, incl. those of library superclasses and java.lang.Object. (PR: #771)
  • annotation : Supports enum fields with Annotation#annotate() method. (Closes #750). (Issue: #750) (PR: #767)
  • actual : Rewrite actual types with their enclosing class. (PR: #789)
  • api : CtModel.processWith(). (PR: #821)
  • array
    • Builds dimensions with casts. (PR: #789)
    • Allows array in an array. (PR: #789)
  • docs : Changes target of getSignature in javadoc. (PR: #742)
  • enum : Handle synthetic methods of enums (fixes #793). (Issue: #793) (PR: #794)
  • executable
    • Allows block in executable. (PR: #789)
    • Fix method ExecutableFactory#createReference to handle static methods (Closes #817). (Issue: #817) (PR: #818)
  • factory : GetDeclaration from element created by factory should not return null. (closes #719). (Issue: #719) (PR: #735)
  • fieldaccess : Static field access in anonymous executable (closes #816). (Issue: #816) (PR: #819)
  • import : Skip findImport and createPackage if necessary. Fixes #759. (Issue: #759) (PR: #760)
  • lambda : Resolve Literal#constant if required. Fixes #755. (Issue: #755) (PR: #758)
  • method : Search method with generics. (Issue: #573) (PR: #799)
  • noclasspath
    • Mark target as implicit if it's an anonymous class. (Closes #707). (Issue: #707) (PR: #737)
    • Correct reference to parameters in lambda methods. (Closes #779). (Issue: #779) (PR: #802)
    • Access lookup in lambda expressions in noclasspath mode. (Issue: #813) (PR: #814)
    • Tolerates missing annotation types. (PR: #820)
    • Avoid exception when we call getAllFields method. (PR: #780)
  • package : Handle packages with only package-info.java. (Closes #748). (Issue: #748) (PR: #766)
  • reference
    • Allow creation of a reference from CtAnonymousExecutable. (Closes #739). (Issue: #739) (PR: #740)
    • Dynamically lookup the declaration of all variable references (closes #756). (Issue: #756) (PR: #764)
    • No declaring type in an executable reference of a lambda. (fixes #733). (Issue: #733) (PR: #734)
  • replace : Use generic replace with CtStatementList elements (closes #792). (Issue: #792) (PR: #795)
  • type : Fix exception in noclasspath due to PolyTypeBinding. (Closes #751). (Issue: #751) (PR: #804)

Refactoring

  • ref : Removes unused CtCircularTypeReference. (PR: #799)
  • visitor : Rename EqualVisitor to DeepRepresentationVisitor. (Closes #791). (Issue: #791) (PR: #801)
  • Refactors DefaultJavaPrettyPrinter and JDTTreeBuilder to simplify future maintenance. (PR: #784)
  • Moves JDTTreeBuilder inner classes into top-level classes, adds one helper class with static methods. (PR: #746)
  • Removes getSignature() and create getShortRepresentation(). (PR: #738)