diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-05-07 12:51:23 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-05-07 12:51:23 -0400 |
| commit | 87ae1dfc8d8cb7b51d7bda4750ce841bbe691cfc (patch) | |
| tree | 290f31282898bd39300c70646c6fe2b65832886a /BJC-Utils2/src/main/java/bjc/utils/configuration/Configurator.java | |
| parent | fb7d03388e298258563c22abda1bd46cdaf991b7 (diff) | |
General changes
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/configuration/Configurator.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/configuration/Configurator.java | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/configuration/Configurator.java b/BJC-Utils2/src/main/java/bjc/utils/configuration/Configurator.java deleted file mode 100644 index e116dea..0000000 --- a/BJC-Utils2/src/main/java/bjc/utils/configuration/Configurator.java +++ /dev/null @@ -1,44 +0,0 @@ -package bjc.utils.configuration; - -import java.io.InputStream; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -/** - * Bind the values in a prepared class to a config file - * - * @author ben - * - */ -public class Configurator { - /** - * Bind the values in a config file to the values in a class, - * substituting default values if none are appropriate - * - * @param <E> - * The type of the object to bind - * @param clasz - * The class of the object to bind - * @param inputSource - * The source to get input from - * @return A instance of the provided class, with values filled in from - * a config file - */ - public static <E> E readConfig(Class<E> clasz, - InputStream inputSource) { - try { - Constructor<E> noArgConstructor = clasz.getConstructor(); - - E backingStore = noArgConstructor.newInstance(); - - return backingStore; - } catch (NoSuchMethodException | SecurityException - | InstantiationException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - - return null; - } - } -} |
