Méthodes synthétiques - Eclipse
Bonjour,
Je viens de décompiler un fichier.jar pour modifier le fonctionnement d'un programme.
Ce programme met en jeu le fichier java PutyfalView.java avec le bout de code suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| package putyfal;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.border.MatteBorder;
import javax.swing.border.SoftBevelBorder;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.jdesktop.application.*;
import org.w3c.dom.*;
public class PutyfalView extends FrameView
{
...
public PutyfalView(SingleFrameApplication app)
{
taskMonitor.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt)
{
String propertyName = evt.getPropertyName();
if("started".equals(propertyName))
{
if(!busyIconTimer.isRunning())
{
statusAnimationLabel.setIcon(busyIcons[0]);
busyIconIndex = 0;
busyIconTimer.start();
}
progressBar.setVisible(true);
progressBar.setIndeterminate(true);
}
}
}
} |
Un autre fichier java, crée par Eclipse, lors de la précédente compilation, permet de modifier les parametres du busyIconTimer, dans PutyfalView$3.java:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| package putyfal;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.*;
// Referenced classes of package putyfal:
// PutyfalView
class PutyfalView$3
implements PropertyChangeListener
{
public void propertyChange(PropertyChangeEvent evt)
{
String propertyName = evt.getPropertyName();
if("started".equals(propertyName))
{
if(!PutyfalView.access$400(PutyfalView.this).isRunning())
{
PutyfalView.access$300(PutyfalView.this).setIcon(PutyfalView.access$200(PutyfalView.this)[0]);
PutyfalView.access$102(PutyfalView.this, 0);
PutyfalView.access$400(PutyfalView.this).start();
}
PutyfalView.access$500(PutyfalView.this).setVisible(true);
PutyfalView.access$500(PutyfalView.this).setIndeterminate(true);
}
}
} |
En réalité, (!PutyfalView.access$400(PutyfalView.this) permet dacceder au busyIconTimer mais la gestion des erreurs , pour cette ligne sort :
The method access$400 is not defined for the type PutyfalView.
Jai essayé d'introduire un get set dans le fichier PutyfalView.java pour accéder au champ mais rien à faire .
Avez vous une solution ?
Merci d'avance,
Arthur