final List<PojoField> pojoFields = new ArrayList<>(fields.size()); for (Map.Entry<String, TypeInformation<?>> field : fields.entrySet()) { final Field f = TypeExtractor.getDeclaredField(pojoClass, field.getKey()); if (f == null) { throw new InvalidTypesException("Field '" + field.getKey() + "'could not be accessed.");
private Object getFieldValue(String fieldName, T input) { // TODO: Cache Field Accessor Field field = TypeExtractor.getDeclaredField(schema.getTypeInfo().getTypeClass(), fieldName); if (field == null) { throw new IllegalArgumentException(fieldName + " is not found in " + schema.getTypeInfo()); } if (!field.isAccessible()) { field.setAccessible(true); } try { return field.get(input); } catch (IllegalAccessException e) { throw new IllegalStateException(e.getMessage(), e); } } }
private Object getFieldValue(String fieldName, T input) { // TODO: Cache Field Accessor Field field = TypeExtractor.getDeclaredField(schema.getTypeInfo().getTypeClass(), fieldName); if (field == null) { throw new IllegalArgumentException(fieldName + " is not found in " + schema.getTypeInfo()); } if (!field.isAccessible()) { field.setAccessible(true); } try { return field.get(input); } catch (IllegalAccessException e) { throw new IllegalStateException(e.getMessage(), e); } } }
final List<PojoField> pojoFields = new ArrayList<>(fields.size()); for (Map.Entry<String, TypeInformation<?>> field : fields.entrySet()) { final Field f = TypeExtractor.getDeclaredField(pojoClass, field.getKey()); if (f == null) { throw new InvalidTypesException("Field '" + field.getKey() + "'could not be accessed.");
final List<PojoField> pojoFields = new ArrayList<>(fields.size()); for (Map.Entry<String, TypeInformation<?>> field : fields.entrySet()) { final Field f = TypeExtractor.getDeclaredField(pojoClass, field.getKey()); if (f == null) { throw new InvalidTypesException("Field '" + field.getKey() + "'could not be accessed.");
sb.delete(0, fieldName.length() + 1); Field field = TypeExtractor.getDeclaredField(clazz, fieldName); if (field == null) { throw new IllegalArgumentException("Field '" + fieldName + "'could not be accessed.");