ソースを参照

Start to remove lombok :(

Change-Id: I44b4eddde8126a89003e68653ac24c4d3527c6f8
Reviewed-on: http://gerrit.dmdirc.com/2983
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.8rc1
Greg Holmes 10年前
コミット
eb9fc0d2eb

+ 1
- 0
ivy.xml ファイルの表示

18
         <dependency org="ch.qos.logback" name="logback-classic" rev="1.+" conf="test->default" />
18
         <dependency org="ch.qos.logback" name="logback-classic" rev="1.+" conf="test->default" />
19
 
19
 
20
         <dependency org="org.projectlombok" name="lombok" rev="latest.integration" conf="main->default" />
20
         <dependency org="org.projectlombok" name="lombok" rev="latest.integration" conf="main->default" />
21
+
21
         <dependency org="com.dmdirc" name="annotations" rev="[0.3.4,)" conf="main->default" />
22
         <dependency org="com.dmdirc" name="annotations" rev="[0.3.4,)" conf="main->default" />
22
         <dependency org="com.google.code.findbugs" name="jsr305" rev="2.+" conf="main->default" />
23
         <dependency org="com.google.code.findbugs" name="jsr305" rev="2.+" conf="main->default" />
23
 
24
 

+ 2
- 0
nbproject/project.properties ファイルの表示

14
 auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.countForUsingStaticStarImport=1
14
 auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.countForUsingStaticStarImport=1
15
 auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=com.dmdirc;com.google;com.palantir;java;javax;lombok;net.miginfocom;org;*;static *
15
 auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=com.dmdirc;com.google;com.palantir;java;javax;lombok;net.miginfocom;org;*;static *
16
 auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateStaticImports=true
16
 auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateStaticImports=true
17
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.wrapOneLineComment=false
18
+auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
17
 endorsed.classpath=
19
 endorsed.classpath=
18
 javac.classpath=
20
 javac.classpath=
19
 javac.processorpath=\
21
 javac.processorpath=\

+ 12
- 5
src/com/dmdirc/Channel.java ファイルの表示

57
 
57
 
58
 import javax.annotation.Nonnull;
58
 import javax.annotation.Nonnull;
59
 
59
 
60
-import lombok.Getter;
61
-
62
 /**
60
 /**
63
  * The Channel class represents the client's view of the channel. It handles
61
  * The Channel class represents the client's view of the channel. It handles
64
  * callbacks for channel events from the parser, maintains the corresponding
62
  * callbacks for channel events from the parser, maintains the corresponding
71
     private final ListenerList listenerList = new ListenerList();
69
     private final ListenerList listenerList = new ListenerList();
72
 
70
 
73
     /** The parser's pChannel class. */
71
     /** The parser's pChannel class. */
74
-    @Getter
75
     private ChannelInfo channelInfo;
72
     private ChannelInfo channelInfo;
76
 
73
 
77
     /** The server this channel is on. */
74
     /** The server this channel is on. */
78
     private final Server server;
75
     private final Server server;
79
 
76
 
80
     /** The tabcompleter used for this channel. */
77
     /** The tabcompleter used for this channel. */
81
-    @Getter
82
     private final TabCompleter tabCompleter;
78
     private final TabCompleter tabCompleter;
83
 
79
 
84
     /** A list of previous topics we've seen. */
80
     /** A list of previous topics we've seen. */
91
     private final ConfigProviderMigrator configMigrator;
87
     private final ConfigProviderMigrator configMigrator;
92
 
88
 
93
     /** Whether we're in this channel or not. */
89
     /** Whether we're in this channel or not. */
94
-    @Getter
95
     private boolean isOnChannel;
90
     private boolean isOnChannel;
96
 
91
 
97
     /** Whether we should send WHO requests for this channel. */
92
     /** Whether we should send WHO requests for this channel. */
154
         selfJoin();
149
         selfJoin();
155
     }
150
     }
156
 
151
 
152
+    public ChannelInfo getChannelInfo() {
153
+        return channelInfo;
154
+    }
155
+
156
+    public TabCompleter getTabCompleter() {
157
+        return tabCompleter;
158
+    }
159
+
160
+    public boolean isOnChannel() {
161
+        return isOnChannel;
162
+    }
163
+
157
     /**
164
     /**
158
      * Registers callbacks with the parser for this channel.
165
      * Registers callbacks with the parser for this channel.
159
      */
166
      */

+ 4
- 3
src/com/dmdirc/ChannelEventHandler.java ファイルの表示

35
 
35
 
36
 import java.util.Date;
36
 import java.util.Date;
37
 
37
 
38
-import lombok.AllArgsConstructor;
39
-
40
 /**
38
 /**
41
  * Handles events for channel objects.
39
  * Handles events for channel objects.
42
  */
40
  */
43
-@AllArgsConstructor
44
 public class ChannelEventHandler extends EventHandler implements
41
 public class ChannelEventHandler extends EventHandler implements
45
         ChannelMessageListener, ChannelNamesListener, ChannelTopicListener,
42
         ChannelMessageListener, ChannelNamesListener, ChannelTopicListener,
46
         ChannelJoinListener, ChannelPartListener, ChannelKickListener,
43
         ChannelJoinListener, ChannelPartListener, ChannelKickListener,
53
     /** The channel that owns this event handler. */
50
     /** The channel that owns this event handler. */
54
     private final Channel owner;
51
     private final Channel owner;
55
 
52
 
53
+    public ChannelEventHandler(final Channel owner) {
54
+        this.owner = owner;
55
+    }
56
+
56
     /** {@inheritDoc} */
57
     /** {@inheritDoc} */
57
     @SuppressWarnings("unchecked")
58
     @SuppressWarnings("unchecked")
58
     @Override
59
     @Override

+ 24
- 9
src/com/dmdirc/FrameContainer.java ファイルの表示

51
 import java.util.Set;
51
 import java.util.Set;
52
 import java.util.concurrent.CopyOnWriteArrayList;
52
 import java.util.concurrent.CopyOnWriteArrayList;
53
 
53
 
54
-import lombok.Getter;
55
-
56
 /**
54
 /**
57
  * The frame container implements basic methods that should be present in
55
  * The frame container implements basic methods that should be present in
58
  * all objects that handle a frame.
56
  * all objects that handle a frame.
59
  */
57
  */
60
-@SuppressWarnings("PMD.UnusedPrivateField")
61
 public abstract class FrameContainer {
58
 public abstract class FrameContainer {
62
 
59
 
63
     /** Listeners not yet using ListenerSupport. */
60
     /** Listeners not yet using ListenerSupport. */
64
     protected final ListenerList listeners = new ListenerList();
61
     protected final ListenerList listeners = new ListenerList();
65
 
62
 
66
     /** The colour of our frame's notifications. */
63
     /** The colour of our frame's notifications. */
67
-    @Getter
68
     private Colour notification = Colour.BLACK;
64
     private Colour notification = Colour.BLACK;
69
 
65
 
70
     /** The document used to store this container's content. */
66
     /** The document used to store this container's content. */
75
             = new CopyOnWriteArrayList<>();
71
             = new CopyOnWriteArrayList<>();
76
 
72
 
77
     /** The parent of this frame. */
73
     /** The parent of this frame. */
78
-    @Getter
79
     private FrameContainer parent;
74
     private FrameContainer parent;
80
 
75
 
81
     /** The name of the icon being used for this container's frame. */
76
     /** The name of the icon being used for this container's frame. */
82
-    @Getter
83
     private String icon;
77
     private String icon;
84
 
78
 
85
     /** The name of this container. */
79
     /** The name of this container. */
86
-    @Getter
87
     private String name;
80
     private String name;
88
 
81
 
89
     /** The title of this container. */
82
     /** The title of this container. */
90
-    @Getter
91
     private String title;
83
     private String title;
92
 
84
 
93
     /** The config manager for this container. */
85
     /** The config manager for this container. */
94
-    @Getter
95
     private final AggregateConfigProvider configManager;
86
     private final AggregateConfigProvider configManager;
96
 
87
 
97
     /** The IconChanger for this container. */
88
     /** The IconChanger for this container. */
134
         setIcon(icon);
125
         setIcon(icon);
135
     }
126
     }
136
 
127
 
128
+    public Colour getNotification() {
129
+        return notification;
130
+    }
131
+
132
+    public FrameContainer getParent() {
133
+        return parent;
134
+    }
135
+
136
+    public String getIcon() {
137
+        return icon;
138
+    }
139
+
140
+    public String getName() {
141
+        return name;
142
+    }
143
+
144
+    public String getTitle() {
145
+        return title;
146
+    }
147
+
148
+    public AggregateConfigProvider getConfigManager() {
149
+        return configManager;
150
+    }
151
+
137
     /**
152
     /**
138
      * Returns a collection of direct children of this frame.
153
      * Returns a collection of direct children of this frame.
139
      *
154
      *

+ 4
- 4
src/com/dmdirc/GlobalWindow.java ファイルの表示

41
 import javax.inject.Provider;
41
 import javax.inject.Provider;
42
 import javax.inject.Singleton;
42
 import javax.inject.Singleton;
43
 
43
 
44
-import lombok.Getter;
45
-
46
 /**
44
 /**
47
  * A window which can be used to execute global commands.
45
  * A window which can be used to execute global commands.
48
  */
46
  */
52
     private static GlobalWindow globalWindow;
50
     private static GlobalWindow globalWindow;
53
 
51
 
54
     /** The tab completer we use. */
52
     /** The tab completer we use. */
55
-    @Getter
56
-    @SuppressWarnings("PMD.UnusedPrivateField")
57
     private final TabCompleter tabCompleter;
53
     private final TabCompleter tabCompleter;
58
 
54
 
59
     /**
55
     /**
77
         tabCompleter = tabCompleterFactory.getTabCompleter(config, CommandType.TYPE_GLOBAL);
73
         tabCompleter = tabCompleterFactory.getTabCompleter(config, CommandType.TYPE_GLOBAL);
78
     }
74
     }
79
 
75
 
76
+    public TabCompleter getTabCompleter() {
77
+        return tabCompleter;
78
+    }
79
+
80
     /** {@inheritDoc} */
80
     /** {@inheritDoc} */
81
     @Override
81
     @Override
82
     public void windowClosing() {
82
     public void windowClosing() {

+ 8
- 5
src/com/dmdirc/Invite.java ファイルの表示

26
 
26
 
27
 import java.util.Date;
27
 import java.util.Date;
28
 
28
 
29
-import lombok.Getter;
30
-
31
 /**
29
 /**
32
  * Model for a channel invitation.
30
  * Model for a channel invitation.
33
  */
31
  */
34
-@SuppressWarnings("PMD.UnusedPrivateField")
35
 public class Invite {
32
 public class Invite {
36
 
33
 
37
     /** The connection this invite was on. */
34
     /** The connection this invite was on. */
38
     private final Connection connection;
35
     private final Connection connection;
39
 
36
 
40
     /** The channel this invite is for. */
37
     /** The channel this invite is for. */
41
-    @Getter
42
     private final String channel;
38
     private final String channel;
43
 
39
 
44
     /** The time this invite was created. */
40
     /** The time this invite was created. */
45
-    @Getter
46
     private final long timestamp;
41
     private final long timestamp;
47
 
42
 
48
     /** The source of this invite. */
43
     /** The source of this invite. */
62
         this.timestamp = new Date().getTime();
57
         this.timestamp = new Date().getTime();
63
     }
58
     }
64
 
59
 
60
+    public String getChannel() {
61
+        return channel;
62
+    }
63
+
64
+    public long getTimestamp() {
65
+        return timestamp;
66
+    }
67
+
65
     /**
68
     /**
66
      * Retrieves the source of this invite.
69
      * Retrieves the source of this invite.
67
      *
70
      *

+ 3
- 3
src/com/dmdirc/Server.java ファイルの表示

85
 
85
 
86
 import javax.net.ssl.TrustManager;
86
 import javax.net.ssl.TrustManager;
87
 
87
 
88
-import lombok.extern.slf4j.Slf4j;
89
-
88
+import org.slf4j.LoggerFactory;
90
 import static com.google.common.base.Preconditions.checkArgument;
89
 import static com.google.common.base.Preconditions.checkArgument;
91
 import static com.google.common.base.Preconditions.checkNotNull;
90
 import static com.google.common.base.Preconditions.checkNotNull;
92
 
91
 
95
  * a list of all channels, queries, etc, and handles parser callbacks pertaining
94
  * a list of all channels, queries, etc, and handles parser callbacks pertaining
96
  * to the server.
95
  * to the server.
97
  */
96
  */
98
-@Slf4j
99
 @Factory(inject = true, singleton = true, providers = true, name = "ServerFactoryImpl")
97
 @Factory(inject = true, singleton = true, providers = true, name = "ServerFactoryImpl")
100
 public class Server extends WritableFrameContainer implements ConfigChangeListener,
98
 public class Server extends WritableFrameContainer implements ConfigChangeListener,
101
         CertificateProblemListener, Connection {
99
         CertificateProblemListener, Connection {
100
+    
101
+    private static final org.slf4j.Logger log = LoggerFactory.getLogger(Server.class);
102
 
102
 
103
     /** The name of the general domain. */
103
     /** The name of the general domain. */
104
     private static final String DOMAIN_GENERAL = "general";
104
     private static final String DOMAIN_GENERAL = "general";

+ 1
- 1
src/com/dmdirc/plugins/PluginInjectorInitialiser.java ファイルの表示

53
  * Eventually this should be replaced by using the same DI framework for plugins
53
  * Eventually this should be replaced by using the same DI framework for plugins
54
  * as for the client.
54
  * as for the client.
55
  */
55
  */
56
-@RequiredArgsConstructor(onConstructor = @_(@Inject))
56
+@RequiredArgsConstructor(onConstructor = @__(@Inject))
57
 public class PluginInjectorInitialiser {
57
 public class PluginInjectorInitialiser {
58
 
58
 
59
     private final ActionManager actionManager;
59
     private final ActionManager actionManager;

+ 8
- 6
src/com/dmdirc/util/URLBuilder.java ファイルの表示

33
 import javax.inject.Inject;
33
 import javax.inject.Inject;
34
 import javax.inject.Provider;
34
 import javax.inject.Provider;
35
 
35
 
36
-import lombok.Getter;
37
-import lombok.Setter;
38
-
39
 /**
36
 /**
40
  * Provides methods for building URLs to reference DMDirc resources.
37
  * Provides methods for building URLs to reference DMDirc resources.
41
  */
38
  */
43
 
40
 
44
     /** Singleton instance. */
41
     /** Singleton instance. */
45
     @Deprecated
42
     @Deprecated
46
-    @Getter
47
-    @Setter
48
-    @SuppressWarnings("PMD.UnusedPrivateField")
49
     private static URLBuilder instance;
43
     private static URLBuilder instance;
50
 
44
 
51
     /** Provider to retrieve a plugin manager instance when needed. */
45
     /** Provider to retrieve a plugin manager instance when needed. */
68
         this.themeManagerProvider = themeManagerProvider;
62
         this.themeManagerProvider = themeManagerProvider;
69
     }
63
     }
70
 
64
 
65
+    public static URLBuilder getInstance() {
66
+        return instance;
67
+    }
68
+
69
+    public static void setInstance(final URLBuilder instance) {
70
+        URLBuilder.instance = instance;
71
+    }
72
+
71
     /**
73
     /**
72
      * Constructs an URL pointing to the specified resource on the file system.
74
      * Constructs an URL pointing to the specified resource on the file system.
73
      *
75
      *

読み込み中…
キャンセル
保存