Tagged articles
Annotation Processing
36 articles · Page 1 of 1
After upgrading to JDK 27, Lombok 1.18.48 emits four Unsafe warnings during compilation because it uses sun.misc.Unsafe to bypass module access checks; the Lombok team won't fix it to preserve zero-config usability, but adding --sun-misc-unsafe-memory-access=allow to the forked compiler JVM silences the warnings.
Annotation ProcessingBuild ConfigurationCompiler Plugin
0 likes · 15 min read

This article details the implementation of a generic @UserPermission annotation for horizontal authorization in Java web applications, covering annotation design, AOP-based interception, reflection-based parameter extraction, and compile-time validation using JDK8 annotation processors to prevent configuration errors.
Annotation ProcessingCompile-time ValidationJDK8
0 likes · 19 min read

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 ProcessingJavaMapStruct
0 likes · 6 min read

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 ProcessingMapStructbean-mapping
0 likes · 7 min read

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.
Annotation ProcessingGradlePrometheus
0 likes · 7 min read

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 ProcessingGradlePrometheus
0 likes · 8 min read

This article explains what Kotlin Symbol Processing (KSP) is, why it outperforms KAPT, how to migrate existing projects, the API it exposes for code generation, and how to leverage incremental compilation to dramatically reduce Kotlin build times.
Annotation ProcessingKSPKotlin
0 likes · 15 min read

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.
Annotation ProcessingGradleLombok
0 likes · 8 min read

This article explains how to create a custom insertable annotation processor in Java that automatically injects the jar version into component constants during the Gradle build, eliminating manual updates and enabling version monitoring via Prometheus.
ASTAnnotation ProcessingGradle
0 likes · 8 min read

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 ProcessingGradleVersion Injection
0 likes · 8 min read

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 ProcessingAnnotationsBackend
0 likes · 12 min read

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.
@AutowiredAnnotation ProcessingBean Lifecycle
0 likes · 27 min read

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.
Annotation ProcessingJavaapt
0 likes · 13 min read


政采云技术Sep 26, 2023 · Backend Development
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 ProcessingJava
0 likes · 21 min read

This article demonstrates how to create a custom compile‑time annotation processor that automatically injects the jar version into Java component constants, enabling Prometheus monitoring of version usage without manual updates.
Annotation ProcessingLombokcode-generation
0 likes · 8 min read

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 ProcessingKSP
0 likes · 10 min read

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

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

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 ProcessingJavaPipeline
0 likes · 14 min read

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 ProcessingJava
0 likes · 16 min read

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.
Annotation ProcessingJavaLombok
0 likes · 12 min read

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.
Annotation ProcessingJavaLombok
0 likes · 11 min read

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 ProcessingDesign Principles
0 likes · 13 min read

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

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

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

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

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.
AndroidAnnotation ProcessingCompile-time Annotation
0 likes · 16 min read

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

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 ProcessingSpringcomponent scanning
0 likes · 12 min read

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 ProcessingJavaPoet
0 likes · 15 min read

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 ProcessingJava AgentMaven
0 likes · 12 min read

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 ProcessingIDEJava
0 likes · 11 min read

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 ProcessingJava
0 likes · 18 min read

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

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
