javadoc doclet: how to get enum contant fields -
i need field values of enum constant.
for example have enum:
public enum testenum { aaa("text 1", 10), bbb("text 2", 20); private final string text; private final int weight; testenum(string text, int weight) { this.text = text; this.weight = weight; } public string gettext() { return this.text; } public string getweight() { return this.weight; } }
enum constants accessible via method enumconstants().
how can declared values conrete enum constant? (i need information enum constant aaa has 'text 1' field text , 10 field weight).
Comments
Post a Comment