* RequestBody, this method will return a list of AnnotatedParameter
* objects based on the values of the parameter annotations
*/
public static List<AnnotatedParameter> getAnnotatedParameters(Method method) {
List<AnnotatedParameter> annotatedParameters = new ArrayList<>();
Paranamer paranamer = new BytecodeReadingParanamer();
String[] parameterNames;
//Attempt to use Paranamer to look up the parameter names for those not using Java 8+.
//This will fail if trying to evaluate a class using Lambdas, in which case fall back and look up using
//standard java reflections. This will provide the paramter name if using the -parameters javac argument.
try {
parameterNames = paranamer.lookupParameterNames(method);
} catch(Exception e) {
Parameter[] parameters = method.getParameters();
parameterNames = new String[parameters.length];
for (int i = 0; i < parameters.length; i++) {
Parameter parameter = parameters[i];