private MultiPart computeMultiPart( Method method, Object[] parameter ) {
FormDataMultiPart result = new FormDataMultiPart();
Annotation[][] parameterAnnotations = method.getParameterAnnotations();
for( int i = 0; i < parameterAnnotations.length; i++ ) {
Annotation[] annotations = parameterAnnotations[ i ];
FormDataParam param = extractAnnotation( annotations, FormDataParam.class );
if( param != null ) {
result.field( param.value(), parameter[ i ], determinePartContentType( parameter[ i ] ) );
}
}
return result.getFields().isEmpty() ? null : result;
}