AccessorSyntheticField implements SyntheticField { protected List<String> getGetterNameAlternatives(String fieldName) { String base = capitalize(fieldName); List<String> res = new ArrayList<>(); res.add("get" + capitalize(fieldName)); res.add(fieldName); String alt = "is" + base; if (alt.startsWith("isIs")) { res.add("i" + alt.substring(3)); } res.add(alt); alt = "has" + base; if (!alt.startsWith("hasIs")) { if (alt.startsWith("hasHas")) { res.add("h" + alt.substring(4)); } else { res.add(alt); } } return res; } AccessorSyntheticField(ReflectionHelper reflectionHelper, Class<?> clazz, Field field);   AccessorSyntheticField(
            ReflectionHelper reflectionHelper, Class<?> clazz, String name, boolean readOnlyField); Object get(Object object); void set(Object object, Object value); String getName(); Class<?> getType(); Type getGenericType();  }
@Test public void testGetGetterNameAlternatives() throws Exception { assertThat(accessorSyntheticField.getGetterNameAlternatives("bla")). containsExactly("getBla", "bla", "isBla", "hasBla"); assertThat(accessorSyntheticField.getGetterNameAlternatives("isBla")). containsExactly("getIsBla", "isBla", "isBla", "isIsBla"); assertThat(accessorSyntheticField.getGetterNameAlternatives("hasBla")). containsExactly("getHasBla", "hasBla", "isHasBla", "hasBla"); }