-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(upgradeConf): Upgrade the configuration
- add argument cli parser - change configruation to take ArgParser feature. fix #59
- Loading branch information
Showing
10 changed files
with
583 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/fr/snapgames/fromclasstogame/core/config/StringArgParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package fr.snapgames.fromclasstogame.core.config; | ||
|
||
import fr.snapgames.fromclasstogame.core.config.cli.AbstractArgParser; | ||
|
||
public class StringArgParser extends AbstractArgParser<String> { | ||
|
||
public StringArgParser(String name, String description, String shortKey, String longKey, String configKey,String defaultValue) { | ||
super(name, description, shortKey, longKey, configKey); | ||
setDefaultValue(defaultValue); | ||
} | ||
|
||
@Override | ||
public void parseFromConfigFile(String line) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public String parse(String strValue) { | ||
return strValue; | ||
} | ||
|
||
@Override | ||
public boolean validate(String strValue) { | ||
return true; | ||
} | ||
|
||
} |
Oops, something went wrong.