This repository was archived by the owner on Aug 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +45
-4
lines changed
src/main/java/ir/xenoncommunity Expand file tree Collapse file tree 4 files changed +45
-4
lines changed Original file line number Diff line number Diff line change 1
1
echo "-------------------------- Resolving Dependecies... ------------------------"
2
2
mvn clean
3
3
echo "----------------------------- Packaging Jars... ----------------------------"
4
- mvn package
4
+ mvn package -e
5
5
echo "----------------------------- Running Project... ---------------------------"
6
6
echo "---------------------------APPLICATION - console: --------------------------"
7
- java -cp target/XenonTools-0.1.jar ir.xenoncommunity.Main
7
+ java -cp target/XenonTools-0.1.jar ir.xenoncommunity.Main -kir kos -salam 22 -b
8
8
echo "--------------------------- Done Running Program ---------------------------"
Original file line number Diff line number Diff line change 1
1
package ir .xenoncommunity ;
2
2
3
+ import lombok .experimental .UtilityClass ;
4
+
3
5
public class Main {
6
+ public static String [] args ;
4
7
public static void main (final String [] args ){
8
+ Main .args = args ;
5
9
MainRunner .run ();
6
10
}
7
- }
11
+ }
Original file line number Diff line number Diff line change 1
1
package ir .xenoncommunity ;
2
2
3
3
import lombok .experimental .UtilityClass ;
4
+ import ir .xenoncommunity .utils .ArgumentHandler ;
4
5
5
6
@ UtilityClass
6
7
public class MainRunner {
7
8
public void run (){
8
- System . out . println ( "salam sina" );
9
+
9
10
}
11
+
10
12
}
Original file line number Diff line number Diff line change
1
+ package ir .xenoncommunity .utils ;
2
+
3
+ import ir .xenoncommunity .Main ;
4
+ import lombok .val ;
5
+ import lombok .experimental .UtilityClass ;
6
+
7
+ @ UtilityClass
8
+ public class ArgumentHandler {
9
+ public String getArgS (final String argIn ){
10
+ for (int index = 0 ; index < Main .args .length ; index ++){
11
+ if (Main .args [index ].equals (argIn ))
12
+ return Main .args [index +1 ];
13
+ }
14
+ return "NO ARGS" ;
15
+ }
16
+ public int getArgI (final String argIn ){
17
+ for (int index = 0 ; index < Main .args .length ; index ++){
18
+ if (Main .args [index ].equals (argIn ))
19
+ return Integer .parseInt (Main .args [index +1 ]);
20
+ }
21
+ return 0 ;
22
+ }
23
+ public boolean getArgB (final String argIn ){
24
+ for (int index = 0 ; index < Main .args .length ; index ++){
25
+ if (Main .args [index ].equals (argIn )){
26
+ try {
27
+ return Boolean .parseBoolean (Main .args [index +1 ]);
28
+ }catch (Exception e ){
29
+ return true ;
30
+ }
31
+ }
32
+ }
33
+ return false ;
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments