Apache Groovy Documentation

repository·master·Indexed 26 days ago

https://github.com/apache/groovy

Documentation for the Apache Groovy programming language for the JVM. Includes details on the compilation pipeline, AST (Abstract Syntax Tree) manipulation, AST transformations, compilation customizers, and extension modules. Covers repository layout, build infrastructure using Gradle, API boundaries, and type-checking extensions.

Tokens
120.8K
Snippets
254
Records
895
Agent score
84%

What's inside Apache Groovy

  1. Introduction to Groovy JMX and GroovyMBean

    master

    The groovy-jmx module provides the GroovyMBean class, which allows Java Management Extensions (JMX) Managed Beans (MBeans) to be treated like standard Groovy objects. This simplifies interacting with MBeans using Groovy syntax.

    Note for JDK 9+: JMX classes are split across java.management (core) and java.management.rmi (RMI connector). If running on the module path, you must add requires java.management.rmi for remote connectivity. On JDK 17+, remote connections may require configuring the jmx.remote.rmi.server.serial.filter.pattern due to stricter security.

  2. Overview of the Groovy SQL Module

    master
    The Groovy SQL module provides a higher-level abstraction over Java's JDBC (Java Database Connectivity) technology. It is designed to simplify interacting with SQL databases by providing more idiomatic Groovy ways to execute queries and manage database connections compared to standard JDBC.
  3. Overview of Built-in Auxiliary Type Checkers

    master

    Groovy provides an extensible type-checking mechanism through built-in auxiliary checkers. These checkers allow you to selectively strengthen compile-time verification for specific concerns like regex validity, format strings, null safety, and method side effects.

    Available Checkers:

    • RegexChecker (Stable): Validates regex patterns at compile time.
    • FormatStringChecker (Stable): Validates printf/format specifiers against argument types.
    • NullChecker (Incubating): Detects potential null dereferences using annotations and flow analysis.
    • ModifiesChecker (Incubating): Verifies methods only modify declared fields via @Modifies.
    • PurityChecker (Incubating): Enforces that @Pure methods have no side effects.
    • CombinerChecker (Incubating): Verifies associativity in parallel reduction combiners.
    • MonadicChecker (Incubating): Enables type-checking for the DO macro.
    • MonadicShapeChecker (Incubating): Lints hand-written flatMap/map chains.
  4. Overview of Groovy Language Documentation

    master

    The Groovy documentation covers the language specification, available tools, and various user guides for integration and specific data formats. Key areas include:

    • Language Specification: Syntax, operators, program structure, object orientation, closures, semantics, async/await, and concurrency models (actors, dataflow, etc.).
    • Tools: groovy (shell), groovyc (compiler), groovysh (shell), groovy-console, groovydoc, and IDE support.
    • User Guides: Getting started, differences from Java, Groovy Development Kit (GDK), metaprogramming, Grape (dependency management), testing, and performance.
    • Data Format Guides: JSON, SQL, XML, YAML, TOML, CSV, and Markdown.
    • Integration & Scripting: Apache Ant integration via AntBuilder, Ant tasks for Groovy and groovyc, and Servlet integration.
  5. Overview of the Groovy Logging Test Module

    master
    The groovy-logging-test module provides specialized tests for verifying declarative logging AST (Abstract Syntax Tree) transformations in Groovy. While the test implementation resides in this module, the core logic for these transformations is located in the main Groovy core module. For detailed technical documentation on how these logging transformations work, refer to the logging-transforms.adoc guide.