Hi,
> I'd like to find out how many arguments I have still added to a
> JInvocation. At the moment that is not possible.
> Is there a reason why there isn't no JInvocation#getArgs() method or is
> it just missing?
I think it's a reasonable request. I've added the following method:
/**
* Returns all arguments of the invocation.
* @return
* If there's no arguments, an empty array will be returned.
*/
public JExpression[] listArgs() {
return args.toArray(new JExpression[args.size()]);
}
Analogous to JMethod.listParams().
CodeModel generally does not provide much "read" methods since it was
initially developed as "write-only".
Bye.
/lexi