[SOLVED] [newbie] converting Integer to java.lang.Enum.Modifier
Any idea how to convert the value retrieved from getModifiers to a Modifier so I can read it?
:confused:
Code:
package homenetwork.bkr.training;
import java.lang.reflect.*;
import java.lang.Enum.*;
public class ReflectionTest {
static boolean debug = true;
public static void main(String[] args) {
Class _cl = Employee.class.getClass();
Integer _m = Employee.class.getClass().getModifiers();
Modifier _modifier = _m;
//converting the integer to a modifier?
}
private static void printSomething() {
if (debug) System.out.println("Something");
}
/*NOTE:
* When using static methods, always make:
1. variables used by static methods as static
2. methods that are to be called without instantiating them (statically) as static
*/
}