xiaodududu / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Add public api: Named.getValue() #534

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In my properties file, I need to specify a sorting order, such as 
sort_10=abc
sort_20=def
sort_30=html

I would like to figure out the order by doing:
get properties name starting with "sort_", use the following integer as index 
for ordering.

I found it is hard to do it from Injector because it missed the api proposed. 

I could do my algorithm in multiple ways. but adding this api seems helpful. 

Original issue reported on code.google.com by ma.qian...@gmail.com on 27 Aug 2010 at 11:08

GoogleCodeExporter commented 9 years ago
@Named already has a method to get the value at runtime: Named.value()

[this doesn't show up in the latest javadoc, but that's a bug in the new 
javadoc renderer]

Original comment by mccu...@gmail.com on 28 Aug 2010 at 1:44

GoogleCodeExporter commented 9 years ago

Original comment by sberlin on 24 Sep 2010 at 1:11