}
// and methods
for (MethodDoc method : formDoc.methods(false)) {
if (!method.returnType().qualifiedTypeName().equals("void") || method.parameters().length != 1 || !method.name().startsWith("set"))
continue;
Parameter parameter = method.parameters()[0];
final AnnotationDesc pathParamAnnotation = Utils.findParameterAnnotation(method, parameter, 0, PathParam.class);
if (pathParamAnnotation != null) {
String name = (String) Utils.getAnnotationValue(pathParamAnnotation);
pathParameters.add(new FormMethodParameter(method, pathParamAnnotation, MethodParameterType.Path));
continue;
}
final AnnotationDesc matrixParamAnnotation = Utils.findParameterAnnotation(method, parameter, 0, MatrixParam.class);
if (matrixParamAnnotation != null) {
String name = (String) Utils.getAnnotationValue(matrixParamAnnotation);
matrixParameters.add(new FormMethodParameter(method, matrixParamAnnotation, MethodParameterType.Matrix));
continue;
}
final AnnotationDesc queryParamAnnotation = Utils.findParameterAnnotation(method, parameter, 0, QueryParam.class);
if (queryParamAnnotation != null) {
String name = (String) Utils.getAnnotationValue(queryParamAnnotation);
queryParameters.add(new FormMethodParameter(method, queryParamAnnotation, MethodParameterType.Query));
continue;
}
final AnnotationDesc headerParamAnnotation = Utils.findParameterAnnotation(method, parameter, 0, HeaderParam.class);
if (headerParamAnnotation != null) {
String name = (String) Utils.getAnnotationValue(headerParamAnnotation);
headerParameters.add(new FormMethodParameter(method, headerParamAnnotation, MethodParameterType.Header));
continue;
}
final AnnotationDesc cookieParamAnnotation = Utils.findParameterAnnotation(method, parameter, 0, CookieParam.class);
if (cookieParamAnnotation != null) {
String name = (String) Utils.getAnnotationValue(cookieParamAnnotation);
cookieParameters.add(new FormMethodParameter(method, cookieParamAnnotation, MethodParameterType.Cookie));
continue;
}
final AnnotationDesc formParamAnnotation = Utils.findParameterAnnotation(method, parameter, 0, FormParam.class);
if (formParamAnnotation != null) {
String name = (String) Utils.getAnnotationValue(formParamAnnotation);
formParameters.add(new FormMethodParameter(method, formParamAnnotation, MethodParameterType.Form));
continue;
}
// I'm not sure if @Form can be used on setter methods on an @Form field, but just in case...
if(formClass != null) {
//recurse into @Form parameters
final AnnotationDesc formAnnotation = Utils.findParameterAnnotation(method, parameter, 0, formClass);
if(formAnnotation != null) {
walkFormParameter(parameter.type().asClassDoc());
continue;
}
}
final AnnotationDesc contextAnnotation = Utils.findParameterAnnotation(method, parameter, 0, Context.class);
if (contextAnnotation == null) {