Annotation[][] parameterAnnotations = method.getParameterAnnotations();
ParameterDetail[] parameterDetails = new ParameterDetail[parameterTypes.length];
OperationType operationType = opAnnotation.type();
for (int i = 0; i < parameterTypes.length; i++) {
OperationParameter paramAnnotation = null;
for (Annotation annotation : parameterAnnotations[i]) {
if (annotation.annotationType() == OperationParameter.class) {
paramAnnotation = (OperationParameter) annotation;
break;
}
}
String name = paramAnnotation != null ? paramAnnotation.name() : ("arg" + i);
String description = paramAnnotation != null ? paramAnnotation.description() : null;
parameterDetails[i] = new ParameterDetail(parameterTypes[i], name, description);
}
// Com todas as informações, criamos nossa instância de MethodDetail e