1Version 3.14.9 2------------------ 3[issues resolved](https://github.com/javaparser/javaparser/milestone/145?closed=1) 4 5Version 3.14.8 6------------------ 7[issues resolved](https://github.com/javaparser/javaparser/milestone/144?closed=1) 8 9Version 3.14.7 10------------------ 11[issues resolved](https://github.com/javaparser/javaparser/milestone/143?closed=1) 12 13Version 3.14.6 (oops, failed) 14------------------ 15[issues resolved](https://github.com/javaparser/javaparser/milestone/142?closed=1) 16 17Version 3.14.5 18------------------ 19[issues resolved](https://github.com/javaparser/javaparser/milestone/141?closed=1) 20 21Version 3.14.4 22------------------ 23[issues resolved](https://github.com/javaparser/javaparser/milestone/140?closed=1) 24 25Version 3.14.3 26------------------ 27[issues resolved](https://github.com/javaparser/javaparser/milestone/139?closed=1) 28 29Version 3.14.2 30------------------ 31[issues resolved](https://github.com/javaparser/javaparser/milestone/138?closed=1) 32 33Version 3.14.1 34------------------ 35[issues resolved](https://github.com/javaparser/javaparser/milestone/137?closed=1) 36 37Version 3.14.0 38------------------ 39* BREAKING: `SuperExpr` and `ThisExpr` used to have an `Expression classExpr`. 40this has been tightened to `Name typeName` which is more specific and easier to use. 41Checking if the expression is a `FieldAccessExpr` or `NameExpr` is no longer needed. 42 43[issues resolved](https://github.com/javaparser/javaparser/milestone/136?closed=1) 44 45Version 3.13.10 46------------------ 47[issues resolved](https://github.com/javaparser/javaparser/milestone/135?closed=1) 48 49Version 3.13.9 50------------------ 51[issues resolved](https://github.com/javaparser/javaparser/milestone/134?closed=1) 52 53Version 3.13.8 (failed) 54------------------ 55(release failed) 56 57Version 3.13.7 58------------------ 59[issues resolved](https://github.com/javaparser/javaparser/milestone/133?closed=1) 60 61Version 3.13.6 62------------------ 63[issues resolved](https://github.com/javaparser/javaparser/milestone/132?closed=1) 64 65Version 3.13.5 66------------------ 67* "BREAKING": `ReferenceType.getDirectAncestors()` no longer returns `java.lang.Object` when called on a `ReferenceType` of `java.lang.Object`. 68This remedies infinite recursions in certain edge cases. If you relied on the old behavior, you have to add a `ReferenceType` instance of `java.lang.Object` 69to the List returned by `ReferenceType.getDirectAncestors()` yourself. 70 71[issues resolved](https://github.com/javaparser/javaparser/milestone/131?closed=1) 72 73Version 3.13.4 74------------------ 75[issues resolved](https://github.com/javaparser/javaparser/milestone/130?closed=1) 76 77Version 3.13.3 78------------------ 79[issues resolved](https://github.com/javaparser/javaparser/milestone/129?closed=1) 80 81Version 3.13.2 82------------------ 83* Version 3.13.0 and 3.13.1 contain rather bad bugs that have been fixed here. 84 85[issues resolved](https://github.com/javaparser/javaparser/milestone/128?closed=1) 86 87Version 3.13.1 (buggy!) 88------------------ 89* Slightly breaking: most parameters to Log methods now take consumers to avoid evaluating them when not necessary. 90 91[issues resolved](https://github.com/javaparser/javaparser/milestone/127?closed=1) 92 93Version 3.13.0 (buggy!) 94------------------ 95* "BREAKING": The static `JavaParser.parse...` methods have moved to `StaticJavaParser.parse...`! 96 97[issues resolved](https://github.com/javaparser/javaparser/milestone/126?closed=1) 98 99Version 3.12.0 100------------------ 101* "BREAKING": all deprecated code was removed. 102If you don't know what to do, try version 3.11.0 and read the Javadoc for the deprecated methods. 103It tells you what to use instead. 104 105[issues resolved](https://github.com/javaparser/javaparser/milestone/124?closed=1) 106 107Version 3.11.0 108------------------ 109* BREAKING: `SwitchEntryStmt` is now `SwitchEntry`, because it was never a statement. 110* BREAKING: a case in a switch can now have multiple labels, 111so `SwitchEntry` no longer has an `Expression label`, 112but a `NodeList<Expression> label`. 113* This completes *parsing* support for Java 12. 114Symbol resolution is still to be done. 115 116[issues resolved](https://github.com/javaparser/javaparser/milestone/123?closed=1) 117 118Version 3.10.2 119------------------ 120[issues resolved](https://github.com/javaparser/javaparser/milestone/122?closed=1) 121 122Version 3.10.1 123------------------ 124[issues resolved](https://github.com/javaparser/javaparser/milestone/121?closed=1) 125 126Version 3.10.0 127------------------ 128* slightly breaking: besides `break;` and `break [label];` there is now `break [expression];` like 129`break 1+2;` or `break "bye!";` . That means that `BreakStmt` no longer has a `label`, 130it has a `value` which is of type `Expression`. 131This is to prepare for Java 12 switch expressions. 132You can find the details in the Javadoc. 133 134[issues resolved](https://github.com/javaparser/javaparser/milestone/120?closed=1) 135 136Version 3.9.1 137------------------ 138[issues resolved](https://github.com/javaparser/javaparser/milestone/119?closed=1) 139 140Version 3.9.0 141------------------ 142* MAJOR BREAKAGE: modifiers (like public, static, transient) used to be a special case: 143they were enums stored in an EnumSet. 144This meant they were not true `Node`s, had to be treated in a special way, and missed some information. 145This has now been corrected in [PR 1975](https://github.com/javaparser/javaparser/pull/1975). 146 147[issues resolved](https://github.com/javaparser/javaparser/milestone/118?closed=1) 148 149Version 3.8.3 150------------------ 151[issues resolved](https://github.com/javaparser/javaparser/milestone/117?closed=1) 152 153Version 3.8.2 154------------------ 155* slightly breaking: `ObjectCreationExpr` no longer gets a diamond when constructed with the default constructor. 156 157[issues resolved](https://github.com/javaparser/javaparser/milestone/116?closed=1) 158 159Version 3.8.1 160------------------ 161[issues resolved](https://github.com/javaparser/javaparser/milestone/114?closed=1) 162 163Version 3.8.0 164------------------ 165* A Unicode preprocessing filter is now available again. 166 167[issues resolved](https://github.com/javaparser/javaparser/milestone/113?closed=1) 168 169Version 3.7.1 170------------------ 171* slightly breaking: the enum constants in JsonToken are now capitalized. 172* slightly breaking: [some obscure methods in the symbol solver changed](https://github.com/javaparser/javaparser/pull/1922) 173 174[issues resolved](https://github.com/javaparser/javaparser/milestone/115?closed=1) 175 176Version 3.7.0 177------------------ 178* BREAKING: `ForeachStmt` is now correctly capitalized: `ForEachStmt` 179* BREAKING: when using modules, everything that was called `...Statement` is now correctly called `...Directive` 180 181[issues resolved](https://github.com/javaparser/javaparser/milestone/112?closed=1) 182 183Version 3.6.27 184------------------ 185* The Json serialization now serializes more fields, 186which *should* not impact existing code. 187 188[issues resolved](https://github.com/javaparser/javaparser/milestone/111?closed=1) 189 190Version 3.6.26 191------------------ 192* BREAKING: Node.getData now throws an exception if the data was not set before. 193This can be rewritten by checking with Node.containsData before doing getData. 194 195[issues resolved](https://github.com/javaparser/javaparser/milestone/110?closed=1) 196 197Version 3.6.25 198------------------ 199[issues resolved](https://github.com/javaparser/javaparser/milestone/109?closed=1) 200 201Version 3.6.24 202------------------ 203* `findAncestor(type, predicate)` is now available 204 205[issues resolved](https://github.com/javaparser/javaparser/milestone/108?closed=1) 206 207Version 3.6.23 208------------------ 209[issues resolved](https://github.com/javaparser/javaparser/milestone/107?closed=1) 210 211Version 3.6.22 212------------------ 213[issues resolved](https://github.com/javaparser/javaparser/milestone/106?closed=1) 214 215Version 3.6.21 216------------------ 217[issues resolved](https://github.com/javaparser/javaparser/milestone/105?closed=1) 218 219Version 3.6.20 220------------------ 221[issues resolved](https://github.com/javaparser/javaparser/milestone/104?closed=1) 222 223Version 3.6.19 224------------------ 225[issues resolved](https://github.com/javaparser/javaparser/milestone/103?closed=1) 226 227Version 3.6.18 228------------------ 229* Parsing Java 11 is now supported. 230* Running on Java 11 is now supported. 231* Building on JDK 11 is NOT yet supported. 232 233[issues resolved](https://github.com/javaparser/javaparser/milestone/101?closed=1) 234 235Version 3.6.17 236------------------ 237* A new artifact was added: javaparser-core-serialization. 238It contains a JSON serializer, and might get more serializers in the future. 239 240[issues resolved](https://github.com/javaparser/javaparser/milestone/100?closed=1) 241 242Version 3.6.16 243------------------ 244* BREAKING: some parts of the module syntax used `Type` where they should have used `Name`. 245This is now fixed, but your code may need to be adapted if you are parsing modules. 246 247[issues resolved](https://github.com/javaparser/javaparser/milestone/99?closed=1) 248 249Version 3.6.15 250------------------ 251[issues resolved](https://github.com/javaparser/javaparser/milestone/98?closed=1) 252 253Version 3.6.14 254------------------ 255[issues resolved](https://github.com/javaparser/javaparser/milestone/97?closed=1) 256 257Version 3.6.13 258------------------ 259[issues resolved](https://github.com/javaparser/javaparser/milestone/96?closed=1) 260* JavaParserFacade.getType now can also handle NameExpr referring to types 261while before they were not supported. 262See [issue #1491](https://github.com/javaparser/javaparser/issues/1491#issuecomment-403277963) 263 264Version 3.6.12 265------------------ 266[issues resolved](https://github.com/javaparser/javaparser/milestone/95?closed=1) 267 268Version 3.6.10 & Version 3.6.11 269------------------ 270* A mixup during the release put all the issues in the same milestone: 271 272[issues resolved](https://github.com/javaparser/javaparser/milestone/94?closed=1) 273 274Version 3.6.9 275------------------ 276[issues resolved](https://github.com/javaparser/javaparser/milestone/93?closed=1) 277 278Version 3.6.8 279------------------ 280[issues resolved](https://github.com/javaparser/javaparser/milestone/92?closed=1) 281* Intellij Idea project files were deleted from the repository, 282so if you have a clone of the JP source, your local files will be deleted as well. 283Save anything you want to keep. 284 285Version 3.6.7 286------------------ 287[issues resolved](https://github.com/javaparser/javaparser/milestone/91?closed=1) 288 289Version 3.6.6 290------------------ 291[issues resolved](https://github.com/javaparser/javaparser/milestone/90?closed=1) 292* You can now configure the parser inside JavaParserTypeSolver. 293 294Version 3.6.5 295------------------ 296[issues resolved](https://github.com/javaparser/javaparser/milestone/89?closed=1) 297* Be aware of annotations or indents looking slightly different when output! 298 299Version 3.6.4 300------------------ 301[issues resolved](https://github.com/javaparser/javaparser/milestone/88?closed=1) 302 303Version 3.6.3 304------------------ 305[issues resolved](https://github.com/javaparser/javaparser/milestone/87?closed=1) 306 307Version 3.6.2 308------------------ 309[issues resolved](https://github.com/javaparser/javaparser/milestone/86?closed=1) 310 311Version 3.6.1 312------------------ 313[issues resolved](https://github.com/javaparser/javaparser/milestone/85?closed=1) 314* BREAKING: `SymbolSolverQuickSetup` has been removed in favor of `ProjectRoot` and `SymbolSolverCollectionStrategy`. 315 316Version 3.6.0 317------------------ 318[issues resolved](https://github.com/javaparser/javaparser/milestone/84?closed=1) 319* @daanschipper added `ProjectRoot` which is used for analysing and storing project structure. 320* Upgraded version from 3.5.20 to 3.6.0 because people got tired of seeing 3.5. 321 322Version 3.5.20 323------------------ 324[issues resolved](https://github.com/javaparser/javaparser/milestone/83?closed=1) 325* Thanks to @daanschipper for the PR :-) 326 327Version 3.5.19 328------------------ 329[issues resolved](https://github.com/javaparser/javaparser/milestone/82?closed=1) 330 331Version 3.5.18 332------------------ 333[issues resolved](https://github.com/javaparser/javaparser/milestone/81?closed=1) 334 335Version 3.5.17 336------------------ 337[issues resolved](https://github.com/javaparser/javaparser/milestone/80?closed=1) 338 339Version 3.5.16 340------------------ 341[issues resolved](https://github.com/javaparser/javaparser/milestone/79?closed=1) 342 343Version 3.5.15 344------------------ 345[issues resolved](https://github.com/javaparser/javaparser/milestone/78?closed=1) 346* Java 10 support is complete. 347* BREAKING: Java language level support has changed to make Java 10 support possible. 348[Here's a little article about it](https://matozoid.github.io/2017/04/11/enable-java-9-support.html) 349 350Version 3.5.14 351------------------ 352[issues resolved](https://github.com/javaparser/javaparser/milestone/77?closed=1) 353* Java 10's `var` can now be parsed and will be turned into a `VarType` node. 354It can not be resolved yet. 355* `NodeList` now has a pretty complete set of `...First` and `...Last` methods. 356Thanks stephenramthun ! 357 358Version 3.5.13 359------------------ 360[issues resolved](https://github.com/javaparser/javaparser/milestone/76?closed=1) 361* The Javadoc parser has received a lot of attention. 362 363Version 3.5.12 364------------------ 365[issues resolved](https://github.com/javaparser/javaparser/milestone/75?closed=1) 366* Thanks to un0btanium for fixing the readme file! 367 368Version 3.5.11 369------------------ 370[issues resolved](https://github.com/javaparser/javaparser/milestone/74?closed=1) 371* BREAKING: `AssignExpr.Operator.AND` is now `AssignExpr.Operator.BINARY_AND`. 372* BREAKING: `AssignExpr.Operator.OR` is now `AssignExpr.Operator.BINARY_OR`. 373* `getPrimaryTypeName` and `getPrimaryType` give access to the type that has the same name as the file it came from. 374* Enums will now get their constants aligned vertically if there are more than five. 375* You can now convert between `AssignExpr.Operator` and `AssignExpr.Operator` if you like. 376 377Version 3.5.10 378------------------ 379[issues resolved](https://github.com/javaparser/javaparser/milestone/73?closed=1) 380* JavaSymbolSolver is now in the same project as JavaParser, meaning they get released together from now on. 381* LexicalPreservingPrinter has had a big speed optimization. 382 383Version 3.5.9 384------------------ 385[issues resolved](https://github.com/javaparser/javaparser/milestone/72?closed=1) 386* BREAKING: the very confusing constructor `NodeList(Node)` (which sets the parent) was removed. 387* To avoid using the int type for token kinds, use the new `JavaToken.Kind` enum. 388It can convert to and from the int kind. 389 390Version 3.5.8 391------------------ 392[issues resolved](https://github.com/javaparser/javaparser/milestone/71?closed=1) 393* the module name is now set to com.github.javaparser.core 394 395Version 3.5.7 396------------------ 397[issues resolved](https://github.com/javaparser/javaparser/milestone/70?closed=1) 398 399Version 3.5.6 400------------------ 401[issues resolved](https://github.com/javaparser/javaparser/milestone/69?closed=1) 402* `toSomeType()` methods have been added for many types that give more functional access to a subtype. 403* BETA: the below work on Java Symbol Solver is still ongoing. 404 405Version 3.5.5 406------------------ 407[issues resolved](https://github.com/javaparser/javaparser/milestone/68?closed=1) 408* SourceRoot is now silent by default - look at the Log class if you want to change that. 409* BETA: the below work on Java Symbol Solver is still ongoing. 410 411Version 3.5.4 412------------------ 413[issues resolved](https://github.com/javaparser/javaparser/milestone/67?closed=1) 414* BETA: the below work on Java Symbol Solver is still ongoing. 415 416Version 3.5.3 417------------------ 418[issues resolved](https://github.com/javaparser/javaparser/milestone/66?closed=1) 419* Unicode escapes (`\u1234`) are now retained in the AST, 420 but they are now only allowed in comments, string and character literals, and identifiers. 421* BETA: the below work on Java Symbol Solver is still ongoing. 422 423Version 3.5.2 424------------------ 425[issues resolved](https://github.com/javaparser/javaparser/milestone/65?closed=1) 426* The pretty printer now cleans up Javadoc comments. 427* BETA: the below work on Java Symbol Solver is still ongoing. 428 429Version 3.5.1 430------------------ 431[issues resolved](https://github.com/javaparser/javaparser/milestone/64?closed=1) 432* BETA: the below work on Java Symbol Solver is still ongoing. 433 434Version 3.5.0 435------------------ 436[issues resolved](https://github.com/javaparser/javaparser/milestone/63?closed=1) 437* A functional visitor API has been added. See [PR 1195](https://github.com/javaparser/javaparser/pull/1195) for now. 438* Build is working again on Windows thanks to Leonardo Herrera. 439* The pretty printer now has an option to order imports, also thanks to Leonardo Herrera. 440* Receiver parameters are now well-supported instead of being a hack. See [issue 1194](https://github.com/javaparser/javaparser/pull/1194) for a description. 441* BETA: the below work on Java Symbol Solver is still ongoing. 442 443Version 3.4.4 444------------------ 445[issues resolved](https://github.com/javaparser/javaparser/milestone/62?closed=1) 446* BETA: the below work on Java Symbol Solver is still ongoing. 447 448Version 3.4.3 449------------------ 450[issues resolved](https://github.com/javaparser/javaparser/milestone/61?closed=1) 451* BETA: we're still doing work to integrate parts of [Java Symbol Solver](https://github.com/javaparser/javasymbolsolver) to simplify its API. 452* `VisitorMap` is joined by `VisitorSet` and `VisitorList`, 453for when you want to store `Node`s in collection but don't want its default equals/hascode behaviour 454 455Version 3.4.2 456------------------ 457[issues resolved](https://github.com/javaparser/javaparser/milestone/60?closed=1) 458* BETA: we're doing work to integrate parts of [Java Symbol Solver](https://github.com/javaparser/javasymbolsolver) to simplify its API. 459* JDK 9 will compile JavaParser now. 460* [An official sample Maven setup](https://github.com/javaparser/javaparser-maven-sample) was added. 461 462Version 3.4.1 463------------------ 464[issues resolved](https://github.com/javaparser/javaparser/milestone/59?closed=1) 465* Two visitors were added: `NoCommentEqualsVisitor` and `NoCommentHashCodeVisitor` - 466as the name implies you can use these to compare nodes without considering comments. 467Thanks Ryan Beckett! 468* `isSomeType()` methods have been added for many types that help avoid `instanceof`. 469* `asSomeType()` methods have been added for many types that help avoid casting to that type. 470* `ifSomeType()` methods have been added for many types, giving a nice functional way of doing if-is-type-then-cast-to-type-then-use. 471* The `LexicalPreservingPrinter` had its API changed a little: setup and printing are now separate things, 472so you don't have to drag an instance of `LexicalPreservingPrinter` through your code anymore. 473* `traverseScope` was added to all nodes with a scope, so you can travel through the scope without tripping over (non-)optionality. 474 475 476Version 3.4.0 477------------------ 478[issues resolved](https://github.com/javaparser/javaparser/milestone/58?closed=1) 479* BREAKING: We missed a Java 9 feature which is now on board: try with resources can now refer to a resource declared outside of the statement. 480This means that the node type you get for those resources is now `Expression` instead of `VariableDeclarationExpr`. 481For Java 8 and below you can simply cast it to `VariableDeclarationExpr` again. 482See also the Javadoc for `TryStmt`. 483* You can now inspect the AST by exporting it to XML, JSON, YAML, or a Graphviz's dot diagram, thanks to Ryan Beckett! 484* `GenericVisitorWithDefaults` and `VoidVisitorWithDefaults` were added which function like empty visitors, 485but all the visit methods call a default method by default. 486* Annotation support was cleaned up, adding some obscure locations where you can have annotations. 487* `EnumDeclaration` regained its constructor builder methods. They were accidentally lost around 3.2.2. 488* `ArrayType` now has an `origin` field which indicates in which position the array brackets were found. 489 490Version 3.3.5 491------------------ 492[issues resolved](https://github.com/javaparser/javaparser/milestone/57?closed=1) 493 494Version 3.3.4 495------------------ 496[issues resolved](https://github.com/javaparser/javaparser/milestone/56?closed=1) 497* `SourceZip` has been added. 498Use it to read source code from jars or zip files. 499Thank you @ryan-beckett ! 500* JavaCC was upgraded to 7.0.2 501* A new option for the pretty printer was added. 502You can now wrap-and-column-align parameters of method calls. 503Thank you @tarilabs ! 504 505Version 3.3.3 506------------------ 507[issues resolved](https://github.com/javaparser/javaparser/milestone/55?closed=1) 508* Parsing a partial java file (like an expression or statement) no longer ignores trailing code. 509* New memory saving option: turn off token list. 510 511Version 3.3.2 512------------------ 513[issues resolved](https://github.com/javaparser/javaparser/milestone/54?closed=1) 514* `VisitorMap` lets you override hashcode/equals for nodes when used as a key for a map. 515 516Version 3.3.1 517------------------ 518[issues resolved](https://github.com/javaparser/javaparser/milestone/53?closed=1) 519* The token list is now mutable - see methods on `JavaToken`. 520This caused mild breakage - some fields have become `Optional`. 521 522Version 3.3.0 523------------------ 524[issues resolved](https://github.com/javaparser/javaparser/milestone/52?closed=1) 525* Breaking: `TryStmt::tryBlock` and `EnclosedExpr::inner` were optional for no good reason. Now they are required. 526* You can now ask a `JavaToken` for its category, which is useful for examining the token list or doing syntax highlighting or so. 527* `enum` and `strictfp` can now be used as identifiers on lower Java versions. 528 529Version 3.2.12 530------------------ 531[issues resolved](https://github.com/javaparser/javaparser/milestone/51?closed=1) 532 533Version 3.2.11 534------------------ 535[issues resolved](https://github.com/javaparser/javaparser/milestone/50?closed=1) 536* We're up to date with the latest Java 9 module system again. 537 538Version 3.2.10 539------------------ 540[issues resolved](https://github.com/javaparser/javaparser/milestone/49?closed=1) 541* `Node.replace(old, new)` was added, including property-specific `X.replaceY(newY)` methods 542 543Version 3.2.9 544------------------ 545Scrapped due to release problem. 546 547Version 3.2.8 548------------------ 549[issues resolved](https://github.com/javaparser/javaparser/milestone/48?closed=1) 550* Added `isInnerClass()` that checks if a `ClassOrInterfaceDeclaration` is an inner class (note: this is different from a nested class!) 551* @ryan-beckett contributed a huge [Eclipse setup guide](https://github.com/javaparser/javaparser/wiki/Eclipse-Project-Setup-Guide) 552 553Version 3.2.7 554------------------ 555[issues resolved](https://github.com/javaparser/javaparser/milestone/47?closed=1) 556* We now recover from some parse errors! [Here is an article](https://matozoid.github.io/2017/06/11/parse-error-recovery.html) 557 558Version 3.2.6 559------------------ 560[issues resolved](https://github.com/javaparser/javaparser/milestone/46?closed=1) 561* `EmptyMemberDeclaration` is gone! 562It was deprecated for a while because it it was in the AST, but doesn't have any meaning in a Java program. 563`EmptyStmt` was also deprecated, but that has been reverted. 564This node *does* have meaning. 565 566Version 3.2.5 567------------------ 568[issues resolved](https://github.com/javaparser/javaparser/milestone/45?closed=1) 569* `NodeWithCondition` was added on all nodes containing a condition. 570* Lots of work on improving lexical preservation. 571* If a file was parsed from a file system, you can now get path information etc. from `CompilationUnit` 572* API BREAKING: every node now points to its start and end token. 573Some of the API has started returning `TokenRange` instead of `Range` - you can call `toRange` to get the old object type. 574We may still change the naming of some of this code in the following month. 575 576Version 3.2.4 577------------------ 578New style changelog, no more issue numbers, but a link: 579[issues resolved](https://github.com/javaparser/javaparser/milestone/44?closed=1) 580and any notable changes: 581* the new method `Node.removeForced()` by removing it, or removing the first parent that is optional. 582This is different from `Node.remove()`, `remove()` only tries to remove the node from the parent and fails if it can't. 583* `FieldAccessExpr.scope` is now a required property. 584You might find some `get()`s in your code that are no longer necessary. 585* `ReferenceType` no longer has a type parameter, so every `ReferenceType<?>` can be replaced by `ReferenceType` now. 586 587Version 3.2.3 588------------------ 589* 907 906 905 903 911 910 909 908 smaller improvements and fixes 590 591Version 3.2.2 592------------------ 593Beta: `TreeStructureVisitor`. 594 595* 770 902 904 901 smaller improvements and fixes 596 597Version 3.2.1 598------------------ 599Beta: `TreeStructureVisitor`. 600 601* Maven dependencies were updated to their latest versions 602* 890 the concept of "method signature" now exists in JavaParser 603* 896 891 889 887 882 789 smaller improvements and fixes 604 605Version 3.2.0 606------------------ 607The lexical preservation code is stable! 608 609Beta: `TreeStructureVisitor`. 610 611* 885 884 879 878 smaller improvements and fixes 612 613Version 3.1.4 614------------------ 615This is the first version to parse Java 9. 616 617Beta: `TreeStructureVisitor`, and `LexicalPreservingPrinter`. 618 619* 872 873 874 787 Remaining Java 9 work. 620 621Version 3.1.3 622------------------ 623Beta: `TreeStructureVisitor`, and `LexicalPreservingPrinter`. 624 625A start has been made on source level support. The default level is Java 8. 626It can be set to Java 9 like this for a parser *instance*: 627```java 628private final JavaParser parser = new JavaParser(new ParserConfiguration().setValidator(new Java9Validator())); 629``` 630and like this for the static parse methods: 631```java 632QuickJavaParser.getConfiguration().setValidator(new Java9Validator()); 633``` 634 635* 862 552 "_" is an illegal identifier on source level 9. 636* 869 867 109 855 857 smaller improvements and fixes 637 638Version 3.1.2 639------------------ 640Beta: `TreeStructureVisitor`, `ConcreteSyntaxModel`, and `LexicalPreservingPrinter`. 641 642* 594 849 831 a validation framework was introduced to inform about problems in the AST without needing to change the grammar, 643and without requiring parsing code. 644It is open for extension by users. 645* 852 853 826 832 846 839 smaller improvements and fixes 646 647Version 3.1.1 648------------------ 649Beta: `TreeStructureVisitor`, `ConcreteSyntaxModel`, and `LexicalPreservingPrinter`. 650 651* 654 124 lexical preservation (printing source code with the same formatting it had when parsing) has been added. 652 Thank you @ftomassetti for a lot of work! 653* 554 800 first (big) step towards Java 9 support: JavaParser can read project Jigsaw module definitions. 654* 795 786 751 extend the TreeVisitor with more traversal options. Thanks @ryan-beckett! 655* 791 `GenericListVisitorAdapter` has been added which collects its results in a list. Thanks @Gottox! 656* 815 798 797 813 clean up Problem text 657* 819 818 817 816 441 809 808 807 fix various absurd annotation related issues. 658* 777 805 802 796 790 792 793 781 784 785 783 782 779 357 799 763 smaller improvements and fixes 659 660Version 3.1.0 661------------------ 662Beta: `TreeStructureVisitor` and `ConcreteSyntaxModel`. 663 664* 705 755 Add the concrete syntax model, which will give you information about the exact syntax a certain nodes matches. 665 666* 777 smaller improvements and fixes 667 668Version 3.1.0-beta.2 669------------------ 670This version is a beta because `TreeStructureVisitor` is not in its definite state yet. 671 672* 762 761 772 merge `javaparser-metamodel` and `javaparser-generator-utils` into `javaparser-core`. 673* 766 the `ModifierVisitor` is now created by a code generator. Its behaviour has been made logical, and may give different results than before. 674* 755 `ConstructorDeclaration` and `MethodDeclaration` now share a parent: `CallableDeclaration` 675* 687 759 773 769 768 767 765 759 smaller improvements and fixes 676 677Version 3.1.0-beta.1 678------------------ 679This version is a beta because there are a lot of new features that may still change. 680 681This version needs a minor version increase because of a backwards compatability issue: 682* 719 `getJavadoc`, `getJavadocComment` and `getComment` could return null. Our promise was to return `Optional`, so that is what they do now. 683 684New: 685* 658 718 736 737 we have created a metamodel. 686It gives information about the structure of the various AST nodes, as if you are introspecting them. 687You can find it in `javaparser-metamodel`, the main class is `JavaParserMetaModel` 688* 353 365 visitors are no longer hand made, they are now generated from the metamodel. This should make them 100% reliable. 689Affected visitors are: `GenericVisitorAdapter`, `EqualsVisitor`, `VoidVisitorAdapter`, `VoidVisitor`, `GenericVisitor`, `HashCodeVisitor`, `CloneVisitor`. 690 691If you want to generate your own visitors, you can use the `VisitorGenerator` class from `javaparser-core-generators` 692 693If you want to reuse the code generation utilities, look at module `javaparser-generator-utils` - there is a very useful `SourceRoot` class in there that takes away a lot of file management troubles. 694* 538 735 `TreeStructureVisitor` has been added, which should be considered beta. 695* 220 733 717 749 745 750 743 748 666 732 746 734 733 smaller improvements and fixes 696 697Version 3.0.1 698------------------ 699* 699 433 325 Javadoc can now be parsed 700* 703 696 added NodeWithOptionalScope 701* 702 FieldAccessExpr now implements NodeWithSimpleName, *which means that "field" has been renamed to "name"* 702* 707 706 improve range of array types and levels 703* 709 smaller improvements and fixes 704 705Version 3.0.0 706------------------ 707* 695 697 689 680 693 691 682 690 677 679 688 684 683 smaller improvements and fixes 708 709Version 3.0.0-RC.4 710------------------ 711* 668 669 TypeDeclarationStmt became LocalClassDeclarationStmt 712* 347 665 every node now has some documentation 713* 660 670 673 four types of import declaration have been merged back into the old ImportDeclaration 714* 659 The pretty printer can now take customized visitors 715* 650 671 672 674 524 smaller improvements and fixes 716 717Version 3.0.0-RC.3 718------------------ 719* 639 622 632 657 656 652 653 647 648 645 194 643 630 624 628 627 626 625 623 cleanups, small fixes, and general housekeeping 720 721Version 3.0.0-RC.2 722------------------ 723* 593 EmptyImportDeclaration and NonEmptyImportDeclaration have been removed 724* 612 VariableDeclaratorId has been removed. It has been substituted by "SimpleName name" 725* 614 617 the list of tokens has been linearized and simplified 726* 615 support for arrays has once more been changed. See [the issue](https://github.com/javaparser/javaparser/issues/592) 727* 580 453 380 618 580 611 610 424 608 smaller improvements and fixes 728 729Version 3.0.0-RC.1 730------------------ 731* 499 601 renames many fields to be more consistent 732* 596 605 602 604 smaller improvements and fixes 733 734Version 3.0.0-alpha.11 735------------------ 736* 547 595 Node.range is now using Optional instead of Range.UNKNOWN 737* 584 588 548 585 bug fixes and improvements 738 739Version 3.0.0-alpha.10 740------------------ 741* 578 579 577 575 290 570 568 567 562 564 551 bug fixes and improvements 742 743Version 3.0.0-alpha.9 744------------------ 745* 403 358 549 Make all names nodes: either SimpleName or Name. This makes every name in the AST visitable. NameExpr is now a wrapper to use SimpleName in an expression. 746* 516 536 use Optional<> for return values. 747* 556 557 558 550 small improvements and fixes. 748* 560 559 make nodes observable. 749 750Version 3.0.0-alpha.8 751------------------ 752* 344 529 turn DumpVisitor into an official PrettyPrinter 753* 532 508 427 530 531 513 528 cleanups 754 755Version 3.0.0-alpha.7 756------------------ 757* 515 roll back attempt at using Optional 758* 522 504 make NodeList not a Node (restores parent/children behaviour to before alpha.4) 759* 527 526 rename getChildrenNodes to getChildNodes 760* 525 495 520 bug fix 761 762Version 3.0.0-alpha.6 763------------------ 764* 503 modified ImportDeclaration hierarchy to have getters for static and "asterisk" again 765* 506 bug fix 766 767Version 3.0.0-alpha.5 768------------------ 769* 451 null is no longer allowed in the AST. [See last post in issue](https://github.com/javaparser/javaparser/issues/451) 770* 501 421 420 316 use a special type of list for nodes: NodeList. [See last post in issue](https://github.com/javaparser/javaparser/issues/421) 771 772Version 3.0.0-alpha.4 773------------------ 774* 463 471 nodes can now be removed easily 775* 491 import handling changed. Instead of "ImportDeclaration", we now have the four types of import as described in the JLS. [See issue](https://github.com/javaparser/javaparser/pull/491) 776* 452 355 474 494 various improvements 777* 493 492 485 Simplify the JavaParser interface 778 779Version 3.0.0-alpha.3 780------------------ 781* 112 237 466 465 461 460 458 457 fundamentally changes how we deal with arrays. [It is explained in the last post here](https://github.com/javaparser/javaparser/issues/237) 782* 472 456 makes the "data" field on every node more structured. 783* 477 468 refactor TypeArguments. You will find that TypeArguments is no longer a type, it is just a list in some nodes. 784* 482 adds the "nodeTypes" packages to the osgi export. 785* 479 476 makes all setters on nodes return this so they become chainable. 786* 473 437 clean up CloneVisitor. 787 788Version 3.0.0-alpha.2 789------------------ 790* 157 a new parser frontend, check https://github.com/javaparser/javaparser/pull/447 for explanations 791* 435 more builder methods like 400 and 405 792* 111 440 443 444 445 446 bugs & cleanups 793 794Version 3.0.0-alpha.1 795------------------ 796* 400 405 introduce many "builder" style methods for constructing code. Thanks DeepSnowNeeL! 797* 409 remove ASTHelper (methods are now on specific Node subclasses) 798* 414 JavaParser can now be instantiated and reused. InstanceJavaParser removed 799* 418 417 411 408 bugs 800* 367 420 407 402 various cleanups 801 802Version 2.5.1 803------------- 804* 394 OSGi manifest added 805* 391 fix ModifierVisitor NullPointerException bug 806* 385 a few new parse methods 807* 386 fix dumping an empty import (a single ; after the package declaration) 808 809Version 2.5.0 810------------- 811API breaking changes: 812 813* 191: moved TreeVisitor to visitor package 814* 368, 162, 303, 302, 360: use correct type in some places. 815* 371: code is now compiled with Java 8 816* 342, 331: ModifierVisitorAdapter detects and removes broken nodes 817* 328, 270: upgrade JavaCC (use TokenMgrException now) 818Other changes: 819 820* 297: enable access to tokens. 821* 341, 361: node positions are now OO 822* 211, 373: escaping of \n \r for string literals 823* 336, 276, 141: JavaDoc support now works 824* 337, 281: reorganize the stream reading code 825* 343, 309, 332, 57: take advantage of common interfaces 826* 329, 326, 327: deal with platform issues 827* 163, 236, 252, 296, 269, 339, 321, 322, 252, 253, 293, 295: various fixes 828* 310, 311, 313, 301, 294: some code clean-ups 829 830Version 2.4.0 831------------- 832* several fixes in DumpVisitor for bugs due to lazy initialization 833* make TypeDeclaration implements DocumentableNode directly 834* TypedNode interface introduced 835* introduce MultiBoundType 836* refactored IntersectionType and UnionType 837* refactored CatchClause 838* parsing annotations in throws declarations 839* parse orphan semicolons in import statements 840* added PackageDeclaration.getPackageName 841* solved issue with newlines in string literals 842* fixed handling of UnknownType in EqualsVisitor 843* improvements to CommentsParser 844* removing old grammar 845 846Version 2.3.0 847------------- 848* ClassOrInterfaceType implements NamedNode 849* DumpVisitor can now be extended 850* Improved documentation 851* AST: lists are now lazy initialized 852 853Version 2.1.0 854------------- 855* Features 856 * [#75 performance improvement for `PositionUtils.sortByBeginPosition`](https://github.com/javaparser/javaparser/issues/75) 857 * [#64 In getDeclarationAsString parameter names should be optional](https://github.com/javaparser/javaparser/issues/64) 858* Bugfixes 859 * [#79 Fix NPE in `ConstructorDeclaration.getDeclarationAsString`](https://github.com/javaparser/javaparser/pull/79) 860 * [#86 Add missing functions to ModifierVisitorAdapter](https://github.com/javaparser/javaparser/pull/86) 861 * [#82 set LambdaExpr as parent of its child nodes](https://github.com/javaparser/javaparser/issues/82) 862 * [#87 implement `setJavadoc` and `getJavadoc` at various classes](https://github.com/javaparser/javaparser/issues/87) 863 * [#96 Fixed encoding issue in `Javaparser.parse`](https://github.com/javaparser/javaparser/pull/96) 864 * [#85 Casting a lambda expression causes a parsing failure](https://github.com/javaparser/javaparser/issues/85) 865 * [#88 `MethodReferenceExpr` and `TypeExpr` don't set themselves as parents](https://github.com/javaparser/javaparser/issues/88) 866* Internal 867 * [#89 CommentsParser.State contains unused fields](https://github.com/javaparser/javaparser/issues/89) 868 * Switched from drone.io to [Travis](https://travis-ci.org/javaparser/javaparser) 869 * [#105 Enforce compiling the library for a certain Java version](https://github.com/javaparser/javaparser/pull/105) 870 871[Code changes](https://github.com/javaparser/javaparser/compare/javaparser-parent-2.0.0...master) 872 873Version 2.0.0 874------------- 875* support Java 8 876 877Version 1.0.8 (2010-01-17) 878------------- 879* Fixed issues: 880 * Issue 17: A refactor suggestion for AnnotationExpr and its subclasses 881 * Issue 21: Java 5 JavaParser compiled JARs 882 * Issue 22: Please use java.lang.reflect.Modifier constants in japa.parser.ast.body.ModifierSet 883 * Issue 27: Implement the "equal" method 884 * Issue 30: equals and hashCode methods 885 886Version 1.0.7 (2009-04-12) 887------------- 888* Issue 19 fixed: 889* Tests changed to run with junit 4 890 891Version 1.0.6 (2009-01-11) 892------------- 893* Issue 11 fixed: changed method get/setPakage to get/setPackage in the class CompilationUnit 894* Created new visitor adapter to help AST modification: ModifierVisitorAdapter 895* Changed visitor adapters to abstract 896 897Version 1.0.5 (2008-10-26) 898------------- 899* Created simplified constructors in the nodes of the AST (without positional arguments) 900* Created ASTHelper class with some helpful methods (more methods are still needed) 901 902Version 1.0.4 (2008-10-07) 903------------- 904* Moved to javacc 4.1. 905* The java_1_5.jj can be build alone without compilation errors 906 907Version 1.0.3 (2008-09-06) 908------------- 909* Removed SuperMemberAccessExpr class, it was no longer used 910* Removed the methods get/setTypeArgs() from ArrayCreationExpr, this node shouldn't have these methods. 911* Fixed the bug with start/end position of the nodes IntegerLiteralMinValueExpr and LongLiteralMinValueExpr 912* The methods get/setAnnotations() from all BodyDeclaration subclasses were pushed down to BodyDeclaration class 913 914Version 1.0.2 (2008-07-20) 915------------- 916* Issue fixed: Issue 1: Add support for editing AST nodes or create new ones 917 918Version 1.0.1 (2008-07-01) 919------------- 920* Issue fixed: Issue 5: end line and end column equal to begin line and begin column 921 922Version 1.0.0 (2008-06-25) 923------------- 924* Changed version numbering, starting version 1.0.0 925* Javadoc done for packages: 926 * japa.parser 927 * japa.parser.ast 928* Corrected bug when parsing in multithread: 929 * JavaParser.setCacheParser(false) must be called before to use the parser concurrent 930 9312008-06-19 932------------- 933* No code changes, added binary distribution to download page 934 9352008-06-11 936------------- 937* Bug corrected: NPE in VoidVisitorAdapter 938 * http://code.google.com/p/javaparser/issues/detail?id=2 939 9402008-06-09 941------------- 942* Added Adapters for de visitors 943 9442008-05-28 945------------- 946* This project now is published at Google Code: 947 * http://code.google.com/p/javaparser/ 948 9492008-05-25 950------------- 951* Added support for comments and javadoc to the tree. 952 * Javadocs are stored directly to members (BodyDeclaration and all deriveds (classes, methods, fields, etc.)), accessible by the method getJavadoc(). 953 * All comments are stored in the CompilationUnit, accessible by the method getComments(). 954 9552008-04-01 956------------- 957* Changed all nodes public attributes to be private and created getters to access them 958* Changed the methods of the Node getLine e getColumn to getBeginLine and getBeginColumn 959* Added the methods getEndLine and getEndColumn to the Node class (works only in the BlockNode) 960 9612007-12-22 962------------- 963* Corrected ConditionalExpression bug 964 9652007-10-21 966------------- 967* Added LGPL License 968 9692007-10-21 970------------- 971* Bugs corrected: 972 * Created PackageDeclaration member of CompilationUnit to add suport for annotations in the package declaration 973 * Parameterized anonymous constructor invocation 974 * Explicit constructor invotation Type Arguments 975 * ctrl+z ("\u001A") ar end of compilation unit 976 9772007-10-09 978------------- 979* EnumConstantDeclaration annotation support corrected 980* Parssing Java Unicode escape characters suport added 981 9822007-10-03 983------------- 984* Bug corrected: "MotifComboPopup.this.super()" statement was generating parser error 985 9862007-10-01 987------------- 988* Bug corrected: Casting signed primitive values 989``` 990 double d = (double) -1; 991 ^ 992``` 9932007-08-06 994------------- 995* Bug with the single line comments in the final of the unit corrected 996 9972007-07-31 998------------- 999* Fixed the bug with the following expression: `Class c = (int.class);` 1000 10012007-06-26 1002------------- 1003* Bug fixes from Leon Poyyayil work 1004 * suport for hex floating point 1005 * unicode digits in indentifier 1006 * MemberValueArrayInitializer 1007 10082007-03-09 1009------------- 1010* Long and Integer literal MIN_VALUE bug 1011 10122007-02-24 1013------------- 1014* '\0' bug fixed 1015 10162007-02-01 1017------------- 1018* Many bug fixes 1019* Added line/column to nodes 1020