@Test public void getFileConfigFactory() { ConfigFactory factory = ConfigFactory.getInstance("file"); assertTrue(factory instanceof FileConfigFactory); }
public static ConfigFactory getInstance(String type) { if (type.equals("text")) return new TextConfigFactory(); if (type.equals("file")) return new FileConfigFactory(); if (type.equals("classpath")) return new ClasspathConfigFactory(); return null; }
ConfigFactory { public static ConfigFactory getInstance(String type) { if (type.equals("text")) return new TextConfigFactory(); if (type.equals("file")) return new FileConfigFactory(); if (type.equals("classpath")) return new ClasspathConfigFactory(); return null; } }
ConfigFactory { public static ConfigFactory getInstance(String type) { if (type.equals("text")) return new TextConfigFactory(); if (type.equals("file")) return new FileConfigFactory(); if (type.equals("classpath")) return new ClasspathConfigFactory(); return null; }  }
ConfigFactory { public static ConfigFactory getInstance(String type) { if (type.equals("text")) return new TextConfigFactory(); if (type.equals("file")) return new FileConfigFactory(); if (type.equals("classpath")) return new ClasspathConfigFactory(); return null; }  static ConfigFactory getInstance(String type); abstract Config create(String value); abstract boolean isReloadSupported(); }
ConfigFactory { public static ConfigFactory getInstance(String type) { if (type.equals("text")) return new TextConfigFactory(); if (type.equals("file")) return new FileConfigFactory(); if (type.equals("classpath")) return new ClasspathConfigFactory(); return null; }  static ConfigFactory getInstance(String type); abstract Config create(String value); abstract boolean isReloadSupported();  }