### Question:
FieldInfoResolver { public static Stream<FieldInfo> resolve(Class<?> beanClass) { return new FieldInfoResolver(beanClass).resolve(); } private  FieldInfoResolver(Class<?> beanClass); static Stream<FieldInfo> resolve(Class<?> beanClass);  }### Answer:
@Test void test() { Map<String, FieldInfo> infoMap = new HashMap<>(); FieldInfoResolver.resolve(Foo.class) .forEach(fieldInfo -> infoMap.put(fieldInfo.name, fieldInfo)); assertNull(infoMap.get("publicStatic")); assertNull(infoMap.get("publicStatic0")); assertNull(infoMap.get("privateStatic0")); assertNull(infoMap.get("private0")); assertNull(infoMap.get("private2")); assertNull(infoMap.get("protected0")); assertNull(infoMap.get("methodField1")); assertNull(infoMap.get("methodField2")); assertNotNull(infoMap.get("public0")); assertNotNull(infoMap.get("protected1")); assertNotNull(infoMap.get("publicWithGetterSetter0")); assertNotNull(infoMap.get("privateWithGetter0")); assertNotNull(infoMap.get("privateWithSetter0")); assertNotNull(infoMap.get("privateWithGetterSetter0")); assertNotNull(infoMap.get("methodField0")); assertNotNull(infoMap.get("methodField3")); assertNotNull(infoMap.get("methodField4")); FieldInfo info; info = infoMap.get("public0"); assertNotNull(info.getField()); assertNull(info.getGetterMethod()); assertNull(info.getSetterMethod()); info = infoMap.get("publicWithGetterSetter0"); assertNotNull(info.getField()); assertNotNull(info.getGetterMethod()); assertNotNull(info.getSetterMethod()); info = infoMap.get("privateWithGetter0"); assertNull(info.getField()); assertNotNull(info.getGetterMethod()); assertNull(info.getSetterMethod()); info = infoMap.get("privateWithSetter0"); assertNull(info.getField()); assertNull(info.getGetterMethod()); assertNotNull(info.getSetterMethod()); info = infoMap.get("privateWithGetterSetter0"); assertNull(info.getField()); assertNotNull(info.getGetterMethod()); assertNotNull(info.getSetterMethod()); info = infoMap.get("protected1"); assertNull(info.getField()); assertNotNull(info.getGetterMethod()); assertNull(info.getSetterMethod()); info = infoMap.get("methodField0"); assertNull(info.getField()); assertNotNull(info.getGetterMethod()); assertNull(info.getSetterMethod()); info = infoMap.get("methodField3"); assertNull(info.getField()); assertNull(info.getGetterMethod()); assertNotNull(info.getSetterMethod()); info = infoMap.get("methodField4"); assertNull(info.getField()); assertNotNull(info.getGetterMethod()); assertNull(info.getSetterMethod()); }