@Test public void getInstance() { assertNotNull(PreconditionFactory.getInstance()); assertTrue(PreconditionFactory.getInstance() == PreconditionFactory.getInstance()); }
public static PreconditionFactory getInstance() { if (instance == null) { instance = new PreconditionFactory(); } return instance; }
PreconditionFactory { public static PreconditionFactory getInstance() { if (instance == null) { instance = new PreconditionFactory(); } return instance; } }
PreconditionFactory { public static PreconditionFactory getInstance() { if (instance == null) { instance = new PreconditionFactory(); } return instance; } @SuppressWarnings("unchecked") private  PreconditionFactory(); }
PreconditionFactory { public static PreconditionFactory getInstance() { if (instance == null) { instance = new PreconditionFactory(); } return instance; } @SuppressWarnings("unchecked") private  PreconditionFactory(); static PreconditionFactory getInstance(); static void reset(); Map<String, Class<? extends Precondition>> getPreconditions(); void register(Class<? extends Precondition> clazz); void unregister(String name); Precondition create(String tagName); }
PreconditionFactory { public static PreconditionFactory getInstance() { if (instance == null) { instance = new PreconditionFactory(); } return instance; } @SuppressWarnings("unchecked") private  PreconditionFactory(); static PreconditionFactory getInstance(); static void reset(); Map<String, Class<? extends Precondition>> getPreconditions(); void register(Class<? extends Precondition> clazz); void unregister(String name); Precondition create(String tagName);  }