@Test public void testRepositoryFactoryEveryImplIsNamedAsRepository() { List<Class<? extends Repository>> repositoryClasses = RepositoryFactory.getRepositoryClasses(); for (Class<? extends Repository> clazz : repositoryClasses) { assertTrue("should end with \"Repository\"", clazz.getSimpleName().endsWith("Repository")); } }
public static List<Class<? extends Repository>> getRepositoryClasses() { ArrayList<Class<? extends Repository>> list = new ArrayList<>(repositories.length); for (int i = repositories.length - 1; i >= 0; i--) { Class<? extends Repository> clazz = repositories[i].getClass(); if (isEnabled(clazz)) { list.add(clazz); } } return list; }
RepositoryFactory { public static List<Class<? extends Repository>> getRepositoryClasses() { ArrayList<Class<? extends Repository>> list = new ArrayList<>(repositories.length); for (int i = repositories.length - 1; i >= 0; i--) { Class<? extends Repository> clazz = repositories[i].getClass(); if (isEnabled(clazz)) { list.add(clazz); } } return list; } }
RepositoryFactory { public static List<Class<? extends Repository>> getRepositoryClasses() { ArrayList<Class<? extends Repository>> list = new ArrayList<>(repositories.length); for (int i = repositories.length - 1; i >= 0; i--) { Class<? extends Repository> clazz = repositories[i].getClass(); if (isEnabled(clazz)) { list.add(clazz); } } return list; } private  RepositoryFactory(); }
RepositoryFactory { public static List<Class<? extends Repository>> getRepositoryClasses() { ArrayList<Class<? extends Repository>> list = new ArrayList<>(repositories.length); for (int i = repositories.length - 1; i >= 0; i--) { Class<? extends Repository> clazz = repositories[i].getClass(); if (isEnabled(clazz)) { list.add(clazz); } } return list; } private  RepositoryFactory(); static List<Class<? extends Repository>> getRepositoryClasses(); static List<Class<? extends Repository>> getDisabledRepositoryClasses(); static Repository getRepository(File file); static Repository getRepository(File file, CommandTimeoutType cmdType); static Repository getRepository(File file, CommandTimeoutType cmdType, boolean isNested); static Repository getRepository(RepositoryInfo info, CommandTimeoutType cmdType); static void initializeIgnoredNames(RuntimeEnvironment env); static String matchRepositoryByName(String name); }
RepositoryFactory { public static List<Class<? extends Repository>> getRepositoryClasses() { ArrayList<Class<? extends Repository>> list = new ArrayList<>(repositories.length); for (int i = repositories.length - 1; i >= 0; i--) { Class<? extends Repository> clazz = repositories[i].getClass(); if (isEnabled(clazz)) { list.add(clazz); } } return list; } private  RepositoryFactory(); static List<Class<? extends Repository>> getRepositoryClasses(); static List<Class<? extends Repository>> getDisabledRepositoryClasses(); static Repository getRepository(File file); static Repository getRepository(File file, CommandTimeoutType cmdType); static Repository getRepository(File file, CommandTimeoutType cmdType, boolean isNested); static Repository getRepository(RepositoryInfo info, CommandTimeoutType cmdType); static void initializeIgnoredNames(RuntimeEnvironment env); static String matchRepositoryByName(String name);  }