AttributeBytecodeGenerator { static void ensureParameterizedGetterExists(Class<?> pojoClass, Class<?> attributeValueType, String parameterizedGetterMethodName, String getterParameter, String attributeName) { try { if (getterParameter.contains("\"") || getterParameter.contains("\\")) { throw new IllegalArgumentException("Getter parameter contains unsupported characters: " + getterParameter); } while (pojoClass != null) { try { pojoClass.getDeclaredMethod(parameterizedGetterMethodName, String.class); return; } catch (NoSuchMethodException e) { pojoClass = pojoClass.getSuperclass(); } } throw new NoSuchMethodException(parameterizedGetterMethodName + "(String)"); } catch (Exception e) { throw new IllegalStateException(getExceptionMessage(pojoClass, attributeValueType, attributeName), e); } }  static Map<String, ? extends Attribute<O, ?>> createAttributes(Class<O> pojoClass); @SuppressWarnings("unchecked") static Map<String, ? extends Attribute<O, ?>> createAttributes(Class<O> pojoClass, MemberFilter memberFilter); @SuppressWarnings("unchecked") static Map<String, ? extends Attribute<O, ?>> createAttributes(Class<O> pojoClass, MemberFilter memberFilter, Function<Member, String> attributeNameProducer); @SuppressWarnings("unchecked") static Class<? extends SimpleAttribute<O, A>> generateSimpleAttributeForField(Class<O> pojoClass, Class<A> attributeValueType, String fieldName, String attributeName); @SuppressWarnings("unchecked") static Class<? extends SimpleAttribute<O, A>> generateSimpleAttributeForGetter(Class<O> pojoClass, Class<A> attributeValueType, String getterMethodName, String attributeName); @SuppressWarnings("unchecked") static Class<? extends SimpleAttribute<O, A>> generateSimpleAttributeForParameterizedGetter(Class<O> pojoClass, Class<A> attributeValueType, String getterMethodName, String getterParameter, String attributeName); @SuppressWarnings("unchecked") static Class<? extends SimpleNullableAttribute<O, A>> generateSimpleNullableAttributeForField(Class<O> pojoClass, Class<A> attributeValueType, String fieldName, String attributeName); @SuppressWarnings("unchecked") static Class<? extends SimpleNullableAttribute<O, A>> generateSimpleNullableAttributeForGetter(Class<O> pojoClass, Class<A> attributeValueType, String getterMethodName, String attributeName); @SuppressWarnings("unchecked") static Class<? extends SimpleNullableAttribute<O, A>> generateSimpleNullableAttributeForParameterizedGetter(Class<O> pojoClass, Class<A> attributeValueType, String getterMethodName, String getterParameter, String attributeName); @SuppressWarnings("unchecked") static Class<? extends MultiValueAttribute<O, A>> generateMultiValueAttributeForField(Class<O> pojoClass, Class<A> attributeValueType, String fieldName, String attributeName); @SuppressWarnings("unchecked") static Class<? extends MultiValueAttribute<O, A>> generateMultiValueAttributeForGetter(Class<O> pojoClass, Class<A> attributeValueType, String getterMethodName, String attributeName); @SuppressWarnings("unchecked") static Class<? extends MultiValueAttribute<O, A>> generateMultiValueAttributeForParameterizedGetter(Class<O> pojoClass, Class<A> attributeValueType, String getterMethodName, String getterParameter, String attributeName); @SuppressWarnings("unchecked") static Class<? extends MultiValueNullableAttribute<O, A>> generateMultiValueNullableAttributeForField(Class<O> pojoClass, Class<A> attributeValueType, String fieldName, boolean componentValuesNullable, String attributeName); @SuppressWarnings("unchecked") static Class<? extends MultiValueNullableAttribute<O, A>> generateMultiValueNullableAttributeForGetter(Class<O> pojoClass, Class<A> attributeValueType, String getterMethodName, boolean componentValuesNullable, String attributeName); @SuppressWarnings("unchecked") static Class<? extends MultiValueNullableAttribute<O, A>> generateMultiValueNullableAttributeForParameterizedGetter(Class<O> pojoClass, Class<A> attributeValueType, String getterMethodName, String getterParameter, boolean componentValuesNullable, String attributeName);  }
@Test(expected = IllegalStateException.class) public void testEnsureParameterizedGetterExists_Negative1() { ensureParameterizedGetterExists(String.class, Integer.class, "xxxxxxxxxx", "x", "na"); }
@Test(expected = IllegalStateException.class) public void testEnsureParameterizedGetterExists_Negative2() { ensureParameterizedGetterExists(String.class, Integer.class, "xxxxxxxxxx", "\"foo\"", "na"); }
@Test(expected = IllegalStateException.class) public void testEnsureParameterizedGetterExists_Negative3() { ensureParameterizedGetterExists(String.class, Integer.class, "xxxxxxxxxx", "\\foo", "na"); }