Skip to content

VasylP0/java-oop-ru-reflections

Repository files navigation

Java OOP — Reflections Project

This project is part of the Hexlet Java OOP course.
It demonstrates the use of Java’s Reflection API, annotations, and runtime class inspection to build flexible and introspective systems.


🧩 Project Overview

The goal of this assignment is to show how your code can analyze and modify itself at runtime, and how annotations and reflection can be used to build dynamic tools and frameworks.

Key learning outcomes:

  • Using the Reflection API to inspect classes, methods, fields, and constructors
  • Defining and processing custom annotations
  • Building utilities that work with unknown classes at runtime
  • Applying reflective techniques to validate, instantiate, or serialize objects

🏗️ Main Components

In this project you’ll find:

  • Custom annotation(s) (e.g., @MyAnnotation, @Validate) – used to mark classes/methods/fields for reflective processing
  • Reflection utilities (e.g., ClassInspector, AnnotationProcessor) – that scan for annotated elements and perform actions at runtime
  • Example usage under examples/ showing how reflective patterns can replace hard-coded logic

🧪 Run Tests

To verify correctness locally:

./gradlew clean test

Expected result:

BUILD SUCCESSFUL

🗂️ Project Structure

.
├── build.gradle
├── settings.gradle
├── Makefile
├── README.md
├── src
│   ├── main/java/exercise/
│   │   ├── (Your annotation classes)
│   │   ├── (Your reflection-helper classes)
│   └── test/java/exercise/
│       └── (Your JUnit tests for reflective functionality)
└── examples/
    └── (Demonstration classes using reflection)

📚 Technologies Used

  • Java 21
  • Gradle
  • JUnit 5
  • Ubuntu / cross-platform compatible

💡 Author

Vasyl Polyak
📍 Pittsburgh, PA
GitHub: VasylP0


🏫 Course

Hexlet Java OOP Track
Project: java-oop-ru/reflections

About

Hexlet Java OOP course assignment: reflection API, annotations, and runtime class inspection in Java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published