# Getting Started

## What This Project Does

This is a **Java source code license header management tool**. It handles adding, validating, and maintaining license headers in Java source files — from simple one-line notices to deeply-versioned processing headers spanning hundreds of entries.

## Recommended Reading Order

| Order | Topic | Why Read It |
|-------|-------|-------------|
| 1 | [Project Structure](#project-structure) | See where everything lives |
| 2 | [Key Entry Points](#key-entry-points) | Understand the core classes |
| 3 | [Common Patterns](#common-patterns) | Learn coding conventions used across the codebase |

## Key Entry Points

| Class | Purpose |
|-------|---------|
| [Crosslink](src/main/java/Crosslink.java) | Minimal class with a `field` — a stub or placeholder for cross-linking test cases |
| [LongHeader](src/main/java/LongHeader.java) | Demonstrates handling of extremely long, multi-version copyright headers (250+ entries) |
| [MitLicense](src/main/java/MitLicense.java) | Reference implementation for a simple MIT License header pattern |
| [NoHeader](src/main/java/NoHeader.java) | Edge-case class — no header at all; useful for testing "add missing header" logic |
| [PartialHeader](src/main/java/PartialHeader.java) | Contains a short, structured header block with Japanese project metadata |
| [WithHeader](src/main/java/WithHeader.java) | Fully-structured example: processing name, version line, author — the canonical header template |

Start with **NoHeader** and **MitLicense** to understand the simplest cases, then move to **WithHeader** for the full-featured template. **LongHeader** is useful when testing boundary conditions around very large header blocks.

## Project Structure

```
src/
  main/
    java/
      Crosslink.java
      LongHeader.java
      MitLicense.java
      NoHeader.java
      PartialHeader.java
      WithHeader.java
```

The entire source tree lives under `src/main/java/`. There are no sub-packages or additional modules — six standalone Java classes, each representing a different header pattern under test.

```mermaid
flowchart TD
    Root["src/main/java"]
    Root --> Crosslink["Crosslink"]
    Root --> LongHeader["LongHeader"]
    Root --> MitHeader["MitLicense"]
    Root --> NoHeader["NoHeader"]
    Root --> PartialHeader["PartialHeader"]
    Root --> WithHeader["WithHeader"]
```

## Configuration

This project currently contains no external configuration files (no `pom.xml`, `build.gradle`, `config/`, or `.properties` files). The project is a flat set of source files. If build configuration is added in the future, it will live at the project root.

## Common Patterns

- **Standalone classes** — Every `.java` file declares exactly one `public class` with no imports and no package declaration.
- **Javadoc headers** — All classes use a `/** ... */` Javadoc comment as a license header. The format varies:
  - Minimal: 2 lines (e.g. `MitLicense.java`)
  - Structured: processing name, version, author (e.g. `WithHeader.java`)
  - Extended: hundreds of version lines (e.g. `LongHeader.java`)
- **Header versioning** — Entries follow the pattern `vMM.NN.PP  TICKET-XXX  Author`, where `MM.NN.PP` is the version and `TICKET-XXX` is a tracking identifier.
- **Inline markers** — When adding or removing fields, the code uses `ADD START` / `ADD END` comment markers for traceability (see [Crosslink.java](src/main/java/Crosslink.java)).
- **No dependencies** — There are zero external library dependencies. Each class is self-contained.
