blob: 748249fbb82bad25c6f569e9223f5eec0f57b23a [file] [log] [blame] [view]
Nicholas Smith646793d2015-01-20 14:53:07 +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 Smith6270f6f2015-02-18 15:49:02 +00007[![Join the chat at https://gitter.im/javaparser/javaparser](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/javaparser/javaparser?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
8
Nicholas Smith26c753d2015-01-14 10:02:55 +00009[![Build Status](https://drone.io/github.com/javaparser/javaparser/status.png)](https://drone.io/github.com/javaparser/javaparser/latest)
10
Nicholas Smithcd1296d2015-01-20 14:22:40 +000011## Features
12
13* Light weight
14* Performant
15* Easy to use
16* Modifiable AST
17* Create AST from scratch
18* Support of comments
19
20## Dependency Management
21
22The 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 +010023
Nicholas Smith15a23ae2015-01-14 10:27:51 +000024Current 1.8 Release
25```xml
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010026<dependency>
Nicholas Smith26c753d2015-01-14 10:02:55 +000027 <groupId>com.github.javaparser</groupId>
28 <artifactId>javaparser-core</artifactId>
29 <version>2.0.0</version>
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010030</dependency>
Federico Tomassetti2051f042014-07-30 19:01:19 +010031```
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010032
Nicholas Smith15a23ae2015-01-14 10:27:51 +000033Final 1.7 Release
34```xml
35<dependency>
36 <groupId>com.google.code.javaparser</groupId>
37 <artifactId>javaparser</artifactId>
38 <version>1.0.11</version>
39</dependency>
40```
41
Nicholas Smithcd1296d2015-01-20 14:22:40 +000042## How To Compile Sources
Nicholas Smith15a23ae2015-01-14 10:27:51 +000043
Nicholas Smithcd1296d2015-01-20 14:22:40 +000044If you have checkout the project from GitHub you can build the project with maven using:
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010045
Federico Tomassetti2051f042014-07-30 19:01:19 +010046```
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010047mvn clean install
Federico Tomassetti2051f042014-07-30 19:01:19 +010048```
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010049
Nicholas Smith3e6e6202015-01-20 14:24:25 +000050If you checkout the sources and want to view the project in an IDE, it is best to generate the additional source files; otherwise you will get many compilation complaints in the IDE
Nicholas Smithcd1296d2015-01-20 14:22:40 +000051
52```
53mvn javacc:javacc
54```
55
56## Manual
57
58Examples of how to use the library can be found on the [Manual](https://github.com/javaparser/javaparser/wiki/Manual) page of the wiki
59
Nicholas Smith26c753d2015-01-14 10:02:55 +000060## Troubleshooting
61
Nicholas Smithcd1296d2015-01-20 14:22:40 +000062In the first instance try the [wiki](https://github.com/javaparser/javaparser/wiki)
Nicholas Smith26c753d2015-01-14 10:02:55 +000063
64In the second instance please feel free to open an [issue](https://github.com/javaparser/javaparser/issues).
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010065
66## Javadoc
67
Nicholas Smithcd1296d2015-01-20 14:22:40 +000068The libraries javadoc can be found [here](http://javaparser.github.io/javaparser/javadoc-current/)
Federico Tomassetticf8d7b12014-07-30 19:00:26 +010069
70## History
71
Nicholas Smith26c753d2015-01-14 10:02:55 +000072This parser is based on Sreenivasa Viswanadha's Java 1.5 parser.
matozoid2d4deca2011-10-30 14:35:59 +010073
Nicholas Smith26c753d2015-01-14 10:02:55 +000074The project was originally hosted at [Google Code](http://code.google.com/p/javaparser/), however support there dwindled.
75
76This repository aims to provide support for issues and add the new Java language features.
77
78## Licence
79
80Offered under the GNU GENERAL PUBLIC LICENSE that can be found [here](https://github.com/javaparser/javaparser/blob/master/COPYING)