users@codemodel.java.net

Re: Where is JInvocation#getArgs()

From: Johannes Schneider <mailings_at_cedarsoft.com>
Date: Tue, 15 Jun 2010 15:01:40 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks.

On 06/15/2010 12:27 AM, Aleksei Valikov wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_codemodel.dev.java.net
> For additional commands, e-mail: users-help_at_codemodel.dev.java.net
>

- --
Johannes Schneider - blog.cedarsoft.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJMF3m0AAoJEAytD9R7Qv6d1z8H/1YmPtZHhIllXgyxAijHO4vh
9B48GqLgicF6FC5D4sllGRIGVamDNhFzyb9hCZa6feSNsvC7D018PBo2Ze5zd1JF
B4gGnNwb3ThWn8z7VcIHdn71nsF61A7cZOARjYN86XSci2e9c7iEGXRLt/0Q+tZe
MQEuG6h6pqULme+oANfZltR24g0brhej6P1snjgTXAc7hgX3XgBqfqbdy8x8tdcn
rOhrJf+vc9/vXBK9vOygTnfX/vTmjRM43buOEYqyNuC80VeA+ecHHQnUlVrl+pTc
yuyB+0jl9eiQiXdKwMaVDx/ME1kF3Zz5xyEa/akVS4BxQZo3xOAyT2/AFJ6dSYU=
=41M/
-----END PGP SIGNATURE-----