static String getName(Object element) {
        if (element instanceof Parameter) {
            final Parameter parameter = (Parameter) element;
            if (!parameter.isNamePresent()) {
                throw new IllegalArgumentException(
                        "cannot obtain the name of the parameter or field automatically. " +
                        "Please make sure you compiled your code with '-parameters' option. " +
                        "Alternatively, you could specify the name explicitly in the annotation.");
            }
            return parameter.getName();
        }
        if (element instanceof Field) {
            return ((Field) element).getName();
        }
        throw new IllegalArgumentException("cannot find the name: " + element.getClass().getName());
    }
Returns the name of the {@link Parameter} or the {@link Field}.
@param element either {@link Parameter} or {@link Field}
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedElementNameUtil.java