public static AppCache getInstance()
{
- Instance i = Instance.getInstance();
- return (i.appCache == null ? i.appCache = new AppCache() : i.appCache);
+ Instance j = Instance.getInstance();
+ return (j.appCache == null ? j.appCache = new AppCache() : j.appCache);
}
private AppCache()
/**
* Returns a new SequenceFetcher singleton, or a mock object if one has been
- * set. Used by CrossRef and java.gui.SequenceFetcher.
+ * set.
*
* @return
*/
}
/**
+ * Set the instance object to use (intended for unit testing with mock
+ * objects).
*
- * This public constructor is only is for use by testng to anonymously
- * subclass SequenceFetcher.
- *
+ * Be sure to reset to null in the tearDown method of any tests!
*
+ * @param sf
*/
- public SequenceFetcher()
+ public static void setSequenceFetcher(SequenceFetcher sf)
{
- addAllDatabases();
+ Instance.getInstance().sequenceFetcher = sf;
}
/**
- * Set the instance object to use (intended for unit testing with mock
- * objects).
*
- * Be sure to reset to null in the tearDown method of any tests!
+ * This public constructor is only is for use by testng to anonymously
+ * subclass SequenceFetcher.
+ *
*
- * @param sf
*/
- public static void setSequenceFetcher(SequenceFetcher sf)
+ public SequenceFetcher()
{
- Instance.getInstance().sequenceFetcher = sf;
+ addAllDatabases();
}
public void addAllDatabases()