Skip to content

LibReflect Incubator

ImperaZim edited this page Jul 1, 2026 · 1 revision

LibReflect Incubator

The versioned source document is docs/libreflect-incubator.md.

LibReflect is not an official standalone package yet.

EasyLibrary 3.0-dev currently keeps a small experimental incubator under:

imperazim\library\reflect

Purpose

The incubator tests a future shared reflection shape for:

  • module class validation;
  • package entry validation;
  • provider diagnostics;
  • optional explicit attributes;
  • migration/debug metadata.

Current Pieces

Class Role
ClassInspector Inspects one explicit class/interface/trait name.
ClassInspection Read-only metadata, attributes and controlled instantiation.
ClassContract Validates inheritance, interfaces and instantiability.
ClassContractResult Structured validation result.
ClassFactory Instantiates only validated, instantiable classes.

Main Rule

Use reflection to validate explicit classes.
Do not turn it into hidden auto-discovery.

No global class scanning, no automatic command/module loader, no dependency injection container.

Status

The incubator is @experimental.

No new GitHub repo is required yet. A future official LibReflect package should only be created if real call sites prove that this shared contract makes code smaller or safer without hiding runtime behavior.

Clone this wiki locally