-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
executable file
·422 lines (411 loc) · 18.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge" /><![endif]-->
<title>JavaParser - Home</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Place favicon.ico in the root directory -->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Poppins:100,300,400,700,900" rel="stylesheet">
<!-- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700,800" rel="stylesheet"> -->
<link href="https://fonts.googleapis.com/css?family=Caveat" rel="stylesheet">
<!-- themeforest:css -->
<link rel="stylesheet" href="css/aos.css">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/cookieconsent.min.css">
<link rel="stylesheet" href="css/fontawesome-all.css">
<link rel="stylesheet" href="css/helper.css">
<link rel="stylesheet" href="css/magnific-popup.css">
<link rel="stylesheet" href="css/odometer-theme-minimal.css">
<link rel="stylesheet" href="css/pe-icon-7-stroke.css">
<link rel="stylesheet" href="css/prettify.css">
<link rel="stylesheet" href="css/simplebar.css">
<link rel="stylesheet" href="css/smart_wizard.css">
<link rel="stylesheet" href="css/smart_wizard_theme_arrows.css">
<link rel="stylesheet" href="css/smart_wizard_theme_circles.css">
<link rel="stylesheet" href="css/smart_wizard_theme_dots.css">
<link rel="stylesheet" href="css/swiper.css">
<link rel="stylesheet" href="css/styles.css">
<!-- endinject -->
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Making stripe menu -->
<nav class="navbar navbar-expand-md main-nav navigation fixed-top sidebar-left">
<div class="container">
<button class="navbar-toggler" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/" class="navbar-brand">
<img src="img/jp-logo.png" alt="JavaParser" class="logo logo-sticky d-block d-md-none">
<img src="img/jp-logo-light.png" alt="JavaParser" class="logo d-none d-md-block">
</a>
<div class="collapse navbar-collapse ml-auto" id="main-navbar">
<div class="sidebar-brand">
<a href="index.html">
<img src="img/jp-logo.png" alt="JavaParser" class="logo">
</a>
</div>
<ul class="nav navbar-nav mr-auto">
<li class="nav-item d-md-none d-lg-block">
<a class="st-root-link nav-link" href="getting-started.html">Getting Started </a>
</li>
<li class="nav-item">
<a class="st-root-link nav-link" href="contributing.html">Contributing </a>
</li>
<li class="nav-item">
<a class="st-root-link nav-link" href="blog.html">Blog</a>
</li>
<li class="nav-item">
<a class="st-root-link nav-link" href="about.html">About</a>
</li>
<li class="st-nav-section st-nav-secondary nav-item">
</li>
</ul>
<nav class="nav navbar-nav ml-md-auto justify-content-center mt-4 mt-md-0 flex-row">
<a class="btn btn-rounded btn-outline mr-3 px-3" href="https://gitter.im/javaparser/javaparser" target="_blank">
<i class="fab fa-gitter d-none d-md-inline mr-md-0 mr-lg-2"></i>
<span class="d-md-none d-lg-inline">Chat</span>
</a>
<a class="btn btn-rounded btn-solid px-3" href="https://github.com/javaparser/javaparser" target="_blank">
<i class="fab fa-github d-none d-md-inline mr-md-0 mr-lg-2"></i>
<span class="d-md-none d-lg-inline">Download</span>
</a>
</nav>
</div>
</div>
</nav>
<main>
<!-- ./Page header -->
<header class="header section parallax image-background overlay gradient gradient-53 alpha-8 color-1" style="background-image: url('img/bg/panda-bg.jpg')">
<div class="container overflow-hidden">
<div class="row">
<div class="col-md-8">
<p class="lead bold">Welcome Developers!</p>
<h1 class="display-4 color-1 light">Tools for your Java code</h1>
<h1 class="color-1">
<span class="typed bold display-4 display-md-3"></span>
</h1>
<nav class="nav mt-5">
<a href="https://leanpub.com/javaparservisited" target="_blank" class="nav-link btn btn-rounded btn-success btn-1 btn-lg px-5 bold fab">Get the free book</a>
</nav>
</div>
</div>
</div>
</header>
<!-- ./ New Integration API -->
<section class="section bg-5">
<div class="container text-center pt-4 pb-7">
<p class="color-1">Explore the most common use cases for the JavaParser library</p>
</div>
</section>
<!-- ./Integration API -->
<section class="section mt-6n">
<div class="container pt-0">
<div class="shadow bg-1 p-4 rounded">
<div class="row gap-y text-center text-md-left">
<div class="col-md-4 py-4 px-5 d-flex flex-column b-md-r">
<!--<a href="javascript:;" class="color-5">-->
<h4 class="bold mr-3">Analyse</h4>
<!--</a>-->
<p class="mt-4">Write code that can traverse Java source and look for the patterns you are interested in.</p>
<!--<a href="javascript:;" class="d-block d-md-flex align-items-center mt-auto">Learn more-->
<!--<i class="fas fa-long-arrow-alt-right ml-3"></i>-->
<!--</a>-->
</div>
<div class="col-md-4 py-4 px-5 d-flex flex-column b-md-r">
<!--<a href="javascript:;" class="color-5">-->
<h4 class="bold mr-3">Transform</h4>
<!--</a>-->
<p class="mt-4">Build tools that can not just identify code patterns, but also has the ability to change them.</p>
<!--<a href="javascript:;" class="d-block d-md-flex align-items-center mt-auto">Learn more-->
<!--<i class="fas fa-long-arrow-alt-right ml-3"></i>-->
<!--</a>-->
</div>
<div class="col-md-4 py-4 px-5 d-flex flex-column">
<!--<a href="javascript:;" class="color-5">-->
<h4 class="bold mr-3">Generate</h4>
<!--</a>-->
<p class="mt-4">Be smart, don't spend time writing boiler plate, generate it!</p>
<!--<a href="javascript:;" class="d-block d-md-flex align-items-center mt-auto">Learn more-->
<!--<i class="fas fa-long-arrow-alt-right ml-3"></i>-->
<!--</a>-->
</div>
</div>
</div>
</div>
</section>
<!-- ./Counters -->
<section class="bg-1 edge bottom-right">
<div class="container">
<div class="row align-items-center text-center text-lg-left">
<div class="col-12 col-md-7 col-lg-6 mr-lg-auto text-center text-md-left">
<p class="small accent bold">Amazing stats</p>
<h2 class="bold">The most popular parser for the Java language</h2>
<p class="color-2">When choosing open source technologies it is important to know your choice will be rewarded by continuous support. The JavaParser community is vibrant and active, with a frequent release cadence that supports language features up to Java 21.</p>
</div>
<div class="col-12 col-md-5 col-lg-5">
<div class="row no-gutters">
<div class="col-6 mb-3 pr-3">
<div class="rounded shadow-box shadow-hover p-2 p-sm-3 d-flex align-items-center flex-wrap bg-1">
<i class="fas fa-star pe-2x mr-4 color-2"></i>
<div class="text-left">
<!-- Updated from: https://github.com/javaparser/javaparser/stargazers -->
<p class="counter font-md bold m-0 color-4">5,437</p>
<p class="m-0">Stars</p>
</div>
</div>
</div>
<div class="col-6 mb-3">
<div class="rounded shadow-box shadow-hover p-2 p-sm-3 d-flex align-items-center flex-wrap bg-1">
<i class="fas fa-code-branch pe-2x mr-4 color-2"></i>
<div class="text-left">
<p class="counter font-md bold m-0 color-4">1,158</p>
<p class="m-0">Forks</p>
</div>
</div>
</div>
<div class="col-6 pr-3">
<div class="rounded shadow-box shadow-hover p-2 p-sm-3 d-flex align-items-center flex-wrap bg-1">
<i class="fas fa-project-diagram pe-2x mr-4 color-2"></i>
<div class="text-left">
<!-- Updated from: https://github.com/javaparser/javaparser/network/dependents?package_id=UGFja2FnZS0xODEzNjkyNzc%3D -->
<p class="counter font-md bold m-0 color-4">5,072</p>
<p class="m-0">Dependants</p>
</div>
</div>
</div>
<div class="col-6">
<div class="rounded shadow-box shadow-hover p-2 p-sm-3 d-flex align-items-center flex-wrap bg-3 color-1">
<i class="fab fa-leanpub pe-2x mr-4 op-7"></i>
<div class="text-left">
<!-- Updated from: https://leanpub.com/javaparservisited -->
<p class="counter font-md bold m-0">17,160</p>
<p class="m-0">Readers</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- ./Bring to life - Swiper -->
<section class="section bg-6">
<div class="container bring-to-front">
<div class="row gap-y align-items-center">
<div class="col-md-6">
<div class="rounded shadow-box bg-1 mt-3">
<div class="media align-items-center px-3">
<i class="fas fa-balance-scale pe-3x accent mr-3"></i>
<div class="media-body my-3 pl-3 b-l">
<p class="bold my-0">Business friendly license</p>
<p class="my-0 color-2">Available either under either the terms of the LGPL or Apache Licenses.</p>
</div>
</div>
</div>
<div class="rounded shadow-box bg-1 mt-3">
<div class="media align-items-center px-3">
<i class="fab fa-gitter pe-3x accent mr-3"></i>
<div class="media-body my-3 pl-3 b-l">
<p class="bold my-0">Active Community</p>
<p class="my-0 color-2">An awesome community of approachable developers over on Gitter</p>
</div>
</div>
</div>
</div>
<div class="col-md-6 ml-md-auto text-center text-md-left">
<p class="badge badge-info text-uppercase">Simple and lightweight</p>
<h2>Bring your source code to life</h2>
<p class="color-2">Our goal is to build a simple and lightweight set of tools to analyze, transform and generate Java code.</p>
<hr>
</div>
</div>
</div>
</section>
<!-- ./Developers - Code snippets -->
<section class="section b-b b-t bg-6">
<div class="container">
<div class="shape-wrapper">
<img src="img/shps/shape-2.svg" class="shape-right" alt="...">
</div>
<div class="section-heading text-center">
<i class="pe pe-7s-box2 accent pe-3x"></i>
<h2>Quick Start</h2>
<p class="lead color-2">The JavaParser library provides you with an Abstract Syntax Tree of your Java code. The AST structure then allows you to work with your Java code in an easy programmatic way.</p>
</div>
<div class="row">
<div class="col-md-4 col-lg-3 ml-lg-auto order-md-2">
<nav id="sw-nav-developers" class="nav flex-md-column justify-content-between justify-content-md-start nav-pills nav-pills-light nav-fill">
<a class="nav-item nav-link bold text-md-left active" href="#" data-step="1">
<i class="icon fas fa-code"></i> Add Dependency</a>
<a class="nav-item nav-link bold text-md-left" href="#" data-step="2">
<i class="icon fas fa-cogs"></i> Parse</a>
<a class="nav-item nav-link bold text-md-left" href="#" data-step="3">
<i class="icon fas fa-search fa-rotate-90"></i> Analyse</a>
<a class="nav-item nav-link bold text-md-left" href="#" data-step="4">
<i class="icon fas fa-pencil-ruler"></i> Transform</a>
<a class="nav-item nav-link bold text-md-left" href="#" data-step="5">
<i class="icon fas fa-magic"></i> Generate</a>
</nav>
<hr class="mt-5">
</div>
<div class="col-md-8">
<div class="swiper-container mt-4 mt-md-0" data-sw-navigation="#sw-nav-developers">
<div class="swiper-wrapper">
<div class="swiper-slide"><pre class="prettyprint lang-html linenums=10">
<!-- Add the following dependency to your pom.xml, -->
<!-- replacing LATEST with specific version as required -->
<dependency>
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-symbol-solver-core</artifactId>
<version>LATEST</version>
</dependency>
</pre></div>
<div class="swiper-slide"><pre class="prettyprint lang-js linenums">
// Create a Java object representation of your code
CompilationUnit compilationUnit
= StaticJavaParser.parse("class A { }");
Optional<ClassOrInterfaceDeclaration> classA
= compilationUnit.getClassByName("A");
</pre></div>
<div class="swiper-slide"><pre class="prettyprint lang-js linenums">
// Look for fields which are public and not static
compilationUnit.findAll(FieldDeclaration.class).stream()
.filter(f -> f.isPublic() && !f.isStatic())
.forEach(f -> System.out.println("Check field at line " +
f.getRange().map(r -> r.begin.line).orElse(-1)));
</pre></div>
<div class="swiper-slide"><pre class="prettyprint lang-js linenums">
// Ensure all abstract classes have a name starting with Abstract
compilationUnit.findAll(ClassOrInterfaceDeclaration.class).stream()
.filter(c -> !c.isInterface()
&& c.isAbstract()
&& !c.getNameAsString().startsWith("Abstract"))
.forEach(c -> {
String from = c.getNameAsString();
String to = "Abstract" + from;
System.out.println("Renaming class " + from + " into " + to);
c.setName(to);
});
</pre></div>
<div class="swiper-slide"><pre class="prettyprint lang-js linenums">
// Create source code on the fly
CompilationUnit compilationUnit = new CompilationUnit();
ClassOrInterfaceDeclaration myClass = compilationUnit
.addClass("MyClass")
.setPublic(true);
myClass.addField(int.class, "A_CONSTANT", PUBLIC, STATIC);
myClass.addField(String.class, "name", PRIVATE);
String code = myClass.toString();
</pre></div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- ./Join - As Developer/Designer -->
<section class="section bg-6">
<div class="container bring-to-front py-0">
<div class="shadow bg-1 p-5 rounded">
<div class="row gap-y align-items-center text-center text-lg-left">
<div class="col-12 col-md-6 py-4 px-5 b-md-r">
<i class="pe pe-7s-diamond pe-3x color-3"></i>
<a href="contributing.html" class="mt-4 color-3 d-flex align-items-center">
<h4 class="mr-3">Join as Contributor</h4>
<i class="fas fa-long-arrow-alt-right"></i>
</a>
<p class="mt-4">JavaParser is an open-source project built by amazing volunteers. We are always looking for new contributors and will support you throughout the process.</p>
</div>
<div class="col-12 col-md-6 py-4 px-5">
<i class="pe pe-7s-cash pe-3x color-4"></i>
<a href="https://leanpub.com/javaparservisited" class="mt-4 color-4 d-flex align-items-center">
<h4 class="mr-3">Donate</h4>
<i class="fas fa-long-arrow-alt-right"></i>
</a>
<p class="mt-4">The best way to help the JavaParser community is to become a contributor; however if you would like to show your support in another way, please consider a purchase of our book.</p>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- ./Footer - Four Columns -->
<footer class="site-footer section">
<div class="container pb-3">
<div class="row gap-y text-center text-md-left">
<div class="col-md-4 mr-auto">
<img src="img/jp-logo.png" alt="" class="logo">
<p>JavaParser : Analyse, transform and generate your Java codebase</p>
</div>
<div class="col-md-2">
<h6 class="py-2 bold">Consulting</h6>
<nav class="nav flex-column">
<a class="nav-item py-2" href="https://strumenta.com" target="_blank">Strumenta</a>
<a class="nav-item py-2" href="https://wyrdnine.co.uk" target="_blank">WyrdNine</a>
</nav>
</div>
<div class="col-md-2">
<h6 class="py-2 bold">Products</h6>
<nav class="nav flex-column">
<a class="nav-item py-2" href="https://leanpub.com/javaparservisited" target="_blank">JavaParser: Visited</a>
</nav>
</div>
<div class="col-md-2">
<h6 class="py-2 bold">Channels</h6>
<nav class="nav flex-column">
<a class="nav-item py-2" href="https://gitter.im/javaparser/javaparser" target="_blank">Gitter</a>
<a class="nav-item py-2" href="https://twitter.com/matozoid">Twitter</a>
</nav>
</div>
</div>
<hr class="mt-5">
<div class="row small align-items-center">
<div class="col-md-4">
<p class="mt-2 mb-md-0 color-2 text-center text-md-left">© 2019 JavaParser.org | All Rights Reserved</p>
</div>
</div>
</div>
</footer>
<!-- themeforest:js -->
<script src="js/01.cookie-consent-util.js"></script>
<script src="js/02.1.cookie-consent-themes.js"></script>
<script src="js/02.2.cookie-consent-custom-css.js"></script>
<script src="js/02.3.cookie-consent-informational.js"></script>
<script src="js/02.4.cookie-consent-opt-out.js"></script>
<script src="js/02.5.cookie-consent-opt-in.js"></script>
<script src="js/02.6.cookie-consent-location.js"></script>
<script src="js/jquery.js"></script>
<script src="js/jquery.animatebar.js"></script>
<script src="js/odometer.min.js"></script>
<script src="js/simplebar.js"></script>
<script src="js/swiper.js"></script>
<script src="js/popper.js"></script>
<script src="js/jquery.easing.min.js"></script>
<script src="js/jquery.validate.js"></script>
<script src="js/jquery.smartWizard.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.waypoints.js"></script>
<script src="js/jquery.counterup.js"></script>
<script src="js/modernizr-2.8.3.min.js"></script>
<script src="js/aos.js"></script>
<script src="js/particles.js"></script>
<script src="js/typed.js"></script>
<script src="js/prettify.js"></script>
<script src="js/jquery.magnific-popup.js"></script>
<script src="js/cookieconsent.min.js"></script>
<script src="js/common-script.js"></script>
<script src="js/forms.js"></script>
<script src="js/site.js"></script>
<script src="js/stripe-menu.js"></script>
<!-- endinject -->
</body>
</html>