Sfoglia il codice sorgente

Add lombok and delete half of the Invite class as a test

Change-Id: Ib0a69e0cac25098141bec355495a42b5324b4158
Reviewed-on: http://gerrit.dmdirc.com/2191
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.6.7rc1
Chris Smith 12 anni fa
parent
commit
bd5d10e28c
3 ha cambiato i file con 18 aggiunte e 30 eliminazioni
  1. BIN
      lib/lombok-pg-0.10.0.jar
  2. 10
    1
      nbproject/project.properties
  3. 8
    29
      src/com/dmdirc/Invite.java

BIN
lib/lombok-pg-0.10.0.jar Vedi File


+ 10
- 1
nbproject/project.properties Vedi File

@@ -1,7 +1,14 @@
1
+annotation.processing.enabled=true
2
+annotation.processing.enabled.in.editor=true
3
+annotation.processing.run.all.processors=true
1 4
 endorsed.classpath=
2 5
 file.reference.junit-4.8.1.jar=lib/junit-4.8.1.jar
6
+file.reference.lombok-pg-0.10.0.jar=lib/lombok-pg-0.10.0.jar
3 7
 file.reference.mockito-all-1.8.2.jar=lib/mockito-all-1.8.2.jar
8
+javac.processorpath=\
9
+    ${javac.classpath}
4 10
 jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
11
+mkdist.disabled=false
5 12
 project.license=dmdirc
6 13
 application.title=DMDirc
7 14
 application.vendor=chris
@@ -68,7 +75,9 @@ util.test.dir=modules/util/test
68 75
 # However netbeans fails miserably at understanding this in the IDE, so we
69 76
 # have the private.classpath variable that will be updated in dynamic.propeties
70 77
 # automatically by ant.
71
-javac.classpath=${private.classpath}
78
+javac.classpath=\
79
+    ${private.classpath}:\
80
+    ${file.reference.lombok-pg-0.10.0.jar}
72 81
 javac.test.classpath=\
73 82
     ${javac.classpath}:\
74 83
     ${build.classes.dir}:\

+ 8
- 29
src/com/dmdirc/Invite.java Vedi File

@@ -24,18 +24,24 @@ package com.dmdirc;
24 24
 
25 25
 import java.util.Date;
26 26
 
27
+import lombok.Getter;
28
+
27 29
 /**
28 30
  * Model for a channel invitation.
29 31
  */
32
+@SuppressWarnings("PMD.UnusedPrivateField")
30 33
 public class Invite {
31 34
 
32 35
     /** The server this invite was on. */
36
+    @Getter
33 37
     private final Server server;
34 38
 
35 39
     /** The channel this invite is for. */
40
+    @Getter
36 41
     private final String channel;
37 42
 
38 43
     /** The time this invite was created. */
44
+    @Getter
39 45
     private final long timestamp;
40 46
 
41 47
     /** The source of this invite. */
@@ -56,36 +62,10 @@ public class Invite {
56 62
     }
57 63
 
58 64
     /**
59
-     * Retrieves the server that this invite is associated with.
60
-     *
61
-     * @return This invite's server
62
-     */
63
-    public Server getServer() {
64
-        return server;
65
-    }
66
-
67
-    /**
68
-     * Retrieves the name of the channel that this invite is for.
69
-     *
70
-     * @return This invite's channel
71
-     */
72
-    public String getChannel() {
73
-        return channel;
74
-    }
75
-
76
-    /**
77
-     * Retrieves the timestamp that this invite was received at.
78
-     *
79
-     * @return This invite's timestamp
80
-     */
81
-    public long getTimestamp() {
82
-        return timestamp;
83
-    }
84
-
85
-    /**
86
-     * Retrieves the nickname, ident and hostname of this invite's source.
65
+     * Retrieves the source of this invite.
87 66
      *
88 67
      * @return This invite's source
68
+     * @see Server#parseHostmask(java.lang.String)
89 69
      */
90 70
     public String[] getSource() {
91 71
         return server.parseHostmask(source);
@@ -98,7 +78,6 @@ public class Invite {
98 78
         server.acceptInvites(this);
99 79
     }
100 80
 
101
-
102 81
     /**
103 82
      * Decline this invite removing it from the invite list.
104 83
      */

Loading…
Annulla
Salva