state-machine-systems / envy

Super simple configuration for Java.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parse Collection values

johnwright opened this issue · comments

  • If the return type is Collection, pick a default implementation (e.g. ArrayList)
  • If the return type is a concrete descendant of Collection, instantiate it via its default constructor
  • If the return type is an abstract descendant of Collection, choose a default implementation (or just throw an exception?)
  • Nested collections or arrays within collections aren't allowed

Current array handling assumes that values are comma-separated in a single parameter.

It might be worth considering the style of collections used by Spring and Typesafe Config, i.e.

// my.property.0=foo
// my.property.1=bar

interface Config {
  List<String> myProperty();
}