class 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);
        }
    }

}