JavaParser v3.1.0-beta.1 Release Notes
-
This version is a beta because there are a lot of new features that may still change.
This version needs a minor version increase because of a backwards compatability issue:
- 719
getJavadoc
,getJavadocComment
andgetComment
could return null. Our promise was to returnOptional
, so that is what they do now.
๐ New:
- 658 718 736 737 we have created a metamodel.
It gives information about the structure of the various AST nodes, as if you are introspecting them.
๐ You can find it in
javaparser-metamodel
, the main class isJavaParserMetaModel
- 353 365 visitors are no longer hand made, they are now generated from the metamodel. This should make them 100% reliable.
๐ฏ Affected visitors are:
GenericVisitorAdapter
,EqualsVisitor
,VoidVisitorAdapter
,VoidVisitor
,GenericVisitor
,HashCodeVisitor
,CloneVisitor
.
๐ If you want to generate your own visitors, you can use the
VisitorGenerator
class fromjavaparser-core-generators
๐ If you want to reuse the code generation utilities, look at module
javaparser-generator-utils
- there is a very usefulSourceRoot
class in there that takes away a lot of file management troubles.- 538 735
TreeStructureVisitor
has been added, which should be considered beta. - ๐ 220 733 717 749 745 750 743 748 666 732 746 734 733 smaller improvements and fixes
- 719