Skip to content

Commit 9b87f32

Browse files
committed
[Deprecated] ArgumentsProperties 将ArgumentsProperties设为弃用;
1 parent c87e973 commit 9b87f32

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/net/lamgc/utils/base/ArgumentsProperties.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
import java.util.regex.Matcher;
88
import java.util.regex.Pattern;
99

10+
/**
11+
* 参数解析器, 支持Linux长短参数写法
12+
* @deprecated 请使用Apache Commons-Cli 套件中的参数解析器
13+
*/
14+
@Deprecated
1015
public class ArgumentsProperties extends HashMap<String, String>{
1116

1217
private static final long serialVersionUID = 3008463812837214134L;
@@ -18,11 +23,11 @@ public class ArgumentsProperties extends HashMap<String, String>{
1823

1924
private final static Pattern pattern = Pattern.compile("/\\s*(\".+?\"|[^:\\s])+((\\s*:\\s*(\".+?\"|[^\\s])+)|)|(\".+?\"|[^\"\\s])+");
2025

21-
private String[] keyFlags;
26+
private final String[] keyFlags;
2227

2328
private String[] rawArguments;
2429

25-
private ArrayList<String> keyList = new ArrayList<>();
30+
private final ArrayList<String> keyList = new ArrayList<>();
2631

2732
/**
2833
* 构造一个ArgumentsProperties.

0 commit comments

Comments
 (0)