Understanding Annotations in Java
Annotations in Java, introduced in JDK 1.5, serve as a form of metadata, providing declarative information about code elements. Unlike comments, which are for human readers, annotations are intended for the Java compiler or runtime environment.
Annotations can be applied to packages, classes, fields, methods, and parameters, offering insights o ...
Posted on Fri, 11 Sep 2026 16:04:07 +0000 by Jakehh
Implementing Deep and Shallow Cloning in C#
Reflection-Based Cloning Implementation
This approach uses reflection to create deep clones of objects:
public abstract class CloneableBase : ICloneable
{
public object Clone()
{
object cloneInstance = Activator.CreateInstance(GetType());
FieldInfo[] cloneFields = cloneInstance.GetType().GetFields();
int ...
Posted on Sat, 29 Aug 2026 16:32:34 +0000 by davidska
Mastering Java Reflection: Runtime Class Inspection and Manipulation
Core Principles of Reflection
Java's reflection API enables dynamic examination and modification of class structures during program execution. This capability allows applications to interact with classes whose definitions are unknown at compile time, forming the backbone of many modern frameworks and dynamic systems.
Obtaining Class Metadata
Ev ...
Posted on Sun, 23 Aug 2026 16:18:10 +0000 by krispykreme
Implementing the Builder Design Pattern in C#
Classic Implementation
Definision
The Builder Pattern decouples the construction of a complex object from its representation, allowing the same construction process to create different representations.
Pattern Structure
Abstract Builder (Builder): Defines an abstract interface for creating parts of a Product object. It specifies what needs to ...
Posted on Wed, 19 Aug 2026 16:44:28 +0000 by m@tt
Advanced Java Code Obfuscation Techniques
During a recent code review session, I was struck by the diverse approaches to writing code in our team. It became clear that maintaining consistent coding standards remains an ongoing challenge.
Today, let's explore some advanced Java techniques that can make your code perplexing to colleagues. Mastering these techniques will give your code an ...
Posted on Mon, 17 Aug 2026 16:26:08 +0000 by cosmicsea
Day 3 Part 1: Dish Management (AOP, Custom Annotations, Reflection, File Upload)
The automatic filling of common fields primarily uses AOP (Aspect-Oriented Programming), involving reflection mechanisms and custom annotations. For adding new dishes, we learn about file upload techniques using Alibaba Cloud OSS for cloud storage, along with handling relationships between two tables—retrieving dish IDs from the dish_flavor tab ...
Posted on Sun, 09 Aug 2026 16:04:58 +0000 by tzuriel
Understanding AS3 Reflection: getDefinitionByName, getQualifiedClassName, and getQualifiedSuperclassName
The flash.utils package provides several reflection methods that allow developers to inspect class information at runtime. These utilities can transform string class paths into actual class references and retrieve metadata about object hierarchies.
getDefinitionByName
This function converts a fully-qualified class name string into an actual cla ...
Posted on Sun, 02 Aug 2026 16:40:51 +0000 by aboyd
Understanding Java Reflection Through Practical Examples
Java reflection is a powerful feature that enables inspection and manipulation of classes, methods, fields, and constructors at runtime—even when their names are not known at compile time. This capability allows programs to examine or "reflect upon" themselves, and manipulate intenral properties of classes.
Consider this analogy: imag ...
Posted on Thu, 30 Jul 2026 16:10:40 +0000 by Vivid Lust
Implementing and Processing Custom Java Annotations
Creating custom annotations in Java involves defining the annotation interface, applying it to relevant code elements, and then implementing an annotation processor to interpret and act up on these annotations using reflection. This powerful mechanism allows for metadata-driven programming, where code behavior can be influenced without altering ...
Posted on Wed, 29 Jul 2026 17:06:59 +0000 by bijukon
Generating Dynamic Excel Files in Spring Boot with Apache POI
Introduction
Implementing data export functionality is a common requirement in enterprise Java applications. By leveraging the Apache POI library, developers can generate Excel spreadsheets programmatically. This approach allows for dynamic column mapping using Java annotations and reflection, ensuring that the spreadsheet structure remains syn ...
Posted on Tue, 28 Jul 2026 17:14:55 +0000 by Darkmatter5