Lines Matching refs:name
34 * to find a public field with specified name
48 * @param name the name of field to find
53 public static Field findField(Class<?> type, String name) throws NoSuchFieldException {
54 if (name == null) {
55 throw new IllegalArgumentException("Field name is not set");
57 Field field = type.getField(name);
59 throw new NoSuchFieldException("Field '" + name + "' is not public");
63 throw new NoSuchFieldException("Field '" + name + "' is not accessible");
73 * @param name the name of field to find
78 public static Field findInstanceField(Class<?> type, String name) throws NoSuchFieldException {
79 Field field = findField(type, name);
81 throw new NoSuchFieldException("Field '" + name + "' is static");
91 * @param name the name of field to find
96 public static Field findStaticField(Class<?> type, String name) throws NoSuchFieldException {
97 Field field = findField(type, name);
99 throw new NoSuchFieldException("Field '" + name + "' is not static");