디 컴파일 된 Java 소프트웨어의 소스 코드를 읽었습니다. 그것은 난독 화되었지만 자바의 규칙에도 복종해야한다고 생각합니다. 이 클래스 NK$1
을 this.b.a.q()
메서드라고 부르길 원하지만, 회원의 경우에도 q()
메서드의 경우에도 b
멤버에 대해 아무 것도 찾지 못했습니다. 코드가 왜 이렇게 생겼습니까?디 컴파일 된 난독 화 익명 내부 클래스에서 "this.b.a.q()"메서드를 찾을 수 없습니다.
안녕하세요, 귀하의 대답을 바탕으로, NK
에 b
이 발견되었습니다. 그러나 b
이 JButton
개체이기 때문에 여전히 a
을 찾을 수 없습니다. 회원이 있다고 생각하지 않습니다. a
은 JButton
에 있습니까? 아래에 외부 클래스 코드를 추가했습니다.
1) 이하 단지 NK$1.java
같이 전체 파일 NK$1.class
()
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