forked from fanruan/design
yaoh.wu
6 years ago
2 changed files with 19 additions and 5 deletions
@ -1,10 +1,26 @@
|
||||
package com.fr.design.utils; |
||||
|
||||
/** |
||||
* 为的就是能替换 DesignPort.class 实现多开,因此避免编译器常量编译展开优化 |
||||
*/ |
||||
public class DesignerPort { |
||||
|
||||
private DesignerPort() { |
||||
} |
||||
|
||||
public static final int MESSAGE_PORT = 51462; |
||||
public static final int DEBUG_MESSAGE_PORT = 51463; |
||||
/** |
||||
* 设计器端口,避免编译期常量优化展开 |
||||
*/ |
||||
public static final int MESSAGE_PORT = getMessagePort(); |
||||
/** |
||||
* 设计器端口,避免编译期常量优化展开 |
||||
*/ |
||||
public static final int DEBUG_MESSAGE_PORT = getDebugMessagePort(); |
||||
|
||||
private static int getMessagePort() { |
||||
return 51462; |
||||
} |
||||
|
||||
private static int getDebugMessagePort() { |
||||
return 51463; |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue