You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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" )
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: