List of usage examples for java.lang.reflect Modifier fieldModifiers
public static int fieldModifiers()
From source file:Main.java
public static void main(String... args) throws Exception { System.out.println(Modifier.toString(Modifier.fieldModifiers())); }
From source file:MySuperClass.java
public static ArrayList<String> getFieldsDesciption(Field[] fields) { ArrayList<String> fieldList = new ArrayList<>(); for (Field f : fields) { int mod = f.getModifiers() & Modifier.fieldModifiers(); String modifiers = Modifier.toString(mod); Class<?> type = f.getType(); String typeName = type.getSimpleName(); String fieldName = f.getName(); fieldList.add(modifiers + " " + typeName + " " + fieldName); }/*from w w w. j a v a 2 s.c o m*/ return fieldList; }