When I am working with com.google.code.javaparser , I found that this parser have less documentation and creating new statements with this parser seems difficult. If I am wrong share the coding snippets to create method and VariableDeclarationExpr with this package.
Can anyone compare the difference between com.google.code.javaparser and com.github.javaparser.
<dependency>
<groupId>com.google.code.javaparser</groupId>
<artifactId>javaparser</artifactId>
<version>1.0.8</version>
</dependency>
and
<dependency>
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-symbol-solver-core</artifactId>
<version>3.22.1</version>
</dependency>
I found some useful coding examples for com.github.javaparser with their free ebook. But I find that there are less articles and documentation that discuss about creating new elements. One of such article that I found useful with code snippets that can be used to create code ,but this don't provide a sample program.
There are different versions of com.github.javaparser available, version: 3.22.1 . This version supports
import com.github.javaparser.StaticJavaParser
but this version is not supporting
import com.github.javaparser.ast.stmt.ForeachStmt
import com.github.javaparser.ast.stmt.SwitchEntryStmt
So I changed to Version 3.6.23 where I found
import com.github.javaparser.ast.stmt.ForeachStmt
import com.github.javaparser.ast.stmt.SwitchEntryStmt
are supporting but
import com.github.javaparser.StaticJavaParser
is not supported!
Can anyone share other resources that gives clear picture about creating code using com.github.javaparser with clear example to create method and VariableDeclarationExpr within the class.