Solved
How to acces annotation properties
Hi,
I have a property like this:
@Property(name = "myvar", value = "myvalue")
I need to access this property inside the code.
I can do this with:
@Activate public void activate(ComponentContext ctx) { Dictionary dic = ctx.getProperties(); Enumeration keys = dic.keys(); List<String> list = Collections.list(keys); Collections.sort(list); for (String key : list) if (key.equals("myvar")) portal_server = String.valueOf(dic.get((Object) key)); }Is there a simpler way?
Thanks