MethodDeclaration md = node.upIfParameterToMethodDeclaration();
ConstructorDeclaration cd = node.upIfParameterToConstructorDeclaration();
Node last;
if (md != null) last = md.astParameters().last();
else if (cd != null) last = cd.astParameters().last();
else last = null;
if (node != last) {
node.addMessage(error(VARIABLEDEFINITION_VARARGS_NOT_LEGAL_HERE, "Varargs are only legal on the last parameter of a constructor or method."));
}