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