Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.99 KB

File metadata and controls

26 lines (18 loc) · 1.99 KB

JMDispatch Change Log

2026-03-29 — Refactor: make autoN a singleton

Removed nTypes from FunctorImplementationBuilderAbstract constructor; it is now passed as a parameter to buildLambaImplementationClass() at call time via table.nTypes(). This makes all builder instances stateless w.r.t. arity, so autoN in AutoRegister becomes a static final singleton like auto1 and auto2 — no more per-call allocation. Also removed the unused classOfFunctor field from AutoRegisterAbstract.

2026-03-29 — Release 2.0: multi-module split (core + auto)

Split the single-module project into a Maven multi-module structure:

  • jmdispatch-core: Pure dispatch table with no runtime dependencies. Supports lambda-based handler registration via table.register(types, functor).
  • jmdispatch-auto: Annotation-driven auto-registration (@Dispatch + AutoRegister). Depends on core + ASM for bytecode generation.
  • jmdispatch-sample-core: Collision demo using lambda functors (core only).
  • jmdispatch-sample-auto: Collision + serialization demos using @Dispatch annotation.

Breaking API change: autoregister() moved from DispatchTable to AutoRegister.autoregister(table, ...).

Bug fixes:

  • Static @Dispatch methods failed when registered via autoregister(table, instance) — the instance was incorrectly passed to the no-arg functor constructor.
  • Copy-paste error: Functor1.class instead of Functor2.class in AutoRegister.auto2 field.

Design decisions:

  • Core module has zero runtime dependencies (no ASM) — users who register handlers with lambdas don't pay for bytecode generation.
  • TestUtils (type hierarchy A/B/C/X/Y) is duplicated in both test modules rather than introducing a shared test-jar dependency, keeping the build simple.
  • Sample modules set maven.deploy.skip=true so only the two library artifacts are published to Maven Central.
  • Javadoc in core classes cleaned of all references to @Dispatch/autoregister since core doesn't depend on auto.