Hello!
I'd like to get all Attributes and their values from a public final static class. And most of all I don't want to repeat them in a method.
The class looks like this:
[tt]
public class CommandIdsConst
{
public final static String OPEN_MAILBOX = "open my mailbox";
public final static String SORT_MAILBOX = "sort my mailbox";
.......
}
[/tt]
And in a JSP I'd like to get all these attributes and their values. Could be something like
[tt]
Hashtable myConsts = new Hashtable();
myConsts = CommandIdsConst.getAllAttributes();
[/tt]
Does something like that exist? I.e. by making the class CommandIdsConst a subclass of the one that has the getAllAttributes() methods?
Thanx for any help
Eva
I'd like to get all Attributes and their values from a public final static class. And most of all I don't want to repeat them in a method.
The class looks like this:
[tt]
public class CommandIdsConst
{
public final static String OPEN_MAILBOX = "open my mailbox";
public final static String SORT_MAILBOX = "sort my mailbox";
.......
}
[/tt]
And in a JSP I'd like to get all these attributes and their values. Could be something like
[tt]
Hashtable myConsts = new Hashtable();
myConsts = CommandIdsConst.getAllAttributes();
[/tt]
Does something like that exist? I.e. by making the class CommandIdsConst a subclass of the one that has the getAllAttributes() methods?
Thanx for any help
Eva