@Test public void testSetObjectFactory() { TestObjectFactory testFactory = new TestObjectFactory(); assertNotNull(FactoryFinder.getObjectFactory()); assertNotSame(testFactory, FactoryFinder.getObjectFactory()); FactoryFinder.ObjectFactory oldObjectFactory = FactoryFinder.getObjectFactory(); FactoryFinder.setObjectFactory(testFactory); assertSame(testFactory, FactoryFinder.getObjectFactory()); FactoryFinder.setObjectFactory(oldObjectFactory); }
public static void setObjectFactory(ObjectFactory objectFactory) { FactoryFinder.objectFactory = objectFactory; }
FactoryFinder { public static void setObjectFactory(ObjectFactory objectFactory) { FactoryFinder.objectFactory = objectFactory; } }
FactoryFinder { public static void setObjectFactory(ObjectFactory objectFactory) { FactoryFinder.objectFactory = objectFactory; } FactoryFinder(Class<T> factoryType, String path); }
FactoryFinder { public static void setObjectFactory(ObjectFactory objectFactory) { FactoryFinder.objectFactory = objectFactory; } FactoryFinder(Class<T> factoryType, String path); static ObjectFactory getObjectFactory(); static void setObjectFactory(ObjectFactory objectFactory); T newInstance(String key); void registerProviderFactory(String scheme, T factory); }
FactoryFinder { public static void setObjectFactory(ObjectFactory objectFactory) { FactoryFinder.objectFactory = objectFactory; } FactoryFinder(Class<T> factoryType, String path); static ObjectFactory getObjectFactory(); static void setObjectFactory(ObjectFactory objectFactory); T newInstance(String key); void registerProviderFactory(String scheme, T factory);  }