RE: Pushing Integer(), getting int, how to deal with?
"Tim Eck" <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <023301caee0f$f526c7c0$df745740$@com> |
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"); From: Jeremy Cowgar [mailto:[email protected]] Sent: Friday, May 07, 2010 10:36 AM To: [email protected] Subject: [asm] Pushing Integer(), getting int, how to deal with? I have this small section of code that is causing me problems: mw.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;"); mw.visitLdcInsn(new Integer(10)); mw.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/Object;)V"); How can I handle this situation? This is not the case of what my real code looks like, but I broke the problem down into these three lines trying to solve the problem. Jeremy
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