blob: 4adc1ca0436e0d95a46a627f9102b5766bd62c68 [file] [log] [blame] [view]
Nicholas Smithcd1296d2015-01-20 14:22:40 +00001# Java Parser and Abstract Syntax Tree.
matozoid2cab70d2013-09-16 13:31:33 +02002
Nicholas Smith26c753d2015-01-14 10:02:55 +00003This package contains a Java 1.8 Parser with AST generation and visitor support.
Nicholas Smithcd1296d2015-01-20 14:22:40 +00004
5The AST records the source code structure, javadoc and comments. It is also possible to change the AST nodes or create new ones to modify the source code.
matozoid2d4deca2011-10-30 14:35:59 +01006
Nicholas Smith26c753d2015-01-14 10:02:55 +00007[![Build Status](https://drone.io/github.com/javaparser/javaparser/status.png)](https://drone.io/github.com/javaparser/javaparser/latest)
8
Nicholas Smithcd1296d2015-01-20 14:22:40 +00009## Features
10
11* Light weight
12* Performant
13* Easy to use
14* Modifiable AST
15* Create AST from scratch
16* Support of comments
17
18## Dependency Management
19
20The project binaries are available in Maven Central. Just add the following to your maven configuration or taylor to your own dependency management system.
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010021
Nicholas Smith15a23ae2015-01-14 10:27:51 +000022Current 1.8 Release
23```xml
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010024<dependency>
Nicholas Smith26c753d2015-01-14 10:02:55 +000025 <groupId>com.github.javaparser</groupId>
26 <artifactId>javaparser-core</artifactId>
27 <version>2.0.0</version>
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010028</dependency>
Federico Tomassetti2051f042014-07-30 19:01:19 +010029```
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010030
Nicholas Smith15a23ae2015-01-14 10:27:51 +000031Final 1.7 Release
32```xml
33<dependency>
34 <groupId>com.google.code.javaparser</groupId>
35 <artifactId>javaparser</artifactId>
36 <version>1.0.11</version>
37</dependency>
38```
39
Nicholas Smithcd1296d2015-01-20 14:22:40 +000040## How To Compile Sources
Nicholas Smith15a23ae2015-01-14 10:27:51 +000041
Nicholas Smithcd1296d2015-01-20 14:22:40 +000042If you have checkout the project from GitHub you can build the project with maven using:
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010043
Federico Tomassetti2051f042014-07-30 19:01:19 +010044```
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010045mvn clean install
Federico Tomassetti2051f042014-07-30 19:01:19 +010046```
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010047
Nicholas Smithcd1296d2015-01-20 14:22:40 +000048If you checkout the sources and want to view the project in an IDE, it is best to at minimum to generate the additional source files. Otherwise you will get many complaints in the IDE
49
50```
51mvn javacc:javacc
52```
53
54## Manual
55
56Examples of how to use the library can be found on the [Manual](https://github.com/javaparser/javaparser/wiki/Manual) page of the wiki
57
Nicholas Smith26c753d2015-01-14 10:02:55 +000058## Troubleshooting
59
Nicholas Smithcd1296d2015-01-20 14:22:40 +000060In the first instance try the [wiki](https://github.com/javaparser/javaparser/wiki)
Nicholas Smith26c753d2015-01-14 10:02:55 +000061
62In the second instance please feel free to open an [issue](https://github.com/javaparser/javaparser/issues).
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010063
64## Javadoc
65
Nicholas Smithcd1296d2015-01-20 14:22:40 +000066The libraries javadoc can be found [here](http://javaparser.github.io/javaparser/javadoc-current/)
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010067
68## History
69
Nicholas Smith26c753d2015-01-14 10:02:55 +000070This parser is based on Sreenivasa Viswanadha's Java 1.5 parser.
matozoid2d4deca2011-10-30 14:35:59 +010071
Nicholas Smith26c753d2015-01-14 10:02:55 +000072The project was originally hosted at [Google Code](http://code.google.com/p/javaparser/), however support there dwindled.
73
74This repository aims to provide support for issues and add the new Java language features.
75
76## Licence
77
78Offered under the GNU GENERAL PUBLIC LICENSE that can be found [here](https://github.com/javaparser/javaparser/blob/master/COPYING)