Tag

annotation-processing

1 views collected around this technical thread.

Architect's Guide
Architect's Guide
Jan 27, 2025 · Backend Development

Advanced MapStruct Techniques: expression, qualifiedByName, nullValueMappingStrategy, and Decorator

This article introduces MapStruct, a compile‑time Java bean mapping framework, and demonstrates advanced features such as expression‑based mappings, qualifiedByName custom converters, nullValueMappingStrategy handling, and decorator‑based post‑processing with concrete code examples for Spring‑based projects.

Bean MappingMapStructSpring
0 likes · 6 min read
Advanced MapStruct Techniques: expression, qualifiedByName, nullValueMappingStrategy, and Decorator
Architect's Guide
Architect's Guide
Nov 7, 2024 · Backend Development

Injecting Jar Version into Java Components Using Insert Annotation Processors

This article explains how to create a custom insert annotation and an annotation processor in Java to automatically inject the jar version into component constants at compile time, enabling Prometheus monitoring without manual version updates.

GradlePrometheusVersioning
0 likes · 7 min read
Injecting Jar Version into Java Components Using Insert Annotation Processors
macrozheng
macrozheng
Oct 15, 2024 · Backend Development

Master Advanced MapStruct Techniques for Efficient Java Bean Mapping

This article introduces MapStruct, a compile‑time Java bean mapping framework, and walks through its key features, expression mapping, qualifiedByName custom methods, null‑value strategies, and decorator usage, providing code examples for each advanced scenario.

Bean MappingMapStructannotation-processing
0 likes · 7 min read
Master Advanced MapStruct Techniques for Efficient Java Bean Mapping
Architecture Digest
Architecture Digest
Jul 2, 2024 · Backend Development

Injecting Jar Version into Java Components Using a Compile‑Time Annotation Processor

This article explains how to create a custom compile‑time annotation processor that automatically injects the current JAR version into Java component constants, eliminating manual updates and enabling Prometheus monitoring of version usage across internal libraries.

GradlePrometheusannotation-processing
0 likes · 7 min read
Injecting Jar Version into Java Components Using a Compile‑Time Annotation Processor
Java Architect Essentials
Java Architect Essentials
Jun 13, 2024 · Backend Development

Injecting Version Information into Java JARs Using a Compile‑Time Annotation Processor

This article demonstrates how to create a custom compile‑time annotation processor that automatically injects the JAR version into Java constants, enabling Prometheus monitoring of component versions without manual updates, and walks through the full implementation, registration, and testing steps.

GradlePrometheusannotation-processing
0 likes · 8 min read
Injecting Version Information into Java JARs Using a Compile‑Time Annotation Processor
Java Architect Essentials
Java Architect Essentials
Jun 4, 2024 · Backend Development

Injecting Jar Version into Java Components with Insertable Annotation Processors

This article demonstrates how to create a custom insertable annotation processor in Java that automatically injects the jar version into component constants at compile time, enabling Prometheus monitoring of version usage without manual updates.

GradleLombokPrometheus
0 likes · 8 min read
Injecting Jar Version into Java Components with Insertable Annotation Processors
Selected Java Interview Questions
Selected Java Interview Questions
May 29, 2024 · Backend Development

Injecting Jar Version into Java Components with an Insertion Annotation Processor

This article demonstrates how to create a compile‑time insertion annotation processor in Java that automatically injects the current jar version into static constants of shared components, eliminating manual updates and enabling Prometheus monitoring of version usage across the organization.

GradleLombokannotation-processing
0 likes · 8 min read
Injecting Jar Version into Java Components with an Insertion Annotation Processor
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 18, 2024 · Fundamentals

Understanding Java Annotations: Definition, Essence, Details, and Parsing SOURCE‑Retention Annotations

This article explains what Java annotations are, their underlying nature as interfaces extending Annotation, the various meta‑annotations such as @Retention and @Target, how retention policies affect availability, and demonstrates how to parse SOURCE‑retention annotations using a custom AbstractProcessor with complete code examples.

AnnotationsMeta‑annotationsSource Retention
0 likes · 12 min read
Understanding Java Annotations: Definition, Essence, Details, and Parsing SOURCE‑Retention Annotations
Zhuanzhuan Tech
Zhuanzhuan Tech
Jan 10, 2024 · Information Security

Log Desensitization Practices and APT‑Based Automatic toString Generation in Java

This article describes how ZhaiZhai implements log desensitization for personal data protection using a reusable Java utility class, JSON serializer customizations with Jackson, and an annotation‑processing tool that automatically generates masked toString methods, while also discussing operational challenges and future plans.

APTannotation-processingjava
0 likes · 13 min read
Log Desensitization Practices and APT‑Based Automatic toString Generation in Java
政采云技术
政采云技术
Sep 26, 2023 · Backend Development

Understanding Lombok: Introduction, Compilation Principles, and a Manual @Getter Implementation

This article introduces Lombok, explains how it leverages Java's annotation‑processing (JSR‑269) and abstract syntax tree (AST) modifications to generate boilerplate code at compile time, and provides a step‑by‑step guide to manually implement a @Getter annotation processor with full Maven project examples.

ASTLombokannotation-processing
0 likes · 21 min read
Understanding Lombok: Introduction, Compilation Principles, and a Manual @Getter Implementation
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 22, 2022 · Mobile Development

Understanding apt, kapt, and ksp: Annotation Processing and Kotlin Symbol Processing for Code Generation

This article explains the differences between Java's Annotation Processing Tool (apt), Kotlin's annotation processor (kapt), and the newer Kotlin Symbol Processing (ksp) framework, illustrating their architectures, usage patterns, and code‑generation capabilities with practical examples for Android development.

AndroidKSPKapt
0 likes · 10 min read
Understanding apt, kapt, and ksp: Annotation Processing and Kotlin Symbol Processing for Code Generation
DaTaobao Tech
DaTaobao Tech
Oct 25, 2022 · Backend Development

MapStruct and Lombok Integration: Maven Dependency Order and Advanced Usage

The article explains that when using MapStruct with Lombok, Maven must list Lombok before MapStruct (or define annotationProcessorPaths) so Lombok’s annotation processor runs first, and then demonstrates basic and advanced mapping techniques, Spring integration, and singleton caching strategies.

LombokMapStructSpring
0 likes · 17 min read
MapStruct and Lombok Integration: Maven Dependency Order and Advanced Usage
DaTaobao Tech
DaTaobao Tech
Oct 14, 2022 · Backend Development

Annotation‑Driven Responsibility Chain Framework (auto‑pipeline) Overview

The annotation‑driven auto‑pipeline framework generates a linked‑list responsibility chain from @AutoPipeline‑annotated interfaces, automatically wiring handler implementations to execute sequentially and return the first non‑null result, thereby boosting development efficiency, reusability, and correctness for complex business pipelines such as configuration sources and message throttling.

Design PatternPipelineannotation-processing
0 likes · 14 min read
Annotation‑Driven Responsibility Chain Framework (auto‑pipeline) Overview
Snowball Engineer Team
Snowball Engineer Team
May 6, 2022 · Mobile Development

Dynamic Card Injection Framework Using Annotation Processing in Android

This article describes how a mobile development team refactored a card‑creation feature by applying the Open/Closed and Single‑Responsibility principles, introduced a factory pattern with reflection, and ultimately built a fully automated dynamic injection framework using Java Annotation Processing (APT) to eliminate manual code updates.

AndroidDynamic InjectionFactory Pattern
0 likes · 13 min read
Dynamic Card Injection Framework Using Annotation Processing in Android
Sohu Tech Products
Sohu Tech Products
Mar 2, 2022 · Mobile Development

Designing a Robust Android App Startup Framework with Annotation Processing and Task Scheduling

This article explains how to build a high‑performance Android startup framework by collecting initialization tasks with custom annotations, generating code via annotation processors, injecting tasks into the application, and scheduling them using a DAG‑based algorithm that supports async execution, multi‑process, and priority handling.

AndroidKotlinStartup Framework
0 likes · 11 min read
Designing a Robust Android App Startup Framework with Annotation Processing and Task Scheduling
ByteDance Terminal Technology
ByteDance Terminal Technology
Mar 2, 2022 · Mobile Development

Analyzing and Optimizing Kapt Memory Consumption in Android Projects

This article examines the memory‑intensive behavior of Kotlin's Kapt annotation‑processing tool in large Android builds, explains its internal two‑step stub‑generation and Java‑apt workflow, analyzes OOM root causes with VisualVM, and presents a practical source‑filtering fix that dramatically reduces compile time and memory usage.

AndroidGradleKapt
0 likes · 16 min read
Analyzing and Optimizing Kapt Memory Consumption in Android Projects
Sohu Tech Products
Sohu Tech Products
Dec 8, 2021 · Mobile Development

Understanding Android App Routing: Concepts, Requirements, and Implementation

This article explains the concept of routing in Android applications, discusses why third‑party routing frameworks are often needed for large, componentized apps, outlines the essential features of a routing framework, and details the implementation techniques such as annotation processing, AOP injection, and service routing with concrete code examples.

AOPARouterAndroid
0 likes · 14 min read
Understanding Android App Routing: Concepts, Requirements, and Implementation
Sohu Tech Products
Sohu Tech Products
Nov 10, 2021 · Mobile Development

Adding KSP Support to Android Room: Challenges, Design Decisions, and Implementation

This article details how the Android Room library added experimental Kotlin Symbol Processing (KSP) support to replace KAPT, describing the performance benefits, the architectural challenges of creating an X‑Processing abstraction layer, the testing infrastructure built around it, and the remaining limitations and future work.

AndroidKSPKotlin
0 likes · 15 min read
Adding KSP Support to Android Room: Challenges, Design Decisions, and Implementation
vivo Internet Technology
vivo Internet Technology
Jul 21, 2021 · Mobile Development

Understanding and Implementing Compile-Time Annotations in Android Development

The article explains how compile‑time annotation processors in Android replace costly runtime reflection by generating binding classes during build time, showing step‑by‑step code examples, JavaPoet/KotlinPoet usage, and the performance benefits for cleaner, faster, maintainable apps.

AndroidCompile-time AnnotationKotlin
0 likes · 16 min read
Understanding and Implementing Compile-Time Annotations in Android Development