From 87ae1dfc8d8cb7b51d7bda4750ce841bbe691cfc Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Sat, 7 May 2016 12:51:23 -0400 Subject: General changes --- .../java/bjc/utils/configuration/Configurator.java | 44 ---------------------- 1 file changed, 44 deletions(-) delete mode 100644 BJC-Utils2/src/main/java/bjc/utils/configuration/Configurator.java (limited to 'BJC-Utils2/src/main/java/bjc/utils/configuration/Configurator.java') 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 - * 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 readConfig(Class clasz, - InputStream inputSource) { - try { - Constructor 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; - } - } -} -- cgit v1.2.3