eclipse / ConfigJSR

JSR382
Apache License 2.0
30 stars 22 forks source link

Create a new method on Config to get ConfigAccessor #93

Closed Emily-Jiang closed 5 years ago

Emily-Jiang commented 6 years ago

We should add a method on Config to get a ConfigAccessor instead of just getting String version

ConfigAccessor<T> access = config.access(String propName, T clazz)

As a consequence, the following method can be removed.

ConfigAccessor as(Class clazz);
struberg commented 6 years ago

As already explained in the EG meeting I think we do not need this. The functionality is already covered via config.access("my.server.port").as(Integer.class)....; So this method is essentially duplicating existing functionality.