我正在閱讀反編譯的Java軟件的源代碼。它被混淆了,但我認爲它也應該遵守Java的規則。我希望這個類NK$1
被稱爲this.b.a.q()
的方法,但我沒有找到關於b
成員的任何信息,即使對於成員及其q()
方法。爲什麼代碼是這樣的?在反編譯混淆匿名內部類中找不到「this.b.a.q()」方法
嗨,根據你的回答,我發現在外部類b
,NK
。但是我仍然找不到a
,因爲b
是JButton
對象,我不覺得a
在JButton
有嗎?我在下面添加了外部類代碼。
1)下面是整個文件NK$1.class
(就像NK$1.java
)
package com.xxx;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
class NK$1
implements ActionListener
{
NK$1(NK paramNK, NI paramNI) {}
public void actionPerformed(ActionEvent paramActionEvent)
{
this.b.a.q(); ------------------> where is the b?
}
}
2)下面是NK.class
(外類)
package com.xxx;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JPanel;
class NK
extends JPanel
{
private JButton b; <-------------- this is b, but where is the a in "this.b.a.q()"?
NK(NI paramNI)
{
double[][] arrayOfDouble = { { 5.0D, -1.0D, -2.0D, 10.0D, -2.0D, 10.0D, -2.0D, 10.0D, -2.0D, 10.0D, -2.0D, 5.0D }, { 5.0D, -2.0D, 5.0D } };
ayI localayI = new ayI(arrayOfDouble);
setLayout(localayI);
JButton localJButton = new JButton("Load");
this.b = localJButton;
add(localJButton, "8,1,c,c");
localJButton.setMnemonic(76);
Icon localIcon = Fi.b();
if (localIcon != null) {
localJButton.setIcon(localIcon);
}
localJButton.addActionListener(new NK.1(this, paramNI)); <---------Here is the inner class
localJButton = FJ.d();
localJButton.setMnemonic(72);
add(localJButton, "1,1,l,c");
localJButton.addActionListener(new NK.2(this, paramNI));
if ((Gr.z() != null) && (!FI.ao()))
{
paramNI.h = new JButton("Download updates");
paramNI.h.setMnemonic(68);
paramNI.i = new NJ(paramNI);
add(paramNI.h, "2,1,c,c");
localIcon = Fi.c("SUITE_DOWNLOAD");
if (localIcon != null) {
paramNI.h.setIcon(localIcon);
}
paramNI.h.addActionListener(new NK.3(this, paramNI));
}
else
{
add(localJButton, "2,1,c,c");
}
localJButton = new JButton("Refresh");
add(localJButton, "6,1,c,c");
localIcon = Fi.c("REFRESH");
if (localIcon != null) {
localJButton.setIcon(localIcon);
}
localJButton.addActionListener(new NK.4(this, paramNI));
localJButton = new JButton("Close");
localJButton.setMnemonic(67);
add(localJButton, "10,1,c,c");
localIcon = Fi.d();
if (localIcon != null) {
localJButton.setIcon(localIcon);
}
localJButton.addActionListener(new NK.5(this, paramNI));
}
public JButton a()
{
return this.b;
}
}
你正在使用哪一個反編譯器?他們並不都能很好地處理內部的課程。 –
你是對的,JD-GUI存在缺陷 – hsluoyz