Re: RE: Pushing Integer(), getting int, how to deal with?
Eugene Kuleshov <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
You can also use GeneratorAdapter.box() and .unbox() methods to convert top of the stack to and from primitive types. It is handy when you need to deal with reflection of java Proxy API. regards, Eugene On Fri, May 7, 2010 at 2:06 PM, Tim Eck <[email protected]> wrote: > You’re going to need to make an Integer yourself. > > mv.visitFieldInsn(GETSTATIC, "java/lang/System", "err", > "Ljava/io/PrintStream;"); > > mv.visitLdcInsn(new Integer(10)); > > mv.visitMethodInsn(INVOKESTATIC, "java/lang/Integer", "valueOf", > "(I)Ljava/lang/Integer;"); > > mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", > "(Ljava/lang/Object;)V");
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