public class JsonConfigParser
extends java.lang.Object
Constructor and Description |
---|
JsonConfigParser()
A lightweight set of re-usable functions for general purpose parsing.
|
Modifier and Type | Method and Description |
---|---|
void |
fill(java.lang.Class<?> clazz,
java.lang.String path)
Setting value into the variable which below the Class, after reading the file that is earmarked
path.
|
void |
fill(java.util.function.Function<java.lang.String,java.lang.Class<?>> listener,
java.lang.String path)
Setting value into the variable which below the Class, after reading the file that is earmarked
path.
|
public JsonConfigParser()
public void fill(java.lang.Class<?> clazz, java.lang.String path) throws java.lang.IllegalArgumentException
public static void initConfig(String path) {
new SimpleXmlParser().fill(ConfigReader.class, path);
}
.
clazz
- plan to be used Classpath
- earmarked JSON file pathjava.lang.IllegalArgumentException
public void fill(java.util.function.Function<java.lang.String,java.lang.Class<?>> listener, java.lang.String path) throws java.lang.IllegalArgumentException
public static void initConfig(String path) {
new SimpleXmlParser().fillFromJSON(ConfigReader.class, path);
}
.
listener
- Provider the Class which was earmarked by key word in JSON filepath
- earmarked JSON file path it´s exists any error and was tag falsejava.lang.IllegalArgumentException