Demystifying Java Annotations: The Role of Dynamic Proxies and Map-Based Storage
When retrieving metadata at runtime, the Class.getAnnotation() method appears straightforward, but its execution path relies heavily on JVM-level caching and dynamic proxy generation. Every annotated class maintains an internal AnnotationData instance that stores resolved metadata. This cache utilizes a Map<Class<? extends Annotation>, ...
Posted on Thu, 23 Jul 2026 17:06:02 +0000 by fatmikey
Understanding Static and Dynamic Proxy Patterns in Java
The proxy pattern is a foundational concept for understanding the underlying mechanics of Spring AOP. It allows you to control access to an object by providing a surrogate or placeholder.
Static Proxy
In a static proxy implementation, the proxy class is created manually or by specific tools before compilation.
Core Components:
Subject Interfac ...
Posted on Tue, 21 Jul 2026 16:09:44 +0000 by dan1956
Deep Dive into JDK Dynamic Proxy Internals
In software architecture, cross-cutting concerns such as logging, security checks, and transaction management often need to be applied across multiple components. A naive approach involves manually inserting logic into every business method, leading to code duplication and tight coupling. For instance, if we need to audit execution before and a ...
Posted on Thu, 02 Jul 2026 16:47:22 +0000 by liljester
Understanding Proxy Patterns: Static and Dynamic Proxies in Java
Background
In object-oriented systems, certain objects may be expensive to create, or some operations require security checks. Directly accessing such objects can introduce complications. One solution is to introduce an intermediate layer—the proxy layer. This is the essence of the Proxy Pattern.
The Proxy Pattern, one of the 23 classic design ...
Posted on Sun, 14 Jun 2026 17:59:53 +0000 by atsphpflash
Understanding MyBatis's Core Execution Flow and Internal Architecture
Resource Loading via ClassLoader
The process begins with loading the configuration file, typically mybatis.xml, using Resources.getResourceAsStream(). This method leverages Java’s class loading mechanism to locate resources within the classpath. It does not resolve absolute file paths directly but instead relies on the ClassLoader hierarchy to ...
Posted on Sun, 17 May 2026 00:51:05 +0000 by XeroXer