[Soot-list] Create a method with no arguments?

Kelvin Tian kevinn.tian at gmail.com
Fri Jul 24 12:12:22 EDT 2009


Yes, I've tried to use an empty list. But
java.lang.ArrayIndexOutOfBoundsException: 0  incurred.    It seems this way
won't do.  Have anybody tried to create a method with no arguments before?
Thanks,

--
Best regards,
Kelvin



On Wed, Jul 22, 2009 at 5:27 PM, Patrick Lam <plam at sable.mcgill.ca> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kelvin Tian wrote:
> >  Hi,
> >
> >     Just a silly question.  I wanna create a method with no arguments,
> > like this   void Foo().  The tutorial example to create main() method is
> > like below, and the second argument is a list, like below.
> > ===
> > method = new SootMethod("main",
> > Arrays.asList(new Type[] {ArrayType.v(RefType.v("java.lang.String"),
> 1)}),
> >  VoidType.v(), Modifier.PUBLIC | Modifier.STATIC);
> > ===
> >
> > If I want to create a method with no arguments, what am I supposed to
> > put as the second argument of SootMethod constructor?   I tried null,
> > VoidType.v() and so on, it just doesn't work.  Thanks for any
> suggestions!
>
> Have you tried just an empty list? new SootMethod("main", new
> LinkedList()); for instance, or Collections.emptyList().
>
> pat
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkpnhFYACgkQNTVxnNGEyOh5mQCeJU5/oS2re0S7FenFqKKL5M9R
> SEIAn1o7WHEyQ25khuxA39IqtuguoC/N
> =yhQ5
> -----END PGP SIGNATURE-----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20090724/7c77687c/attachment.html 


More information about the Soot-list mailing list