Tagged articles
34 articles
Page 1 of 1
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.

Annotation ProcessingJavabean-mapping
0 likes · 6 min read
Advanced MapStruct Techniques: expression, qualifiedByName, nullValueMappingStrategy, and Decorator
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.

Annotation Processingbean-mappingcode-generation
0 likes · 7 min read
Master Advanced MapStruct Techniques for Efficient Java Bean Mapping
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.

Annotation ProcessingCompile-timeGradle
0 likes · 8 min read
Injecting Version Information into Java JARs Using a Compile‑Time Annotation Processor
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.

Annotation ProcessingCompile-timeGradle
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.

Annotation ProcessingBackendJava
0 likes · 12 min read
Understanding Java Annotations: Definition, Essence, Details, and Parsing SOURCE‑Retention Annotations
Java Tech Enthusiast
Java Tech Enthusiast
Feb 7, 2024 · Backend Development

How Does Spring’s @Autowired Really Work? A Deep Dive into Its Implementation

This article provides a comprehensive analysis of Spring's @Autowired annotation, covering its usage, the bean lifecycle stages where it operates, the core classes and methods that implement it, and a comparison with other injection annotations such as @Resource, all illustrated with runnable code examples.

Annotation ProcessingAutowiredJava
0 likes · 27 min read
How Does Spring’s @Autowired Really Work? A Deep Dive into Its Implementation
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.

ASTAnnotation ProcessingCode Generation
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.

AndroidAnnotation ProcessingCode Generation
0 likes · 10 min read
Understanding apt, kapt, and ksp: Annotation Processing and Kotlin Symbol Processing for Code Generation
Java High-Performance Architecture
Java High-Performance Architecture
Oct 25, 2022 · Backend Development

Why Lombok @Data + @Builder Breaks No‑Arg Constructors and How to Fix It

This article explains why using Lombok's @Data and @Builder together removes the default no‑argument constructor, demonstrates the compilation behavior, and provides two practical solutions—including @Tolerate and combining @RequiredArgsConstructor with @NoArgsConstructor—while also detailing Lombok's annotation‑processing mechanism.

Annotation ProcessingBuilder PatternJava
0 likes · 6 min read
Why Lombok @Data + @Builder Breaks No‑Arg Constructors and How to Fix It
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.

Annotation ProcessingJavaLombok
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.

Annotation ProcessingCode GenerationJava
0 likes · 14 min read
Annotation‑Driven Responsibility Chain Framework (auto‑pipeline) Overview
JD Retail Technology
JD Retail Technology
Aug 1, 2022 · Backend Development

How Java Compiler AST Injection Eliminates Repetitive Monitoring Code

This article explains how a Java compiler‑time AST injection component replaces manual monitoring instrumentation with a simple @UMP annotation, detailing the technology selection, implementation using JSR‑269 annotation processors, and the trade‑offs of compile‑time versus runtime weaving.

ASTAnnotation ProcessingBackend Development
0 likes · 16 min read
How Java Compiler AST Injection Eliminates Repetitive Monitoring Code
Java Architect Essentials
Java Architect Essentials
Jun 27, 2022 · Backend Development

How Lombok Generates Code at Compile Time: A Deep Dive into Annotations and APT

This article explains what Lombok is, how it uses compile‑time annotations and the Java Annotation Processing Tool (APT) to automatically generate getters, setters, constructors and other boilerplate code, and provides step‑by‑step examples of defining custom annotations, processors, and compiling them to produce new classes.

APTAnnotation ProcessingCompile-time
0 likes · 12 min read
How Lombok Generates Code at Compile Time: A Deep Dive into Annotations and APT
Senior Brother's Insights
Senior Brother's Insights
May 27, 2022 · Backend Development

How Lombok Generates Code at Compile Time: A Deep Dive into Annotation Processing

This article explains how Lombok uses compile‑time annotations and the Java Annotation Processing Tool (APT) to automatically generate boilerplate code such as getters, setters, and constructors, and provides step‑by‑step examples of defining custom annotations, processors, and compiling them.

APTAnnotation ProcessingBackend Development
0 likes · 11 min read
How Lombok Generates Code at Compile Time: A Deep Dive into Annotation Processing
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.

AndroidAnnotation ProcessingDynamic Injection
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.

AndroidAnnotation ProcessingKotlin
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.

Annotation ProcessingKaptKotlin
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.

ARouterAndroidAnnotation Processing
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.

AndroidAnnotation ProcessingKSP
0 likes · 15 min read
Adding KSP Support to Android Room: Challenges, Design Decisions, and Implementation
Programmer DD
Programmer DD
Jul 10, 2021 · Backend Development

Why Lombok Fails After an IDEA Upgrade and How to Fix It

After upgrading IntelliJ IDEA, Lombok annotations may stop working and cause compilation errors, but updating Lombok to version 1.18.14 or later and adjusting IDE settings can restore functionality for Java and Spring Boot projects.

Annotation ProcessingIntelliJ IDEAJava
0 likes · 3 min read
Why Lombok Fails After an IDEA Upgrade and How to Fix It
Programmer DD
Programmer DD
Jul 26, 2020 · Backend Development

How Does Spring Parse @Component and @Service Annotations? A Deep Dive

This article explains the internal workflow of Spring's annotation processing, detailing how @Component and its specializations like @Service are discovered through XML namespace handlers, classpath scanning, metadata readers, and meta‑annotation handling, complete with code excerpts and step‑by‑step analysis.

Annotation Processingcomponent scanningspring
0 likes · 12 min read
How Does Spring Parse @Component and @Service Annotations? A Deep Dive
Sohu Tech Products
Sohu Tech Products
Jul 10, 2019 · Mobile Development

Using Annotation Processing Tool (APT) for Automated Code Generation in Android Development

This article explains the concept and practical application of the Annotation Processing Tool (APT) in Android development, demonstrating how to set up an APT project, define annotations, process them with custom processors, and automatically generate Java code for activity navigation using JavaPoet.

AndroidAnnotation ProcessingCode Generation
0 likes · 15 min read
Using Annotation Processing Tool (APT) for Automated Code Generation in Android Development
Qunar Tech Salon
Qunar Tech Salon
Nov 29, 2018 · Backend Development

Java Agent Instrumentation for AOP Method Timing without Spring

This article explains how to implement Java Instrumentation using a custom Java agent to achieve AOP‑style method timing without Spring, covering Instrument concepts, Maven manifest configuration, Agent entry points, JDK Attach API loading, class file transformers, annotation processing, and integration with QTrace for full‑stack tracing.

Annotation ProcessingInstrumentationJava Agent
0 likes · 12 min read
Java Agent Instrumentation for AOP Method Timing without Spring
Programmer DD
Programmer DD
May 13, 2018 · Backend Development

How Lombok Supercharges Java Development: Install, Core Annotations, and Behind‑the‑Scenes Mechanics

This article introduces Lombok—a Java library that eliminates boilerplate code—by showing how to install it in IntelliJ, demonstrating the most common annotations with runnable examples, and revealing the annotation‑processing mechanism that generates the bytecode during compilation.

Annotation ProcessingBackend DevelopmentCode Generation
0 likes · 11 min read
How Lombok Supercharges Java Development: Install, Core Annotations, and Behind‑the‑Scenes Mechanics
Qunar Tech Salon
Qunar Tech Salon
Aug 11, 2017 · Mobile Development

Understanding Permissions4M: An Android Compile‑Time Annotation Framework for Runtime Permissions

This article explains the design and implementation of Permissions4M, an Android library that uses compile‑time annotations to simplify runtime permission handling, covering the pre‑compilation, compilation, and post‑compilation stages, module structure, key code snippets, and usage patterns.

AndroidAnnotation ProcessingCompile-time
0 likes · 18 min read
Understanding Permissions4M: An Android Compile‑Time Annotation Framework for Runtime Permissions
Tencent Music Tech Team
Tencent Music Tech Team
Oct 14, 2016 · Mobile Development

Understanding ButterKnife: Dependency Injection in Android with JavaPoet and Annotation Processing

ButterKnife is a compile‑time, annotation‑based dependency injection library for Android that uses JavaPoet‑generated helper classes to replace repetitive findViewById calls, offering faster development and runtime performance while adding a modest number of auxiliary classes and a one‑time reflection cost.

AndroidAnnotation ProcessingButterKnife
0 likes · 20 min read
Understanding ButterKnife: Dependency Injection in Android with JavaPoet and Annotation Processing
Tencent Music Tech Team
Tencent Music Tech Team
Apr 28, 2016 · Mobile Development

Understanding and Using EventBus 3 in Android: Setup, Core Architecture, Index Acceleration, and Best Practices

EventBus 3 provides a lightweight publish/subscribe framework for Android that simplifies inter‑module communication by allowing any object to be posted and received via @Subscribe methods, with optional index acceleration for faster registration, customizable thread modes, and guidance on setup, ProGuard rules, pitfalls, and alternatives.

AndroidAnnotation ProcessingEventBus
0 likes · 22 min read
Understanding and Using EventBus 3 in Android: Setup, Core Architecture, Index Acceleration, and Best Practices