AuthMe / ConfigMe

A simple configuration management library for any Java project!
MIT License
37 stars 16 forks source link

Type PropertyInitializer methods to concrete property types #321

Closed ljacqu closed 1 year ago

ljacqu commented 1 year ago

PropertyInitializer returns all properties as Property<Boolean>, Property<String> which is the best way of declaring properties (I just need the property type and don't need to know the implementation), however when doing more complicated things it clearly becomes useful to have fields with the concrete property type. Therefore, I would like to return, for example, BooleanProperty from a method instead of Property<Boolean>.

It shouldn't impact many workflows since we rarely expect the method to be typed first and then to be assigned to a variable, given that they're constants and you have to think about the type.