[jboss-dev-forums] [Design of JBoss Build System] - Re: JBossRetro cannot replace final reference to StringBuild
kfinkels
do-not-reply at jboss.com
Thu May 14 01:46:57 EDT 2009
sorry for the late response. I was not able to log into the forum for weeks.
here is the byte code for the following source code:
source code:
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
StringBuilder builder = new StringBuilder();
builder.append("Hello");
label = new JLabel(builder.toString());
frame.add(label);
}
});
bytecode after running with jboss-retro:
public void actionPerformed(java.awt.event.ActionEvent e);
0 new org.jboss.lang.[img]JBossStringBuilder [/img][23]
3 dup
4 invokespecial org.jboss.lang.JBossStringBuilder() [25]
7 astore_2 [builder]
8 aload_2 [builder]
9 ldc <String "Hello"> [26]
11 invokevirtual org.jboss.lang.JBossStringBuilder.append(java.lang.String) : org.jboss.lang.JBossStringBuilder [28]
14 pop
15 aload_0 [this]
16 getfield demoAOP.HelloMainFrame$1.this$0 : demoAOP.HelloMainFrame [12]
19 new javax.swing.JLabel [32]
22 dup
23 aload_2 [builder]
24 invokevirtual org.jboss.lang.JBossStringBuilder.toString() : java.lang.String [34]
27 invokespecial javax.swing.JLabel(java.lang.String) [38]
30 invokestatic demoAOP.HelloMainFrame.access$0(demoAOP.HelloMainFrame, javax.swing.JLabel) : void [41]
33 aload_0 [this]
34 getfield demoAOP.HelloMainFrame$1.this$0 : demoAOP.HelloMainFrame [12]
37 invokestatic demoAOP.HelloMainFrame.access$1(demoAOP.HelloMainFrame) : javax.swing.JFrame [47]
40 aload_0 [this]
41 getfield demoAOP.HelloMainFrame$1.this$0 : demoAOP.HelloMainFrame [12]
44 invokestatic demoAOP.HelloMainFrame.access$2(demoAOP.HelloMainFrame) : javax.swing.JLabel [51]
47 invokevirtual javax.swing.JFrame.add(java.awt.Component) : java.awt.Component [55]
50 pop
51 return
Line numbers:
[pc: 0, line: 31]
[pc: 8, line: 32]
[pc: 15, line: 33]
[pc: 33, line: 34]
[pc: 51, line: 35]
Local variable table:
[pc: 0, pc: 52] local: this index: 0 type: new demoAOP.HelloMainFrame(){}
[pc: 0, pc: 52] local: e index: 1 type: java.awt.event.ActionEvent
[pc: 8, pc: 52] local: builder index: 2 type: java.lang.StringBuilder
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230982#4230982
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230982
More information about the jboss-dev-forums
mailing list