class AnnotationParameterNameDiscoverer implements ParameterNameDiscoverer {

    @Override
    public String[] getParameterNames(Method method) {

        if (method.getParameterCount() == 0) {
            return new String[0];
        }

        return doGetParameterNames(method.getParameterAnnotations());
    }

    @Override
    public String[] getParameterNames(Constructor<?> ctor) {<FILL_FUNCTION_BODY>}

    protected String[] doGetParameterNames(Annotation[][] parameterAnnotations) {

        List<String> names = new ArrayList<>();

        for (int i = 0; i < parameterAnnotations.length; i++) {

            boolean foundParam = false;
            for (int j = 0; j < parameterAnnotations[i].length; j++) {

                if (parameterAnnotations[i][j].annotationType().equals(Param.class)) {
                    foundParam = true;
                    Param param = (Param) parameterAnnotations[i][j];
                    names.add(param.value());
                    break;
                }
            }

            if (!foundParam) {
                return null;
            }
        }

        return names.toArray(new String[names.size()]);
    }

}


        if (ctor.getParameterCount() == 0) {
            return new String[0];
        }

        return doGetParameterNames(ctor.getParameterAnnotations());
    
<no_super_class>