/** * Set the singleton instance of the class which will be stored statically * @param newInstance the instance to use as the singleton instance */ public static ClassDataCacher setInstance(ClassDataCacher newInstance) { ClassDataCacher instance = newInstance; if (instance == null) { instance = new ClassDataCacher(); instance.singleton = true; } ClassDataCacher.timesCreated++; instanceStorage = new SoftReference<ClassDataCacher>(instance); return instance; } public static void clearInstance() {
/** * Set the singleton instance of the class which will be stored statically * @param newInstance the instance to use as the singleton instance */ public static ClassDataCacher setInstance(ClassDataCacher newInstance) { ClassDataCacher instance = newInstance; if (instance == null) { instance = new ClassDataCacher(); instance.singleton = true; } ClassDataCacher.timesCreated++; instanceStorage = new SoftReference<ClassDataCacher>(instance); return instance; } public static void clearInstance() {