-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Outline
Combine the type safety and determinism of enumerations with the runtype/deploy time extensibility offered by configuration files. A half-open enumeration type will first look through it's predefined (in-code) specifications, and add a new type object in case the requested type is not available.
Usage desiderata
Should read similarly to the Optional
class in java enumFor(String name).orElse(EnumClass::create).
Implementation Notes
- This is basically a constrained Factory Class pattern on top of predefined enumerations.
- There should be an option to configure the factory to only allow the creation of new Type-objects if they adhere to certain conditions ( e.g. "exist in database", "are listed in config file", "contain certain words" )
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request