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

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
square avatar

square/javapoetArchived

0
View on GitHub↗
10,850 stars·1,388 forks·Java·Apache-2.0·13 vues

Javapoet

JavaPoet is a source code generator and metaprogramming utility for the Java language. It functions as an abstract syntax tree construction library that allows developers to model classes, methods, and fields as objects before emitting them as source code.

The library distinguishes itself through automatic import management and code formatting. It tracks referenced types to generate required import statements and handles line wrapping, semicolon placement, and indentation to ensure generated files remain readable.

The tool covers a broad range of generation capabilities, including the definition of type structures such as interfaces and enums, the declaration of annotations, and the composition of method bodies. It provides mechanisms for injecting dynamic values and type references into code blocks and can emit the final source to the file system, strings, or output streams.

Features

  • Source Code Abstract Syntax Trees - Models Java source files as a hierarchy of objects, allowing programmatic manipulation of the code structure before emission.
  • Source Code Generators - Programmatically generates valid Java source code files from structured object representations.
  • Import Management - Automatically resolves and generates the required import statements based on the classes used in the code.
  • AST Construction Libraries - Models Java classes, methods, and fields as objects in an abstract syntax tree before emitting them as source code.
  • Dynamic Type Modeling - Allows creating strongly typed Java class structures and method bodies through an API instead of string concatenation.
  • Fluent Interface Patterns - Provides a fluent API builder pattern for programmatically constructing Java classes, methods, and fields.
  • Import Resolution Tracking - Maintains a registry of referenced classes to automatically generate the necessary import statements in the resulting Java file.
  • Metaprogramming Frameworks - Provides a framework for automating the creation of boilerplate Java code based on external metadata.
  • Type Modeling APIs - Provides strongly typed specifications for modeling Java classes, interfaces, enums, fields, and methods.
  • Method Body Composition - Allows writing executable code blocks with automated indentation and semicolon placement via a string-based interface.
  • Type Structure Generation - Provides APIs to model and generate Java classes, interfaces, and enums with specific modifiers and members.
  • Automated API Generation - Enables the automatic generation of API layers, classes, and interfaces based on external metadata or schemas.
  • Code Formatting Tools - Automatically handles line wrapping, semicolon placement, and indentation for generated Java source files.
  • Indentation Rules - Implements structural indentation logic to ensure generated Java source code follows consistent nesting and line wrapping.
  • Source Code Emission - Writes generated source code to the file system, a string, or an output stream.
  • Source Code File Emission - Exports generated Java source code directly to the file system with configurable character sets.
  • String Formatting Utilities - Uses a specialized token system to inject dynamic literals and type references into formatted code blocks.
  • Qualified Name Resolution - Prevents naming collisions by automatically deciding between simple class names and fully qualified type paths.
  • Type Qualifier Management - Handles fully-qualified and nested type names to prevent naming collisions in the generated Java source.
  • Code Block Value Injection - Embeds literals and type references into code blocks using a specialized formatting syntax.
  • Code Annotations - Supports adding structured metadata annotations to classes, methods, and fields during code generation.
  • Code Formatting - Ensures high readability of generated code through line wrapping and named placeholders in code blocks.
  • Code Literal Formatting - Inserts escaped strings and type references into code blocks using a specialized placeholder syntax.
  • Advanced Development Frameworks - API for generating Java source files.
  • Code Generation and Bytecode - API for generating Java source files.
  • Code Generators - API for generating Java source files.
  • Metaprogramming and Compilers - API for generating Java source files.

Historique des stars

Graphique de l'historique des stars pour square/javapoetGraphique de l'historique des stars pour square/javapoet

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Alternatives open source à Javapoet

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Javapoet.
  • square/kotlinpoetAvatar de square

    square/kotlinpoet

    4,141Voir sur GitHub↗

    KotlinPoet is a Java-based API for programmatically creating and formatting Kotlin source files. It serves as a source code generator and type system mapper, providing a framework to build Kotlin code structures through a type-safe model of language elements to automate the production of boilerplate. The project utilizes a fluent-builder pattern to incrementally construct language elements and maintains an internal object-model representation that separates logical structure from final text formatting. It handles the complexities of source emission through indentation-based formatting and key

    Kotlincode-generationjavapoetkotlin
    Voir sur GitHub↗4,141
  • google/autoAvatar de google

    google/auto

    10,545Voir sur GitHub↗

    This project is a Java annotation processing framework and source code generator designed to automate repetitive boilerplate and reduce manual coding errors. It functions as a toolkit for building custom annotation processors that produce source code, metadata, and type definitions during the compilation process. The framework specifically automates the creation of immutable value types with built-in equality and hashing logic, as well as the generation of factory implementations for dependency injection. It also handles the automated production of service provider configuration files to enab

    Java
    Voir sur GitHub↗10,545
  • oi-wiki/oi-wikiAvatar de OI-wiki

    OI-wiki/OI-wiki

    26,176Voir sur GitHub↗

    This project is a comprehensive, community-maintained knowledge base and toolkit designed for competitive programming. It serves as a centralized repository for algorithmic theory, data structures, and mathematical techniques, providing a structured reference for informatics and collegiate programming competitions. The project distinguishes itself by integrating educational content with a robust suite of automation utilities. It provides a complete workflow for competitive programming, including tools for automated test case generation, solution verification, and direct interaction with onlin

    TypeScriptacm-icpcacm-icpc-handbookalgorithms
    Voir sur GitHub↗26,176
  • apple/swift-syntaxAvatar de apple

    apple/swift-syntax

    3,671Voir sur GitHub↗

    swift-syntax is a library for parsing, manipulating, and generating Swift source code. It provides a source-accurate abstract syntax tree representation of Swift code, acting as a parser, transformer, and code generator. The project serves as the infrastructure for Swift macro development, enabling the expansion and transformation of source code during compilation. It is used to build compiler tooling for static analysis, formatting, and automated refactoring. The system covers a broad range of source analysis capabilities, including the ability to convert source code into structured trees f

    Swift
    Voir sur GitHub↗3,671
Voir les 30 alternatives à Javapoet→

Questions fréquentes

Que fait square/javapoet ?

JavaPoet is a source code generator and metaprogramming utility for the Java language. It functions as an abstract syntax tree construction library that allows developers to model classes, methods, and fields as objects before emitting them as source code.

Quelles sont les fonctionnalités principales de square/javapoet ?

Les fonctionnalités principales de square/javapoet sont : Source Code Abstract Syntax Trees, Source Code Generators, Import Management, AST Construction Libraries, Dynamic Type Modeling, Fluent Interface Patterns, Import Resolution Tracking, Metaprogramming Frameworks.

Quelles sont les alternatives open-source à square/javapoet ?

Les alternatives open-source à square/javapoet incluent : square/kotlinpoet — KotlinPoet is a Java-based API for programmatically creating and formatting Kotlin source files. It serves as a source… google/auto — This project is a Java annotation processing framework and source code generator designed to automate repetitive… oi-wiki/oi-wiki — This project is a comprehensive, community-maintained knowledge base and toolkit designed for competitive programming.… apple/swift-syntax — swift-syntax is a library for parsing, manipulating, and generating Swift source code. It provides a source-accurate… nicklockwood/swiftformat — SwiftFormat is a tool for the Swift language that functions as a code formatter, linter, and refactoring utility. It… nikic/php-parser — PHP-Parser is a tool that converts PHP source code into an abstract syntax tree for static analysis and programmatic…