awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
javaparser avatar

javaparser/javaparser

0
View on GitHub↗
6,053 stars·1,227 forks·Java·other·18 viewsjavaparser.org↗

Javaparser

JavaParser is a library that parses Java source code up to version 12 into an Abstract Syntax Tree (AST), enabling programmatic analysis, transformation, and generation of Java code. It serves as a parser, code analyzer, code generator, comment parser, and symbol resolver, providing a unified toolkit for working with Java source at the AST level.

The library distinguishes itself through several integrated capabilities that go beyond basic parsing. It includes a symbol resolution engine that resolves type and symbol references across files for accurate semantic analysis, and an error-recovery parser that continues producing a partial AST even after encountering syntax errors. A lexical preservation layer retains original whitespace, comments, and formatting when modifying the AST and regenerating source code, while comment-aware AST association attaches extracted comments to corresponding nodes for documentation or analysis. The visitor-pattern tree traversal enables inspection or transformation of nodes without manual recursion, and the cross-file analysis pipeline processes all source files in a project at once for bulk operations and inter-file pattern detection.

The library supports analyzing Java source code to find patterns of interest, inspecting specific AST nodes, traversing and manipulating ASTs, transforming code by identifying and modifying patterns, and generating Java source code by building an AST from scratch. It also handles parsing Java comments and recovering from parse errors, with the ability to preserve lexical formatting throughout transformations.

Features

  • Java Source Code Analyzers - Traverses parsed Java source code to find patterns of interest, such as specific field declarations or class structures.
  • Java Parsers - Parses Java source code up to version 12 into an Abstract Syntax Tree for analysis and manipulation.
  • Symbol Resolution - Resolves type and symbol references in Java source using a built-in solver for accurate semantic analysis.
  • Java Symbol Resolvers - Resolves type and symbol references in Java source code using a symbol solver for accurate semantic analysis across files.
  • AST-to-Source Generators - Builds Java source by constructing an AST in memory and rendering it to text.
  • Java Symbol Resolvers - Resolves type and symbol references in Java source using a symbol solver for accurate semantic analysis.
  • Format-Preserving Printing - Retains original whitespace, comments, and formatting when modifying the AST and regenerating source code.
  • Java Code Generators - Generates Java source code programmatically by building an AST from scratch and rendering it as text.
  • Java Parsers - Parses Java source code up to version 12 into an Abstract Syntax Tree for analysis and manipulation.
  • Java Source Code Analyzers - Parses Java source code into an AST to inspect, query, and analyze code structure, patterns, and comments.
  • Source Code Transformation Engines - Identifies code patterns in parsed Java source and programmatically modifies them, for example renaming classes.
  • Java Source Code Transformers - Programmatically modifies parsed Java source code by traversing and editing the AST with lexical formatting preservation.
  • Source Code Generators - Creates Java source code programmatically by building an Abstract Syntax Tree from scratch and rendering it as text.
  • Abstract Syntax Tree Tools - Traverses and modifies the Abstract Syntax Tree of parsed Java code to support programmatic refactoring or analysis.
  • AST Traversal Engines - Walks and modifies the Abstract Syntax Tree of parsed Java code to support programmatic refactoring or analysis.
  • AST Visitor Patterns - Walks the AST using the Visitor design pattern to inspect or transform nodes without manual recursion.
  • Parsing Recovery - Continues parsing after syntax errors to produce a partial AST representing valid parts of the source code.
  • Cross-File Analysis Pipelines - Processes all source files in a project at once to enable bulk operations and inter-file pattern detection.
  • Project-Wide Source Analyzers - Processes all source files in a project at once to enable cross-file analysis and bulk operations.
  • Comment Association Engines - Extracts and attaches comments from source code to corresponding AST nodes for documentation or analysis.
  • Comment Extraction Engines - Extracts and associates comments from source code with the corresponding AST nodes for documentation or analysis.
  • Project-Wide Source Analyzers - Processes all source files in a Java project at once to enable bulk operations and cross-file analysis workflows.
  • Java Comment Parsers - Extracts and associates comments from source code with the corresponding AST nodes for documentation or analysis.
  • AST Node Querying - Accesses and queries specific parts of the parsed syntax tree to retrieve information about the source code.
  • Development Utilities - Tools for parsing, modifying, and generating Java code.
  • Metaprogramming and Compilers - Java 1.8 Parser and Abstract Syntax Tree.

Star history

Star history chart for javaparser/javaparserStar history chart for javaparser/javaparser

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does javaparser/javaparser do?

JavaParser is a library that parses Java source code up to version 12 into an Abstract Syntax Tree (AST), enabling programmatic analysis, transformation, and generation of Java code. It serves as a parser, code analyzer, code generator, comment parser, and symbol resolver, providing a unified toolkit for working with Java source at the AST level.

What are the main features of javaparser/javaparser?

The main features of javaparser/javaparser are: Java Source Code Analyzers, Java Parsers, Symbol Resolution, Java Symbol Resolvers, AST-to-Source Generators, Format-Preserving Printing, Java Code Generators, Source Code Transformation Engines.

Which projects share features with javaparser/javaparser?

Projects with overlapping indexed features include: benjamn/recast — Recast is a JavaScript AST parser and printer designed for automated code refactoring. It converts source code into… lunet-io/markdig — Markdig is a high-performance Markdown processor for .NET applications that converts Markdown text into HTML or other… nikic/php-parser — PHP-Parser is a tool that converts PHP source code into an abstract syntax tree for static analysis and programmatic… projectlombok/lombok — Lombok is a Java annotation processor and boilerplate reduction library designed to automatically generate repetitive… apple/swift-syntax — swift-syntax is a library for parsing, manipulating, and generating Swift source code. It provides a source-accurate… facebook/jscodeshift — jscodeshift is a JavaScript AST transformation toolkit and codemod engine designed for large-scale code refactoring…

Projects sharing features with Javaparser

These projects share indexed features with Javaparser. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • benjamn/recastbenjamn avatar

    benjamn/recast

    5,246View on GitHub↗

    Recast is a JavaScript AST parser and printer designed for automated code refactoring. It converts source code into abstract syntax trees that can be modified and then printed back into source code. The project focuses on formatting-preserving transformations, storing original whitespace and indentation metadata within syntax tree nodes to reconstruct code without losing its original layout. It also generates character-level source maps to maintain precise correspondences between original input and transformed output. The toolkit includes utilities for syntax tree manipulation using a visito

    TypeScript
    View on GitHub↗5,246
  • nikic/php-parsernikic avatar

    nikic/PHP-Parser

    17,437View on GitHub↗

    PHP-Parser is a tool that converts PHP source code into an abstract syntax tree for static analysis and programmatic manipulation. It functions as a parser, a code generator, and a static analysis framework. The project enables the programmatic construction of abstract syntax tree nodes through a fluent interface and provides the ability to transform these trees back into formatted source code. It includes a serializer that exports abstract syntax trees to JSON format and reconstructs them from strings. The toolset covers several capability areas, including namespace resolution, constant exp

    PHP
    View on GitHub↗17,437
  • lunet-io/markdiglunet-io avatar

    lunet-io/markdig

    5,257View on GitHub↗

    Markdig is a high-performance Markdown processor for .NET applications that converts Markdown text into HTML or other target formats. It is a CommonMark compliant parser and extensible engine that can transform Markdown into a searchable and manipulatable abstract syntax tree. The library provides a framework for adding custom syntax and rendering logic through a modular pipeline of parsers and renderers. It supports native ahead-of-time compilation and trimming to minimize binary size. Capabilities include the generation of structured HTML with custom attributes and styling, the extraction

    C#
    View on GitHub↗5,257
  • projectlombok/lombokprojectlombok avatar

    projectlombok/lombok

    13,458View on GitHub↗

    Lombok is a Java annotation processor and boilerplate reduction library designed to automatically generate repetitive source code. It intercepts the compilation process to inject methods and fields directly into Java classes, acting as a source code generator that eliminates the need to manually write common class patterns. The project distinguishes itself through deep integration with the Java compiler and various integrated development environments. It provides IDE plugins that allow editors to recognize and navigate generated methods, preventing false compilation errors and maintaining syn

    Java
    View on GitHub↗13,458
  • Compare all 30 related projects→