List of usage examples for java.lang.reflect Executable getModifiers
public abstract int getModifiers();
From source file:MyClass.java
public static String getModifiers(Executable exec) { int mod = exec.getModifiers(); if (exec instanceof Method) { mod = mod & Modifier.methodModifiers(); } else if (exec instanceof Constructor) { mod = mod & Modifier.constructorModifiers(); }// w ww. j a v a2 s .co m return Modifier.toString(mod); }