ソースを参照

refactor : separate class

master
우인혜 6年前
コミット
ac5434d72c

+ 1
- 1
src/main/java/com/mycompany/app/App.java ファイルの表示

@@ -55,7 +55,7 @@ public class App {
55 55
                         //  Create newNode When probe new IP
56 56
                         Node newNode = node.getClass().newInstance();
57 57
                         newNode.eip = (String)newPacket.eip;  //    Insert "eip" in newNode
58
-                        newNode.source.
58
+                        newNode.
59 59
                         networkNode.add(newNode);
60 60
                         
61 61
                     } catch (InstantiationException e) {

+ 14
- 0
src/main/java/com/mycompany/app/Eips.java ファイルの表示

@@ -0,0 +1,14 @@
1
+package com.mycompany.app;
2
+class Eips{
3
+    String ip;
4
+    int port;
5
+    String getSourceIp(){
6
+        return ip;
7
+    }
8
+    int getSourcePort(){
9
+        return port;
10
+    }
11
+    void setSourcePort(int num){
12
+        port = num;
13
+    }
14
+}

+ 17
- 0
src/main/java/com/mycompany/app/Nips.java ファイルの表示

@@ -0,0 +1,17 @@
1
+package com.mycompany.app;
2
+class Nips{
3
+    String ip;
4
+    int port;
5
+    String getDestIp(){
6
+        return ip;
7
+    }
8
+    int getDestPort(){
9
+        return port;
10
+    }
11
+    void SetDestIp(String str){
12
+        ip = str;
13
+    }
14
+    void SetDestPort(int num){
15
+        port = num;
16
+    }
17
+}

バイナリ
target/classes/com/mycompany/app/Eips.class ファイルの表示


バイナリ
target/classes/com/mycompany/app/Nips.class ファイルの表示


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