# Repository Overview

Welcome! This repository contains a small Java project focused on demonstrating core object-oriented and reflection-based programming patterns. It includes two utility classes in the `eo.ejb.wiki` package: one that provides a straightforward data-holder with a greeting method, and another that leverages Java's reflection API to dynamically load classes and invoke methods at runtime. If you're looking to understand how compile-time type safety contrasts with runtime flexibility, this codebase is a concise starting point.

## Overview

This project appears to be an experimental or educational codebase rather than a production application. It showcases two complementary approaches to working with Java objects:

- **Compile-time binding** — where class structure, methods, and types are fully known at compile time.
- **Runtime binding** — where types are resolved dynamically using Java reflection, enabling polymorphism without compile-time type knowledge.

The repository is intentionally minimal, consisting of two Java source files in a single package. It contains no external framework dependencies and no complex build configuration, making it an easy entry point for understanding basic Java project structure and the reflection API.

## Technology Stack

| Category | Technology |
|----------|-----------|
| Language | Java |
| Build System | Not detected (possibly manual compilation or build tool not indexed) |
| Key Libraries | Standard JDK — `java.lang.Class`, `java.lang.reflect.Method` |
| Frameworks | None detected |

The code relies exclusively on the Java Standard Library. `ReflectiveClass` uses reflection APIs (`java.lang.Class` and `java.lang.reflect.Method`) from the JDK to achieve runtime class loading and method invocation. No third-party libraries or application frameworks are used.

## Architecture

At a high level, the project is organized as a single-module repository with two classes in the `eo.ejb.wiki` package. The following diagram shows the module and class structure:

```mermaid
flowchart TD
    Root["Repository Root"]
    Wiki["eo.ejb.wiki module"]
    PC["PlainClass"]
    RC["ReflectiveClass"]
    Wiki --> PC
    Wiki --> RC
    Root --> Wiki
```

The project is self-contained — both classes live in the same package and there are no cross-module dependencies. `PlainClass` and `ReflectiveClass` are independent of each other and serve as parallel examples of different approaches to object-oriented design.

## Module Guide

### eo.ejb.wiki

The `eo.ejb.wiki` package is the only module in this repository. It contains two utility classes that explore contrasting patterns for object creation and method invocation:

**PlainClass** provides a simple data-holder pattern. It stores a single `name` field and exposes a `greet()` method that returns a personalized greeting string. This class is an example of traditional, compile-time-bound Java: the class structure, its fields, and its behavior are all fully determined at compile time. It has no external dependencies and serves as a clear example of encapsulated state with behavior.

**ReflectiveClass** demonstrates Java reflection capabilities. It stores a fully-qualified class name and provides two key methods: `loadByReflection()` dynamically loads a class from that name and returns an instance, and `invokeMethod()` accepts any `Class<?>` and reflexively invokes a `public static` method named `execute` on it. This class illustrates how to achieve runtime polymorphism — loading types and calling methods without knowing them at compile time. It uses only the standard JDK reflection API.

The two classes appear to be intentionally paired, illustrating the trade-offs between compile-time type safety and runtime flexibility. Where `PlainClass` is straightforward and safe, `ReflectiveClass` is powerful but requires careful exception handling and makes assumptions about the classes it operates on.

## Getting Started

If you're new to this codebase, here is a recommended reading order:

1. **Read this overview** — you are here. It gives you the big picture of what the project does and how it is organized.

2. **Read `PlainClass.java`** — a 13-line class that is easy to understand at a glance. It defines a constructor accepting a `name` and a `greet()` method. This will orient you to the code style and structure.

3. **Read `ReflectiveClass.java`** — an 18-line class that uses Java reflection. It introduces `loadByReflection()` for dynamic class loading and `invokeMethod()` for reflexive method invocation. Reading this after `PlainClass` will highlight the contrast between compile-time and runtime approaches.

4. **Read the module documentation** — the full module wiki at `.codewiki/eo/ejb/wiki.md` provides detailed documentation of both classes, including field descriptions, method signatures, data model, and developer notes (such as exception handling considerations and testing suggestions).

### Quick entry points

- `PlainClass.java` — constructor and `greet()` method
- `ReflectiveClass.java` — constructor, `loadByReflection()`, and `invokeMethod()`
- `.codewiki/eo/ejb/wiki.md` — detailed module documentation with class reference and developer notes
