I have a constants class full of a bunch of final static strings. I need a way to get access to all these constants in this class in a nice array type form without manually created an array with each constant.
Is there any type of method on a class that could give me back an iterative data-structure that I could loop through in another class?
Thanks!
You can use reflection to get the declared fields:
This sample is from here