Re: Re: Re: Question on counting number of parameters for a MethodNode
Sai Zhang <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Oh. sorry for typo. I mean MethodInsnNode not MethodNode. I plan to instrument each method invocation in the insnlist, but skip the native method. Sorry for my confusion. -Sai On Wed, Jul 7, 2010 at 11:38 AM, Eugene Kuleshov <[email protected]>wrote: > (methodNode.access | Opcodes.ACC_NATIVE )>0 > > If I am not mistaken, native methods also going to have ACC_ABSTRACT flag > set. > > regards, > Eugene > > > On Wed, Jul 7, 2010 at 11:35 AM, Sai Zhang <[email protected]> > wrote: > > Thanks so much. Eugeue. > > > > Another trivial question is that is that any way to determine whether a > > MethodNode is a native method or not? > > > > I have tried to search the manual, browse the code, but did not find a > good > > API. Probably that is in the corner.. > > > > thanks > > > > -Sai > > > > On Wed, Jul 7, 2010 at 8:30 AM, Eugene Kuleshov <[email protected]> > wrote: > >> > >> You can use Type.getArgumentTypes(methodNode.desc) > >> > >> regards, > >> Eugene > >> > >> > >> Sai Zhang wrote: > >>> > >>> Hi all: > >>> > >>> I am wondering is there any good way (existing tool) in ASM to count > the > >>> number > >>> of parameters for a MethodNode class? > >>> > >>> That is given a MethodNode object, I need to know how many parameters > it > >>> has. It > >>> seems to me that the only way to get such information is to parse the > >>> "desc" field, > >>> which is a bit cumbersome. > >>> > >>> Anyone knows a better approach? Or is there some existing tools to do > so? > >>> Any > >>> comments are welcome, and your help is highly appreciated! > >>> > >>> thanks > >>> > >>> -Sai > >> > >> > >> > >> -- > >> You receive this message as a subscriber of the [email protected] mailing > list. > >> To unsubscribe: mailto:[email protected] > >> For general help: mailto:[email protected]?subject=help > >> OW2 mailing lists service home page: http://www.ow2.org/wws > >> > > > > > > > -- > You receive this message as a subscriber of the [email protected] mailing list. > To unsubscribe: mailto:[email protected] > For general help: mailto:[email protected]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > >
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws