oωo (owo-lib)

oωo (owo-lib)

46M Downloads

[Feature Request] [owo-config] Enum list support

Chailotl opened this issue · 1 comments

commented

You can have enums, and you can have lists, but could we also have enum lists too?

@Config(name = "my-config", wrapperName = "MyConfig")
public class MyConfigModel {
    public List<Choices> anEnumListOption = Arrays.asList(
        Choices.A_CHOICE,
        Choices.A_CHOICE,
        Choices.ANOTHER_CHOICE,
        Choices.A_CHOICE
    );

    public enum Choices {
        A_CHOICE, ANOTHER_CHOICE;
    }
}
commented

I have a hard time finding out how this would be useful, as I could see a possible use for an EnumSet but even then not really. The example given is maybe not the best to understand exactly how this feature is meant to be used. You can add support for such with the Option Provider API and futures changes to the config API may allow something similar.