Ver código fonte

Tidy up javadoc

Change-Id: Ib0fd7c597475c9005405eeedbc6f5168ad32d9dc
Reviewed-on: http://gerrit.dmdirc.com/2883
Reviewed-by: Chris Smith <chris@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
tags/0.8rc1
Greg Holmes 10 anos atrás
pai
commit
f68cc6ee62

+ 2
- 0
src/com/dmdirc/ClientModule.java Ver arquivo

@@ -354,6 +354,8 @@ public class ClientModule {
354 354
     /**
355 355
      * Gets the performs actions wrapper.
356 356
      *
357
+     * @param wrapper Wrapper to return
358
+     *
357 359
      * @return An performs wrapper to use in the client.
358 360
      */
359 361
     @Provides(type = Provides.Type.SET)

+ 1
- 1
src/com/dmdirc/FrameContainer.java Ver arquivo

@@ -389,7 +389,7 @@ public abstract class FrameContainer {
389 389
      *      unregistering the window with any specific managers, or from the
390 390
      *      parent windows if they track children)</li>
391 391
      *  <li>Remove the window from the window manager (by calling
392
-     *      {@link WindowManager#removeWindow(com.dmdirc.ui.interfaces.Window)}</li>
392
+     *      {@link WindowManager#removeWindow(com.dmdirc.FrameContainer)}</li>
393 393
      * </ol>
394 394
      * <p>
395 395
      * <strong>NB:</strong> As of DMDirc 0.6.5, points 1 and 6 (making windows

+ 1
- 0
src/com/dmdirc/actions/ActionModel.java Ver arquivo

@@ -118,6 +118,7 @@ public class ActionModel {
118 118
     /**
119 119
      * Triggers this action.
120 120
      *
121
+     * @param serverManager The server manager used to iterate servers
121 122
      * @param format The format of the message that's going to be displayed.
122 123
      * @param arguments The arguments from the action that caused this trigger.
123 124
      * @return True if the execution of the event should be stopped, or false

+ 1
- 2
src/com/dmdirc/actions/internal/WhoisNumericFormatter.java Ver arquivo

@@ -48,8 +48,7 @@ public class WhoisNumericFormatter implements ActionListener {
48 48
     /**
49 49
      * Creates a new whois numeric formatter that will add automatic formats
50 50
      * to the specified identity. This will normally be a temporary global
51
-     * identity, such as the one returned by
52
-     * {@link IdentityManager#getAddonIdentity()}.
51
+     * identity.
53 52
      *
54 53
      * @param identity The identity to write formatters to
55 54
      */

+ 2
- 0
src/com/dmdirc/commandline/CommandLineParser.java Ver arquivo

@@ -83,6 +83,8 @@ public class CommandLineParser {
83 83
 
84 84
     /**
85 85
      * Creates a new instance of CommandLineParser.
86
+     *
87
+     * @param serverManagerProvider ServerManager
86 88
      */
87 89
     @Inject
88 90
     public CommandLineParser(final Provider<ServerManager> serverManagerProvider) {

+ 2
- 1
src/com/dmdirc/commandparser/commands/chat/Me.java Ver arquivo

@@ -49,7 +49,8 @@ public class Me extends Command implements ValidatingCommand {
49 49
             CommandType.TYPE_CHAT);
50 50
 
51 51
     /**
52
-     * Creates a new instance of {@link Ban} using the given command controller.
52
+     * Creates a new instance of {@link com.dmdirc.commandparser.commands.channel.Ban} using the
53
+     * given command controller.
53 54
      *
54 55
      * @param controller The controller to use for command information.
55 56
      */

+ 6
- 1
src/com/dmdirc/commandparser/parsers/CommandParser.java Ver arquivo

@@ -72,7 +72,12 @@ public abstract class CommandParser implements Serializable {
72 72
     @Getter
73 73
     protected final CommandController commandManager;
74 74
 
75
-    /** Creates a new instance of CommandParser. */
75
+    /**
76
+     * Creates a new instance of CommandParser.
77
+     *
78
+     * @param configManager Config manager to read settings
79
+     * @param commandManager Command manager to load plugins from
80
+     */
76 81
     protected CommandParser(final AggregateConfigProvider configManager,
77 82
             final CommandController commandManager) {
78 83
         commands = new HashMap<>();

+ 3
- 3
src/com/dmdirc/config/BaseConfigProvider.java Ver arquivo

@@ -73,7 +73,7 @@ public abstract class BaseConfigProvider implements ReadOnlyConfigProvider {
73 73
     private final Provider<ColourManager> colourManager;
74 74
 
75 75
     /**
76
-     * Creates a new instance of {@link ConfigSource}.
76
+     * Creates a new instance of {@link com.dmdirc.interfaces.config.ConfigProvider}.
77 77
      *
78 78
      * @param colourManager The colour manager to use to convert colours.
79 79
      */
@@ -82,8 +82,8 @@ public abstract class BaseConfigProvider implements ReadOnlyConfigProvider {
82 82
     }
83 83
 
84 84
     /**
85
-     * Creates a new instance of {@link ConfigSource} using the singleton
86
-     * colour manager.
85
+     * Creates a new instance of {@link com.dmdirc.interfaces.config.ConfigProvider} using the
86
+     * singleton colour manager.
87 87
      *
88 88
      * @deprecated Should pass in a {@link ColourManager}.
89 89
      */

+ 1
- 1
src/com/dmdirc/config/ConfigManager.java Ver arquivo

@@ -394,7 +394,7 @@ public class ConfigManager extends BaseConfigProvider implements ConfigChangeLis
394 394
     }
395 395
 
396 396
     /**
397
-     * Records the lookup request for the specified domain & option.
397
+     * Records the lookup request for the specified domain and option.
398 398
      *
399 399
      * @param domain The domain that is being looked up
400 400
      * @param option The option that is being looked up

+ 1
- 1
src/com/dmdirc/config/package-info.java Ver arquivo

@@ -42,6 +42,6 @@
42 42
  * Identities are all stored on disk under the 'identities' directory in the
43 43
  * user's DMDirc profile. Default identities in this package are extracted
44 44
  * automatically by the {@link IdentityManager} if they do not exist.
45
- * Identities use the DMDirc {@link com.dmdirc.util.ConfigFile} file format.
45
+ * Identities use the DMDirc {@link com.dmdirc.util.io.ConfigFile} file format.
46 46
  */
47 47
 package com.dmdirc.config;

+ 2
- 3
src/com/dmdirc/config/prefs/PreferencesCategory.java Ver arquivo

@@ -72,11 +72,11 @@ public class PreferencesCategory {
72 72
 
73 73
     /** A list of settings in this category. */
74 74
     @Getter
75
-    private final List<PreferencesSetting> settings = new ArrayList<PreferencesSetting>();
75
+    private final List<PreferencesSetting> settings = new ArrayList<>();
76 76
 
77 77
     /** A list of subcategories of this category. */
78 78
     @Getter
79
-    private final List<PreferencesCategory> subcats = new ArrayList<PreferencesCategory>();
79
+    private final List<PreferencesCategory> subcats = new ArrayList<>();
80 80
 
81 81
     /** The replacement object to use for this category. */
82 82
     @Getter
@@ -191,7 +191,6 @@ public class PreferencesCategory {
191 191
      * Determines if this category has a replacement object.
192 192
      *
193 193
      * @return True if the category has a replacement object, false otherwise
194
-     * @see #getObject()
195 194
      */
196 195
     public boolean hasObject() {
197 196
         return object != null;

+ 1
- 1
src/com/dmdirc/interfaces/Connection.java Ver arquivo

@@ -407,7 +407,7 @@ public interface Connection {
407 407
      * Parses the specified hostmask in a manner prescribed by the protocol
408 408
      * currently used by this server.
409 409
      *
410
-     * @see ProtocolDescription#parseHostmask(java.lang.String)
410
+     * @see com.dmdirc.parser.interfaces.ProtocolDescription#parseHostmask(java.lang.String)
411 411
      * @param hostmask The hostmask to be parsed
412 412
      * @return An array containing the nickname, username and hostname
413 413
      * @since 0.6.4

+ 5
- 1
src/com/dmdirc/interfaces/actions/ActionComponent.java Ver arquivo

@@ -45,7 +45,11 @@ public interface ActionComponent {
45 45
     @Target(ElementType.METHOD)
46 46
     @interface ComponentOptions {
47 47
 
48
-        /** Whether or not the component requires a connected server. */
48
+        /**
49
+         * Whether or not the component requires a connected server.
50
+         *
51
+         * @return true if component requires a connected server
52
+         */
49 53
         boolean requireConnected() default false;
50 54
 
51 55
     }

+ 2
- 0
src/com/dmdirc/messages/MessageSink.java Ver arquivo

@@ -37,6 +37,8 @@ public interface MessageSink {
37 37
      * this sink matches a given configuration entry. If the pattern contains
38 38
      * groups, the values of the matched groups are passed into the
39 39
      * handleMessage method.
40
+     *
41
+     * @return Pattern to matches a config entry
40 42
      */
41 43
     Pattern getPattern();
42 44
 

+ 3
- 1
src/com/dmdirc/plugins/GlobalClassLoader.java Ver arquivo

@@ -101,10 +101,12 @@ public final class GlobalClassLoader extends ClassLoader {
101 101
     }
102 102
 
103 103
     /**
104
-     * Look in all known sources of persisant classes for file asked for.
104
+     * Look in all known sources of persistent classes for file asked for.
105 105
      *
106 106
      * @param classname Class name to define.
107 107
      * @param data Data to define class with.
108
+     *
109
+     * @return The resulting {@link Class} object
108 110
      */
109 111
     public Class<?> defineClass(final String classname, final byte[] data) {
110 112
         return defineClass(classname, data, 0, data.length);

+ 2
- 2
src/com/dmdirc/plugins/PluginManager.java Ver arquivo

@@ -563,9 +563,9 @@ public class PluginManager implements ActionListener, ServiceManager {
563 563
     }
564 564
 
565 565
     /**
566
-     * Get Collection<PluginInfo> of known plugins.
566
+     * Get Collection&lt;PluginInf&gt; of known plugins.
567 567
      *
568
-     * @return Collection<PluginInfo> of known plugins.
568
+     * @return Collection&lt;PluginInfo&gt; of known plugins.
569 569
      */
570 570
     public Collection<PluginInfo> getPluginInfos() {
571 571
         return new ArrayList<>(knownPlugins.values());

+ 1
- 0
src/com/dmdirc/plugins/PluginMetaData.java Ver arquivo

@@ -133,6 +133,7 @@ public class PluginMetaData {
133 133
     /**
134 134
      * Creates a new meta data reader for a config file at the specified URL.
135 135
      *
136
+     * @param manager Plugin manager
136 137
      * @param url The URL to load the config file from
137 138
      * @param pluginUrl The URL to the plugin that this data corresponds to
138 139
      */

+ 25
- 18
src/com/dmdirc/ui/core/util/URLHandler.java Ver arquivo

@@ -58,6 +58,9 @@ public class URLHandler {
58 58
      * Instantiates a new URL Handler.
59 59
      *
60 60
      * @param controller The UI controller to show dialogs etc on
61
+     * @param globalConfig Config to retrieve settings from
62
+     * @param serverManager Server manager to connect to servers
63
+     * @param statusBarManager Status bar manager used to show messages
61 64
      */
62 65
     public URLHandler(
63 66
             final UIController controller,
@@ -160,24 +163,28 @@ public class URLHandler {
160 163
         }
161 164
 
162 165
         final String command = config.getOption("protocol", uri.getScheme().toLowerCase());
163
-
164
-        if ("DMDIRC".equals(command)) {
165
-            statusBarManager.setMessage(
166
-                    new StatusMessage("Connecting to: " + uri.toString(),
167
-                    config));
168
-            serverManager.connectToAddress(uri);
169
-        } else if ("BROWSER".equals(command)) {
170
-            statusBarManager.setMessage(
171
-                    new StatusMessage("Opening: " + uri.toString(),
172
-                    config));
173
-            execBrowser(uri);
174
-        } else if ("MAIL".equals(command)) {
175
-            execMail(uri);
176
-        } else {
177
-            statusBarManager.setMessage(
178
-                    new StatusMessage("Opening: " + uri.toString(),
179
-                    config));
180
-            execApp(substituteParams(uri, command));
166
+        switch (command) {
167
+            case "DMDIRC":
168
+                statusBarManager.setMessage(
169
+                        new StatusMessage("Connecting to: " + uri.toString(),
170
+                                config));
171
+                serverManager.connectToAddress(uri);
172
+                break;
173
+            case "BROWSER":
174
+                statusBarManager.setMessage(
175
+                        new StatusMessage("Opening: " + uri.toString(),
176
+                                config));
177
+                execBrowser(uri);
178
+                break;
179
+            case "MAIL":
180
+                execMail(uri);
181
+                break;
182
+            default:
183
+                statusBarManager.setMessage(
184
+                        new StatusMessage("Opening: " + uri.toString(),
185
+                                config));
186
+                execApp(substituteParams(uri, command));
187
+                break;
181 188
         }
182 189
     }
183 190
 

+ 1
- 1
src/com/dmdirc/ui/messages/Styliser.java Ver arquivo

@@ -159,7 +159,7 @@ public class Styliser implements ConfigChangeListener {
159 159
      * Creates a new instance of Styliser.
160 160
      *
161 161
      * @param server The {@link Server} that owns this styliser or null if n/a.
162
-     * @param configManager the {@link ConfigManager} to get settings from.
162
+     * @param configManager the {@link AggregateConfigProvider} to get settings from.
163 163
      * @since 0.6.3
164 164
      */
165 165
     public Styliser(final Server server, final AggregateConfigProvider configManager) {

+ 1
- 1
src/com/dmdirc/updater/UpdateChecker.java Ver arquivo

@@ -103,7 +103,7 @@ public final class UpdateChecker implements Runnable {
103 103
      * Initialises the update checker. Sets a timer to check based on the
104 104
      * frequency specified in the config.
105 105
      *
106
-     * @param main Parent Main class
106
+     * @param manager Manager to monitor updates
107 107
      */
108 108
     public static void init(final CachingUpdateManager manager) {
109 109
         UpdateChecker.manager = manager;

+ 2
- 1
src/com/dmdirc/updater/manager/UpdateManager.java Ver arquivo

@@ -39,7 +39,8 @@ public interface UpdateManager {
39 39
      * Adds a new check strategy to this manager. {@link UpdateCheckStrategy}s
40 40
      * are responsible for checking to see if an updated version of a set of
41 41
      * components is available. If multiple strategies are configured, their
42
-     * results are merged using this manager's {@link CheckResultConsolidator}.
42
+     * results are merged using this manager's
43
+     * {@link com.dmdirc.updater.checking.CheckResultConsolidator}.
43 44
      *
44 45
      * @param strategy The strategy to be added.
45 46
      */

+ 1
- 1
src/com/dmdirc/updater/manager/UpdateStatus.java Ver arquivo

@@ -26,7 +26,7 @@ import lombok.Getter;
26 26
 import lombok.RequiredArgsConstructor;
27 27
 
28 28
 /**
29
- * Describes the possible statuses of an {@link UpdateComponent}.
29
+ * Describes the possible statuses of an {@link com.dmdirc.updater.UpdateComponent}.
30 30
  */
31 31
 @RequiredArgsConstructor
32 32
 @SuppressWarnings("PMD.UnusedPrivateField")

+ 0
- 19
src/com/dmdirc/updater/package-info.java Ver arquivo

@@ -26,24 +26,5 @@
26 26
  * (using the domain updates.dmdirc.com). The website then replies with a
27 27
  * message saying whether each component is out of date, up to date, or not
28 28
  * known.
29
- *
30
- * For each update that is available, the {@link UpdateChecker} creates
31
- * a new {@link Update} instance, which is responsible for parsing the full
32
- * response from the DMDirc website.
33
- *
34
- * The status of the {@link UpdateChecker} can be monitored by registering a
35
- * {@link UpdateCheckerListener} with it. This enables, for example, UI
36
- * components to notify the user when updates are available. Such components
37
- * can then remove certain updates (by calling
38
- * {@link UpdateChecker#removeUpdate(Update)}), and have the
39
- * {@link UpdateChecker} apply the updates by calling
40
- * {@link UpdateChecker#applyUpdates()}.
41
- *
42
- * Internally, when applying updates, the {@link UpdateChecker} calls the
43
- * {@link Update#doUpdate()} method on each relevant {@link Update}, which
44
- * downloads the required files to a temporary location, and then has the
45
- * relevant {@link UpdateComponent} perform the installation. During this time,
46
- * the {@link Update} can be monitored by registering an {@link UpdateListener}
47
- * with it.
48 29
  */
49 30
 package com.dmdirc.updater;

+ 2
- 1
src/com/dmdirc/updater/retrieving/TypeSensitiveRetrievalStrategy.java Ver arquivo

@@ -59,7 +59,8 @@ public abstract class TypeSensitiveRetrievalStrategy<T extends UpdateCheckResult
59 59
      * requiring retrieval.
60 60
      * @return An {@link UpdateRetrievalResult} which describes the result of
61 61
      * the retrieval, providing information for an
62
-     * {@link UpdateInstallationStrategy} to use to install the update.
62
+     * {@link com.dmdirc.updater.installing.UpdateInstallationStrategy}
63
+     * to use to install the update.
63 64
      * @see #retrieve(com.dmdirc.updater.checking.UpdateCheckResult)
64 65
      */
65 66
     protected abstract UpdateRetrievalResult retrieveImpl(T checkResult);

Carregando…
Cancelar
Salvar