javalang-compiler

Library of compiler components to processs Java code.

Лицензия

Лицензия

Группа

Группа

org.walkmod
Идентификатор

Идентификатор

javalang-compiler
Последняя версия

Последняя версия

2.3.10
Дата

Дата

Тип

Тип

jar
Описание

Описание

javalang-compiler
Library of compiler components to processs Java code.
Ссылка на сайт

Ссылка на сайт

https://github.com/rpau/javalang-compiler
Система контроля версий

Система контроля версий

https://github.com/rpau/javalang-compiler.git

Скачать javalang-compiler

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.walkmod/javalang-compiler/ -->
<dependency>
    <groupId>org.walkmod</groupId>
    <artifactId>javalang-compiler</artifactId>
    <version>2.3.10</version>
</dependency>
// https://jarcasting.com/artifacts/org.walkmod/javalang-compiler/
implementation 'org.walkmod:javalang-compiler:2.3.10'
// https://jarcasting.com/artifacts/org.walkmod/javalang-compiler/
implementation ("org.walkmod:javalang-compiler:2.3.10")
'org.walkmod:javalang-compiler:jar:2.3.10'
<dependency org="org.walkmod" name="javalang-compiler" rev="2.3.10">
  <artifact name="javalang-compiler" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.walkmod', module='javalang-compiler', version='2.3.10')
)
libraryDependencies += "org.walkmod" % "javalang-compiler" % "2.3.10"
[org.walkmod/javalang-compiler "2.3.10"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.walkmod : javalang jar [4.1.0, 5.0.0)
log4j : log4j jar 1.2.16

provided (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

test (1)

Идентификатор библиотеки Тип Версия
org.assertj : assertj-core jar 2.6.0

Модули Проекта

Данный проект не имеет модулей.

javalang-compiler: Symbol and type resolution for Javalang

Build Status Coverage Status

Java 8 semantic analysis for the javalang project. Therefore, the Java 8 AST is enriched with data calculated during the semantic analysis. Mainly, the calculated data is:

  • Symbols data types: In other words, what are the Java runtime classes, fields and methods that a given type or expression is referencing. For example, if the AST contains a MethodCallExpr node, the method getSymbolData() of this node returns the java.lang.Method that this node is referencing.

  • Definitions and usages: For those nodes that are subclass of SymbolDefinition (e.g declarations), the nodes contain which external references(getBodyReferences()) they have and which nodes reference them inside the same compilation unit (getUsages()).

License

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.

Usage

If you are interested in creating a new walkmod plugin for Java code that requires this kind of information, you must add the following steps:

  1. Add the following dependency in your project.

<dependency>
    <groupId>org.walkmod</groupId>
    <artifactId>javalang-compiler</artifactId>
    <version>{last-version}</version>
</dependency>
  1. Annotate your code transformations (visitors) with the @RequiresSemanticAnalysis annotation. Walkmod (specifically the walkmod-javalang-plugin), will automatically run the org.walkmod.javalang.compiler.symbols.SymbolVisitorAdapter to enrich the nodes.

  2. Add a walkmod plugin in your walkmod.xml file that resolves your classpath and compiles your code (e.g walkmod-maven-plugin)

Contributing

If you want to hack on this, fork it, improve it and send me a pull request.

To get started using it, just clone it and call mvn install.

Версии библиотеки

Версия
2.3.10
2.3.9
2.3.8
2.3.7
2.3.6
2.3.5
2.3.3
2.3.2
2.3.1
2.3.0
2.2.12
2.2.11
2.2.10
2.2.9
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.1
2.1.0
2.0.1
2.0
1.0.2
1.0.1
1.0