Browse Source

Core javadoc/general tidying (Issue 633)

git-svn-id: http://svn.dmdirc.com/trunk@3132 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Chris Smith 16 years ago
parent
commit
1fe5669b4c

+ 20
- 0
src/com/dmdirc/Channel.java View File

381
         }
381
         }
382
     }
382
     }
383
     
383
     
384
+    /**
385
+     * Adds a ChannelClient to this Channel.
386
+     * 
387
+     * @param client The client to be added
388
+     */
384
     public void addClient(final ChannelClientInfo client) {
389
     public void addClient(final ChannelClientInfo client) {
385
         window.addName(client);
390
         window.addName(client);
386
         tabCompleter.addEntry(client.getNickname());   
391
         tabCompleter.addEntry(client.getNickname());   
387
     }
392
     }
388
     
393
     
394
+    /**
395
+     * Removes the specified ChannelClient from this channel.
396
+     * 
397
+     * @param client The client to be removed
398
+     */
389
     public void removeClient(final ChannelClientInfo client) {
399
     public void removeClient(final ChannelClientInfo client) {
390
         window.removeName(client);
400
         window.removeName(client);
391
         tabCompleter.removeEntry(client.getNickname());
401
         tabCompleter.removeEntry(client.getNickname());
395
         }
405
         }
396
     }
406
     }
397
     
407
     
408
+    /**
409
+     * Renames a client that is in this channel.
410
+     * 
411
+     * @param oldName The old nickname of the client
412
+     * @param newName The new nickname of the client
413
+     */
398
     public void renameClient(final String oldName, final String newName) {
414
     public void renameClient(final String oldName, final String newName) {
399
         tabCompleter.removeEntry(oldName);
415
         tabCompleter.removeEntry(oldName);
400
         tabCompleter.addEntry(newName);        
416
         tabCompleter.addEntry(newName);        
401
         refreshClients();
417
         refreshClients();
402
     }
418
     }
403
     
419
     
420
+    /**
421
+     * Refreshes the list of clients stored by this channel. Should be called
422
+     * when (visible) user modes or nicknames change.
423
+     */
404
     public void refreshClients() {
424
     public void refreshClients() {
405
         window.updateNames();
425
         window.updateNames();
406
     }
426
     }

+ 12
- 0
src/com/dmdirc/ChannelEventHandler.java View File

42
         IChannelNickChanged, IChannelModeChanged, IChannelUserModeChanged,
42
         IChannelNickChanged, IChannelModeChanged, IChannelUserModeChanged,
43
         IChannelCTCP, IAwayStateOther {
43
         IChannelCTCP, IAwayStateOther {
44
     
44
     
45
+    /** The channel that owns this event handler. */
45
     private final Channel owner;
46
     private final Channel owner;
46
     
47
     
48
+    /**
49
+     * Creates a new instance of ChannelEventHandler.
50
+     * 
51
+     * @param owner The channel that owns this event handler.
52
+     */
47
     public ChannelEventHandler(final Channel owner) {
53
     public ChannelEventHandler(final Channel owner) {
48
         this.owner = owner;
54
         this.owner = owner;
49
     }
55
     }
65
         return owner.getServer().getParser();
71
         return owner.getServer().getParser();
66
     }
72
     }
67
     
73
     
74
+    /**
75
+     * Determines if the specified client represents us.
76
+     * 
77
+     * @param client The client to be tested
78
+     * @return True if the client is ourself, false otherwise.
79
+     */
68
     protected boolean isMyself(final ChannelClientInfo client) {
80
     protected boolean isMyself(final ChannelClientInfo client) {
69
         return client.getClient().equals(owner.getServer().getParser().getMyself());
81
         return client.getClient().equals(owner.getServer().getParser().getMyself());
70
     }
82
     }

+ 0
- 1
src/com/dmdirc/FrameContainer.java View File

23
 package com.dmdirc;
23
 package com.dmdirc;
24
 
24
 
25
 import com.dmdirc.config.ConfigManager;
25
 import com.dmdirc.config.ConfigManager;
26
-import com.dmdirc.config.IdentityManager;
27
 import com.dmdirc.interfaces.IconChangeListener;
26
 import com.dmdirc.interfaces.IconChangeListener;
28
 import com.dmdirc.interfaces.NotificationListener;
27
 import com.dmdirc.interfaces.NotificationListener;
29
 import com.dmdirc.interfaces.SelectionListener;
28
 import com.dmdirc.interfaces.SelectionListener;

+ 3
- 0
src/com/dmdirc/IconManager.java View File

48
     /** Previously created IconManager instance. */
48
     /** Previously created IconManager instance. */
49
     private static final IconManager me = new IconManager();
49
     private static final IconManager me = new IconManager();
50
         
50
         
51
+    /** A map of existing icons. */
51
     private final Map<String, Icon> icons;
52
     private final Map<String, Icon> icons;
53
+    
54
+    /** A map of existing images. */
52
     private final Map<String, Image> images;
55
     private final Map<String, Image> images;
53
     
56
     
54
     /** Creates a new instance of IconManager. */
57
     /** Creates a new instance of IconManager. */

+ 1
- 0
src/com/dmdirc/IgnoreList.java View File

23
 package com.dmdirc;
23
 package com.dmdirc;
24
 
24
 
25
 import com.dmdirc.parser.RegexStringList;
25
 import com.dmdirc.parser.RegexStringList;
26
+
26
 import java.util.ArrayList;
27
 import java.util.ArrayList;
27
 import java.util.List;
28
 import java.util.List;
28
 
29
 

+ 1
- 1
src/com/dmdirc/Query.java View File

42
 import com.dmdirc.ui.input.TabCompleter;
42
 import com.dmdirc.ui.input.TabCompleter;
43
 import com.dmdirc.ui.interfaces.InputWindow;
43
 import com.dmdirc.ui.interfaces.InputWindow;
44
 import com.dmdirc.ui.interfaces.QueryWindow;
44
 import com.dmdirc.ui.interfaces.QueryWindow;
45
-import java.awt.Toolkit;
46
 
45
 
46
+import java.awt.Toolkit;
47
 import java.io.Serializable;
47
 import java.io.Serializable;
48
 
48
 
49
 /**
49
 /**

+ 0
- 2
src/com/dmdirc/Raw.java View File

55
     /** An InputWindow used for displaying the raw data.*/
55
     /** An InputWindow used for displaying the raw data.*/
56
     private InputWindow window;
56
     private InputWindow window;
57
     
57
     
58
-    private boolean isClosing = false;
59
-    
60
     /**
58
     /**
61
      * Creates a new instance of Raw.
59
      * Creates a new instance of Raw.
62
      *
60
      *

+ 3
- 0
src/com/dmdirc/Server.java View File

1178
         checkModeAliases();
1178
         checkModeAliases();
1179
     }
1179
     }
1180
     
1180
     
1181
+    /**
1182
+     * Checks that we have the neccessary mode aliases for this server.
1183
+     */
1181
     private void checkModeAliases() {
1184
     private void checkModeAliases() {
1182
         // Check we have mode aliases
1185
         // Check we have mode aliases
1183
         final String modes = parser.getBoolChanModes() + parser.getListChanModes()
1186
         final String modes = parser.getBoolChanModes() + parser.getListChanModes()

+ 8
- 1
src/com/dmdirc/WritableFrameContainer.java View File

143
     }
143
     }
144
     
144
     
145
     /**
145
     /**
146
-     * Handles general server notifications (i.e., ones note tied to a
146
+     * Handles general server notifications (i.e., ones not tied to a
147
      * specific window). The user can select where the notifications should
147
      * specific window). The user can select where the notifications should
148
      * go in their config.
148
      * go in their config.
149
      *
149
      *
155
                 getConfigManager().getOption("notifications", messageType, "self"), args);
155
                 getConfigManager().getOption("notifications", messageType, "self"), args);
156
     }
156
     }
157
     
157
     
158
+    /**
159
+     * Despatches a notification of the specified type to the specified target.
160
+     * 
161
+     * @param messageType The type of the message that is being sent
162
+     * @param messageTarget The target of the message
163
+     * @param args The arguments for the message
164
+     */
158
     protected void despatchNotification(final String messageType,
165
     protected void despatchNotification(final String messageType,
159
             final String messageTarget, final Object... args) {
166
             final String messageTarget, final Object... args) {
160
         
167
         

+ 25
- 0
src/com/dmdirc/actions/Action.java View File

55
      */
55
      */
56
     private static final long serialVersionUID = 1;
56
     private static final long serialVersionUID = 1;
57
 
57
 
58
+    /** The domain name for condition trees. */
58
     private static final String DOMAIN_CONDITIONTREE = "conditiontree".intern();
59
     private static final String DOMAIN_CONDITIONTREE = "conditiontree".intern();
60
+    /** The domain name for format changes. */
59
     private static final String DOMAIN_FORMAT = "format".intern();
61
     private static final String DOMAIN_FORMAT = "format".intern();
62
+    /** The domain name for meta-data. */
60
     private static final String DOMAIN_METADATA = "metadata".intern();
63
     private static final String DOMAIN_METADATA = "metadata".intern();
64
+    /** The domain name for response information. */
61
     private static final String DOMAIN_RESPONSE = "response".intern();
65
     private static final String DOMAIN_RESPONSE = "response".intern();
66
+    /** The domain name for triggers. */
62
     private static final String DOMAIN_TRIGGERS = "triggers".intern();
67
     private static final String DOMAIN_TRIGGERS = "triggers".intern();
63
 
68
 
64
     /** The file containing this action. */
69
     /** The file containing this action. */
277
         }
282
         }
278
     }
283
     }
279
 
284
 
285
+    /**
286
+     * Loads a list of triggers with the specified names.
287
+     * 
288
+     * @param newTriggers A list of trigger names
289
+     * @return True if all triggers are valid and compatible, false otherwise.
290
+     */
280
     private boolean loadTriggers(final List<String> newTriggers) {
291
     private boolean loadTriggers(final List<String> newTriggers) {
281
         triggers = new ActionType[newTriggers.size()];
292
         triggers = new ActionType[newTriggers.size()];
282
 
293
 
449
         }
460
         }
450
     }
461
     }
451
 
462
 
463
+    /**
464
+     * Reads a condition from the specified configuration section.
465
+     * 
466
+     * @param data The relevant section of the action configuration
467
+     * @return True if the condition is valid, false otherwise
468
+     */
452
     private boolean readCondition(final Map<String,String> data) {
469
     private boolean readCondition(final Map<String,String> data) {
453
         int arg = 0;
470
         int arg = 0;
454
         ActionComponent component = null;
471
         ActionComponent component = null;
518
         return true;
535
         return true;
519
     }
536
     }
520
 
537
 
538
+    /**
539
+     * Reads a component from the specified data section for the specified argument.
540
+     * 
541
+     * @param data The relevant section of the action configuration
542
+     * @param arg The argument number that the component should apply to
543
+     * @return The corresponding ActionComponent, or null if the specified
544
+     * component is invalid.
545
+     */
521
     private ActionComponent readComponent(final Map<String, String> data, final int arg) {
546
     private ActionComponent readComponent(final Map<String, String> data, final int arg) {
522
         final String componentName = data.get("component");
547
         final String componentName = data.get("component");
523
         ActionComponent component;
548
         ActionComponent component;

+ 20
- 1
src/com/dmdirc/actions/ActionCondition.java View File

47
     private String starget;
47
     private String starget;
48
     
48
     
49
     /**
49
     /**
50
-     * Creates a new instance of ActionCondition.
50
+     * Creates a new instance of ActionCondition that compares the output of
51
+     * a component to a string.
52
+     * 
51
      * @param arg The argument number to be tested
53
      * @param arg The argument number to be tested
52
      * @param component The component to be tested
54
      * @param component The component to be tested
53
      * @param comparison The comparison to be used
55
      * @param comparison The comparison to be used
63
         this.target = target;
65
         this.target = target;
64
     }
66
     }
65
     
67
     
68
+    /**
69
+     * Creates a new instance of ActionCondition that compares two strings.
70
+     * 
71
+     * @param starget The first target for comparison.
72
+     * @param comparison The comparison to be used
73
+     * @param target The second target for the comparison
74
+     */
66
     public ActionCondition(final String starget, final ActionComparison comparison,
75
     public ActionCondition(final String starget, final ActionComparison comparison,
67
             final String target) {
76
             final String target) {
68
         super();
77
         super();
162
         this.target = target;
171
         this.target = target;
163
     }
172
     }
164
 
173
 
174
+    /**
175
+     * Retrieves the starget of this condition.
176
+     * 
177
+     * @return This condition's starget, or null if none was set.
178
+     */
165
     public String getStarget() {
179
     public String getStarget() {
166
         return starget;
180
         return starget;
167
     }
181
     }
168
 
182
 
183
+    /**
184
+     * Sets the starget for this condition.
185
+     * 
186
+     * @param starget The new starget for this condition.
187
+     */
169
     public void setStarget(final String starget) {
188
     public void setStarget(final String starget) {
170
         this.starget = starget;
189
         this.starget = starget;
171
     }
190
     }

+ 62
- 0
src/com/dmdirc/actions/ActionGroup.java View File

39
      */
39
      */
40
     private static final long serialVersionUID = 1;    
40
     private static final long serialVersionUID = 1;    
41
     
41
     
42
+    /** The name of this action group. */
42
     private String name = null;
43
     private String name = null;
43
     
44
     
45
+    /** The description of this action group. */
44
     private String description = null;
46
     private String description = null;
45
     
47
     
48
+    /** The author of this action group. */
46
     private String author = null;
49
     private String author = null;
47
     
50
     
51
+    /** The component number of this action group (for updating). */
48
     private int component = -1;
52
     private int component = -1;
49
     
53
     
54
+    /** The version number of this action group. */
50
     private int version = -1;
55
     private int version = -1;
51
     
56
     
57
+    /** A list of settings used by this action group. */
52
     private final List<ActionSetting> settings = new ArrayList<ActionSetting>();
58
     private final List<ActionSetting> settings = new ArrayList<ActionSetting>();
53
 
59
 
60
+    /**
61
+     * Creates a new instance of ActionGroup.
62
+     * 
63
+     * @param name The name of this action group
64
+     */
54
     public ActionGroup(final String name) {
65
     public ActionGroup(final String name) {
55
         this.name = name;
66
         this.name = name;
56
     }
67
     }
57
 
68
 
69
+    /**
70
+     * Retrieves the author of this ActionGroup.
71
+     * 
72
+     * @return This action group's author, or null if the author isn't specified
73
+     */
58
     public String getAuthor() {
74
     public String getAuthor() {
59
         return author;
75
         return author;
60
     }
76
     }
61
 
77
 
78
+    /**
79
+     * Sets the author of this ActionGroup.
80
+     * 
81
+     * @param author The new author for this action group
82
+     */
62
     public void setAuthor(final String author) {
83
     public void setAuthor(final String author) {
63
         this.author = author;
84
         this.author = author;
64
     }
85
     }
65
 
86
 
87
+    /**
88
+     * Retrieves the description of this action group.
89
+     * 
90
+     * @return This action group's description, or null if none is specified
91
+     */
66
     public String getDescription() {
92
     public String getDescription() {
67
         return description;
93
         return description;
68
     }
94
     }
69
 
95
 
96
+    /**
97
+     * Sets the description for this action group.
98
+     * 
99
+     * @param description The new description for this action group
100
+     */
70
     public void setDescription(final String description) {
101
     public void setDescription(final String description) {
71
         this.description = description;
102
         this.description = description;
72
     }
103
     }
73
 
104
 
105
+    /**
106
+     * Retrieves the name of this action group.
107
+     * 
108
+     * @return This action group's name
109
+     */
74
     public String getName() {
110
     public String getName() {
75
         return name;
111
         return name;
76
     }
112
     }
77
 
113
 
114
+    /**
115
+     * Retrieves a list of settings used by this action group.
116
+     * 
117
+     * @return A list of settings used by this action group.
118
+     */
78
     public List<ActionSetting> getSettings() {
119
     public List<ActionSetting> getSettings() {
79
         return settings;
120
         return settings;
80
     }
121
     }
81
 
122
 
123
+    /**
124
+     * Retrieves the version number of this action group.
125
+     * 
126
+     * @return This action group's version number, or -1 if none is specified.
127
+     */
82
     public int getVersion() {
128
     public int getVersion() {
83
         return version;
129
         return version;
84
     }
130
     }
85
 
131
 
132
+    /**
133
+     * Sets the version of this action group.
134
+     * 
135
+     * @param version This action group's new version number.
136
+     */
86
     public void setVersion(final int version) {
137
     public void setVersion(final int version) {
87
         this.version = version;
138
         this.version = version;
88
     }
139
     }
89
 
140
 
141
+    /**
142
+     * Retrieves the addon site component number for this action group.
143
+     * 
144
+     * @return The component number for this action group, or -1 if none is
145
+     * specified.
146
+     */
90
     public int getComponent() {
147
     public int getComponent() {
91
         return component;
148
         return component;
92
     }
149
     }
93
 
150
 
151
+    /**
152
+     * Sets the addon site component number for this action group.
153
+     * 
154
+     * @param component The component number for this action group
155
+     */
94
     public void setComponent(final int component) {
156
     public void setComponent(final int component) {
95
         this.component = component;
157
         this.component = component;
96
     }
158
     }

+ 46
- 1
src/com/dmdirc/actions/ActionSetting.java View File

23
 package com.dmdirc.actions;
23
 package com.dmdirc.actions;
24
 
24
 
25
 /**
25
 /**
26
- *
26
+ * Represents a setting required by an Action pack.
27
+ * 
27
  * @author chris
28
  * @author chris
28
  */
29
  */
29
 public class ActionSetting {
30
 public class ActionSetting {
30
     
31
     
32
+    /** The possible types of setting used by action packs. */
31
     public static enum TYPE {
33
     public static enum TYPE {
34
+        /** A freeform text setting. */
32
         TEXT,
35
         TEXT,
36
+        /** A colour setting. */
33
         COLOUR,
37
         COLOUR,
38
+        /** A numerical setting. */
34
         NUMBER,
39
         NUMBER,
40
+        /** A boolean setting. */
35
         BOOLEAN
41
         BOOLEAN
36
     }
42
     }
37
 
43
 
44
+    /**
45
+     * Creates a new instance of ActionSetting.
46
+     * 
47
+     * @param type The type of setting.
48
+     * @param setting The name of the setting.
49
+     * @param title The user-friendly name of the setting.
50
+     * @param tooltip The tooltip to show for this setting.
51
+     * @param fallback The default value of this setting.
52
+     */
38
     public ActionSetting(TYPE type, String setting, String title, String tooltip, String fallback) {
53
     public ActionSetting(TYPE type, String setting, String title, String tooltip, String fallback) {
39
         this.type = type;
54
         this.type = type;
40
         this.setting = setting;
55
         this.setting = setting;
43
         this.fallback = fallback;
58
         this.fallback = fallback;
44
     }
59
     }
45
     
60
     
61
+    /** The type of this setting. */
46
     private TYPE type;
62
     private TYPE type;
47
     
63
     
64
+    /** The name (key) of this setting. */
48
     private String setting;
65
     private String setting;
49
     
66
     
67
+    /** The user-friendly name of this setting. */
50
     private String title;
68
     private String title;
51
     
69
     
70
+    /** The tooltip to show for this setting. */
52
     private String tooltip;
71
     private String tooltip;
53
     
72
     
73
+    /** The default value of this setting. */
54
     private String fallback;
74
     private String fallback;
55
 
75
 
76
+    /**
77
+     * Retrieves the default value of this setting.
78
+     * 
79
+     * @return This setting's default value.
80
+     */
56
     public String getFallback() {
81
     public String getFallback() {
57
         return fallback;
82
         return fallback;
58
     }
83
     }
59
 
84
 
85
+    /**
86
+     * Retrieves the name (key) of this setting.
87
+     * 
88
+     * @return This setting's name
89
+     */    
60
     public String getSetting() {
90
     public String getSetting() {
61
         return setting;
91
         return setting;
62
     }
92
     }
63
 
93
 
94
+    /**
95
+     * Retrieves the user-friendly name of this setting.
96
+     * 
97
+     * @return This setting's user-friendly name.
98
+     */    
64
     public String getTitle() {
99
     public String getTitle() {
65
         return title;
100
         return title;
66
     }
101
     }
67
 
102
 
103
+    /**
104
+     * Retrieves the tooltip text of this setting.
105
+     * 
106
+     * @return This setting's tooltip text.
107
+     */    
68
     public String getTooltip() {
108
     public String getTooltip() {
69
         return tooltip;
109
         return tooltip;
70
     }
110
     }
71
 
111
 
112
+    /**
113
+     * Retrieves the type of this setting.
114
+     * 
115
+     * @return This setting's type.
116
+     */    
72
     public TYPE getType() {
117
     public TYPE getType() {
73
         return type;
118
         return type;
74
     }
119
     }

+ 67
- 2
src/com/dmdirc/actions/ConditionTree.java View File

33
  */
33
  */
34
 public class ConditionTree {
34
 public class ConditionTree {
35
 
35
 
36
+    /** The possible operations on a condition tree. */
36
     public static enum OPERATION {
37
     public static enum OPERATION {
37
-        AND, OR, VAR, NOT, NOOP
38
+        /** Only passes if both subtrees are true. */
39
+        AND,
40
+        /** Passes if either of the subtrees are true. */
41
+        OR,
42
+        /** Passes if the specified argument is true. */
43
+        VAR,
44
+        /** Only passes iof the left subtree fails to pass. */
45
+        NOT,
46
+        /** Doesn't do anything (an empty tree). */
47
+        NOOP
38
     }
48
     }
39
        
49
        
50
+    /** The left subtree of this tree. */
40
     private ConditionTree leftArg = null;
51
     private ConditionTree leftArg = null;
41
 
52
 
53
+    /** The right subtree of this tree. */
42
     private ConditionTree rightArg = null;
54
     private ConditionTree rightArg = null;
43
 
55
 
56
+    /** The argument of this tree (only used for VAR ops). */
44
     private int argument = -1;
57
     private int argument = -1;
45
 
58
 
59
+    /** The operation that this tree performs. */
46
     private OPERATION op;
60
     private OPERATION op;
47
     
61
     
62
+    /**
63
+     * Creates a new ConditionTree for a binary operation.
64
+     * 
65
+     * @param op The binary operation to perform
66
+     * @param leftArg The left argument/subtree
67
+     * @param rightArg The right argument/subtree
68
+     */
48
     private ConditionTree(final OPERATION op, final ConditionTree leftArg,
69
     private ConditionTree(final OPERATION op, final ConditionTree leftArg,
49
             final ConditionTree rightArg) {
70
             final ConditionTree rightArg) {
50
         assert(op != OPERATION.VAR);
71
         assert(op != OPERATION.VAR);
57
         this.rightArg = rightArg;
78
         this.rightArg = rightArg;
58
     }
79
     }
59
     
80
     
81
+    /**
82
+     * Creates a new ConditionTree for a unary operation.
83
+     * 
84
+     * @param op
85
+     * @param argument
86
+     */
60
     private ConditionTree(final OPERATION op, final ConditionTree argument) {
87
     private ConditionTree(final OPERATION op, final ConditionTree argument) {
61
         assert(op == OPERATION.NOT);
88
         assert(op == OPERATION.NOT);
62
         
89
         
64
         this.leftArg = argument;
91
         this.leftArg = argument;
65
     }    
92
     }    
66
     
93
     
94
+    /**
95
+     * Creates a new ConditionTree for a VAR operation with the specified
96
+     * argument number.
97
+     * 
98
+     * @param argument The number of the argument that's to be tested.
99
+     */
67
     private ConditionTree(final int argument) {
100
     private ConditionTree(final int argument) {
68
         this.op = OPERATION.VAR;
101
         this.op = OPERATION.VAR;
69
         this.argument = argument;
102
         this.argument = argument;
70
     }
103
     }
71
     
104
     
105
+    /**
106
+     * Creates a new ConditionTree for a NOOP operation.
107
+     */
72
     private ConditionTree() {
108
     private ConditionTree() {
73
         this.op = OPERATION.NOOP;
109
         this.op = OPERATION.NOOP;
74
     }
110
     }
143
      * Parses the specified string into a condition tree.
179
      * Parses the specified string into a condition tree.
144
      * 
180
      * 
145
      * @param string The string to be parsed
181
      * @param string The string to be parsed
146
-     * @return The corresponding condition tree, or null if there as an error
182
+     * @return The corresponding condition tree, or null if there was an error
147
      * while parsing the data
183
      * while parsing the data
148
      */
184
      */
149
     public static ConditionTree parseString(final String string) {
185
     public static ConditionTree parseString(final String string) {
169
         return parseStack(stack);
205
         return parseStack(stack);
170
     }
206
     }
171
     
207
     
208
+    /**
209
+     * Parses the specified stack of elements, and returns a corresponding
210
+     * ConditionTree.
211
+     * 
212
+     * @param stack The stack to be read.
213
+     * @return The corresponding condition tree, or null if there was an error
214
+     * while parsing the data.
215
+     */
172
     @SuppressWarnings("fallthrough")
216
     @SuppressWarnings("fallthrough")
173
     private static ConditionTree parseStack(final Deque<Object> stack) {
217
     private static ConditionTree parseStack(final Deque<Object> stack) {
174
         final Deque<Object> myStack = new ArrayDeque<Object>();
218
         final Deque<Object> myStack = new ArrayDeque<Object>();
236
         return new ConditionTree();
280
         return new ConditionTree();
237
     }
281
     }
238
     
282
     
283
+    /**
284
+     * Reads and returns a single term from the specified stack.
285
+     * 
286
+     * @param stack The stack to be read
287
+     * @return The ConditionTree representing the last element on the stack,
288
+     * or null if it was not possible to create one.
289
+     */
239
     private static ConditionTree readTerm(final Deque<Object> stack) {
290
     private static ConditionTree readTerm(final Deque<Object> stack) {
240
         final Object first = stack.pollFirst();
291
         final Object first = stack.pollFirst();
241
         
292
         
254
         }
305
         }
255
     }
306
     }
256
     
307
     
308
+    /**
309
+     * Pops elements off of the end of the specified stack until an opening
310
+     * bracket is reached, and then returns the parsed content of the bracket.
311
+     * 
312
+     * @param stack The stack to be read for the bracket
313
+     * @return The parsed contents of the bracket, or null if the brackets were
314
+     * mismatched.
315
+     */
257
     private static ConditionTree readBracket(final Deque<Object> stack) {
316
     private static ConditionTree readBracket(final Deque<Object> stack) {
258
         final Deque<Object> tempStack = new ArrayDeque<Object>();
317
         final Deque<Object> tempStack = new ArrayDeque<Object>();
259
         boolean found = false;
318
         boolean found = false;
275
         }
334
         }
276
     }
335
     }
277
     
336
     
337
+    /**
338
+     * Determines if the specified character represents a single digit.
339
+     * 
340
+     * @param target The character to be tested
341
+     * @return True if the character is a digit, false otherwise
342
+     */
278
     private static boolean isInt(final char target) {
343
     private static boolean isInt(final char target) {
279
         return target >= '0' && target <= '9';
344
         return target >= '0' && target <= '9';
280
     }
345
     }

+ 2
- 0
src/com/dmdirc/actions/metatypes/ChannelEvents.java View File

44
     /** Channel event with source and victim. */
44
     /** Channel event with source and victim. */
45
     CHANNEL_SOURCED_EVENT_WITH_VICTIM(new String[]{"channel", "user", "victim", "message"}, Channel.class, ChannelClientInfo.class, ChannelClientInfo.class, String.class);
45
     CHANNEL_SOURCED_EVENT_WITH_VICTIM(new String[]{"channel", "user", "victim", "message"}, Channel.class, ChannelClientInfo.class, ChannelClientInfo.class, String.class);
46
     
46
     
47
+    /** The names of the arguments for this meta type. */
47
     private String[] argNames;
48
     private String[] argNames;
49
+    /** The classes of the arguments for this meta type. */
48
     private Class[] argTypes;
50
     private Class[] argTypes;
49
     
51
     
50
     /**
52
     /**

+ 2
- 0
src/com/dmdirc/actions/metatypes/ClientEvents.java View File

47
     /** Unknown command event type. */
47
     /** Unknown command event type. */
48
     UNKNOWN_COMMAND(new String[]{"source", "command", "arguments"}, FrameContainer.class, String.class, String[].class);
48
     UNKNOWN_COMMAND(new String[]{"source", "command", "arguments"}, FrameContainer.class, String.class, String[].class);
49
     
49
     
50
+    /** The names of the arguments for this meta type. */
50
     private String[] argNames;
51
     private String[] argNames;
52
+    /** The classes of the arguments for this meta type. */
51
     private Class[] argTypes;
53
     private Class[] argTypes;
52
     
54
     
53
     /**
55
     /**

+ 2
- 0
src/com/dmdirc/actions/metatypes/PluginEvents.java View File

35
     /** Plugin event type. */
35
     /** Plugin event type. */
36
     PLUGIN_EVENT(new String[]{"plugin"}, PluginInfo.class);
36
     PLUGIN_EVENT(new String[]{"plugin"}, PluginInfo.class);
37
     
37
     
38
+    /** The names of the arguments for this meta type. */
38
     private String[] argNames;
39
     private String[] argNames;
40
+    /** The classes of the arguments for this meta type. */
39
     private Class[] argTypes;
41
     private Class[] argTypes;
40
     
42
     
41
     /**
43
     /**

+ 2
- 0
src/com/dmdirc/actions/metatypes/QueryEvents.java View File

37
     /** Query event with argument. */
37
     /** Query event with argument. */
38
     QUERY_EVENT_WITH_ARG(new String[]{"query", "message"}, Query.class, String.class);
38
     QUERY_EVENT_WITH_ARG(new String[]{"query", "message"}, Query.class, String.class);
39
     
39
     
40
+    /** The names of the arguments for this meta type. */
40
     private String[] argNames;
41
     private String[] argNames;
42
+    /** The classes of the arguments for this meta type. */
41
     private Class[] argTypes;
43
     private Class[] argTypes;
42
     
44
     
43
     /**
45
     /**

+ 2
- 0
src/com/dmdirc/actions/metatypes/ServerEvents.java View File

52
     /** Server event type. */
52
     /** Server event type. */
53
     SERVER_EVENT(new String[]{"server"}, Server.class);
53
     SERVER_EVENT(new String[]{"server"}, Server.class);
54
     
54
     
55
+    /** The names of the arguments for this meta type. */
55
     private String[] argNames;
56
     private String[] argNames;
57
+    /** The classes of the arguments for this meta type. */
56
     private Class[] argTypes;
58
     private Class[] argTypes;
57
     
59
     
58
     /**
60
     /**

+ 1
- 0
src/com/dmdirc/actions/wrappers/ActionWrapper.java View File

23
 package com.dmdirc.actions.wrappers;
23
 package com.dmdirc.actions.wrappers;
24
 
24
 
25
 import com.dmdirc.actions.Action;
25
 import com.dmdirc.actions.Action;
26
+
26
 import java.util.ArrayList;
27
 import java.util.ArrayList;
27
 import java.util.List;
28
 import java.util.List;
28
 
29
 

+ 1
- 0
src/com/dmdirc/actions/wrappers/PerformWrapper.java View File

42
  */
42
  */
43
 public class PerformWrapper extends ActionWrapper {
43
 public class PerformWrapper extends ActionWrapper {
44
     
44
     
45
+    /** A singleton instance of the Perform Wrapper. */
45
     private static PerformWrapper me = new PerformWrapper();
46
     private static PerformWrapper me = new PerformWrapper();
46
     
47
     
47
     /**
48
     /**

Loading…
Cancel
Save