[MAGNOLIA-3085] Allow to retrieve module instances by class rather than by name Created: 16/Feb/10  Updated: 23/Jan/13  Resolved: 16/Feb/10

Status: Closed
Project: Magnolia
Component/s: core, updatemechanism
Affects Version/s: None
Fix Version/s: 4.3

Type: Improvement Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: module, moduleregistry, modules
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
duplicate
duplicates MAGNOLIA-2761 ModuleRegistry: retrieve module by class Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Comments   
Comment by Magnolia International [ 16/Feb/10 ]

This is now possible:

// yay, no cast needed.
final CoreModule core = reg.getModuleInstance(CoreModule.class);

Although you don't have to add an inline comment starting with the word "yay".

Generated at Mon Feb 12 03:43:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.