{
protected static Log logger = LogFactory.getLog(ExpressionAnnotationsHelper.class);
public static ExpressionTransformer getTransformerForMethodWithAnnotations(Method method, MuleContext context) throws TransformerException, InitialisationException
{
ExpressionTransformer trans = new ExpressionTransformer();
trans.setMuleContext(context);
Annotation[][] annotations = method.getParameterAnnotations();
for (int i = 0; i < annotations.length; i++)
{
Annotation[] annotation = annotations[i];
for (int j = 0; j < annotation.length; j++)
{
Annotation ann = annotation[j];
ExpressionArgument arg = parseAnnotation(ann, method.getParameterTypes()[i], context);
if (arg != null)
{
trans.addArgument(arg);
}
}
}
trans.initialise();
return trans;
}