Class[] parameterTypes = method.getParameterTypes();
Annotation[][] parameterAnnotations = method.getParameterAnnotations();
final Expression[] parameterExpressions = new Expression[parameterTypes.length];
for (int i = 0; i < parameterTypes.length; i++) {
Class parameterType = parameterTypes[i];
Expression expression = createParameterUnmarshalExpression(clazz, method,
parameterType, parameterAnnotations[i]);
if (expression == null) {
if (LOG.isDebugEnabled()) {
LOG.debug("No expression available for method: "
+ method.toString() + " parameter: " + i + " so ignoring method");
}
return;
}
parameterExpressions[i] = expression;
}
// now lets add the method to the repository
String opName = method.getName();
if (method.getAnnotation(Operation.class) != null) {
String name = method.getAnnotation(Operation.class).name();
if (name != null && name.length() > 0) {
opName = name;
}
}
Expression parametersExpression = createMethodParametersExpression(parameterExpressions);
operations.put(opName, new MethodInfo(clazz, method, parametersExpression));
}