je regarde le code de ArgoUML et je suis tombé sur une forme que je ne connaissais pas. J'ai essayé de me documenter sur Google mais quand je tape .class ou autre je trouve rien.

J'explique ce que je n'ai pas compris:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
package org.argouml.uml.diagram.ui;
 
 
import org.argouml.uml.CommentEdge;
 
/**
 * An extension of ActionSetMode to set the parameters for a comment link.
 *
 * @author Bob Tarling
 */
 
public class ActionSetAddCommentLinkMode extends ActionSetMode {
 
    /**
     * Construct a new ActionSetAddCommentLinkMode.<p>
     */
    public ActionSetAddCommentLinkMode() {
        super(
                ModeCreateCommentEdge.class, //c'est ca que je comprend pas!
                "edgeClass",
                CommentEdge.class, //et ca aussi !
                "button.new-commentlink");
    }
}

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
 
 
public class ActionSetMode extends SetModeAction {
 
    private static final Logger LOG = Logger.getLogger(ActionSetMode.class);
 
   [...]
 
    /**
     * The constructor.
     *
     * @param modeClass the next global editor mode
     * @param arg the name of a new argument for the new mode
     * @param value the value of a new argument for the new mode
     */
    public ActionSetMode(Class modeClass, String arg, Object value) {
        super(modeClass, arg, value);
    }
 
    /**
     * The constructor.
     * TODO: The "name" parameter is used for the icon and for the tooltip.
     * This makes i18n of the tooltip impossible.
     *
     * @param modeClass the next global editor mode
     * @param arg the name of a new argument for the new mode
     * @param value the value of a new argument for the new mode
     * @param name the name of the command that is the tooltip text.
     */
    public ActionSetMode(Class modeClass, String arg, Object value, 
            String name) {
        super(modeClass, arg, value);
        putToolTip(name);
        putIcon(name);
    }
 
    /**
     * The constructor.
     *
     * @param modeClass the next global editor mode
     * @param arg the name of a new argument for the new mode
     * @param value the value of a new argument for the new mode
     * @param name the name of the command that is the tooltip text.
     * @param icon the SMALL_ICON for the action
     */
    public ActionSetMode(
        Class modeClass,
        String arg,
        Object value,
        String name,
        ImageIcon icon) {
        super(modeClass, arg, value, name, icon);
        putToolTip(name);
    }
 
   [....]
 
}
C'est un appel static donc ce n'est pas équivalent a .getClass()
Est ce que cela crée une classe static et la revoie je sais pas!

merci pour votre aide