@Test public void testCreate() { SearchCriteriaBuilder SearchCriteriaBuilder = SearchCriteriaFactory.create(DirectoryType.MS_ACTIVE_DIRECTORY); assertTrue(SearchCriteriaBuilder instanceof ActiveDirectorySearchCriteriaBuilderImpl); }
public static SearchCriteriaBuilder create(DirectoryType directoryType){ SearchCriteriaBuilder searchCriteriaBuilder; switch (directoryType) { case MS_ACTIVE_DIRECTORY: searchCriteriaBuilder = new ActiveDirectorySearchCriteriaBuilderImpl(); break; default: throw new NotImplementedException(); } return searchCriteriaBuilder; }
SearchCriteriaFactory { public static SearchCriteriaBuilder create(DirectoryType directoryType){ SearchCriteriaBuilder searchCriteriaBuilder; switch (directoryType) { case MS_ACTIVE_DIRECTORY: searchCriteriaBuilder = new ActiveDirectorySearchCriteriaBuilderImpl(); break; default: throw new NotImplementedException(); } return searchCriteriaBuilder; } }
SearchCriteriaFactory { public static SearchCriteriaBuilder create(DirectoryType directoryType){ SearchCriteriaBuilder searchCriteriaBuilder; switch (directoryType) { case MS_ACTIVE_DIRECTORY: searchCriteriaBuilder = new ActiveDirectorySearchCriteriaBuilderImpl(); break; default: throw new NotImplementedException(); } return searchCriteriaBuilder; }  }
SearchCriteriaFactory { public static SearchCriteriaBuilder create(DirectoryType directoryType){ SearchCriteriaBuilder searchCriteriaBuilder; switch (directoryType) { case MS_ACTIVE_DIRECTORY: searchCriteriaBuilder = new ActiveDirectorySearchCriteriaBuilderImpl(); break; default: throw new NotImplementedException(); } return searchCriteriaBuilder; }  static SearchCriteriaBuilder create(DirectoryType directoryType); }
SearchCriteriaFactory { public static SearchCriteriaBuilder create(DirectoryType directoryType){ SearchCriteriaBuilder searchCriteriaBuilder; switch (directoryType) { case MS_ACTIVE_DIRECTORY: searchCriteriaBuilder = new ActiveDirectorySearchCriteriaBuilderImpl(); break; default: throw new NotImplementedException(); } return searchCriteriaBuilder; }  static SearchCriteriaBuilder create(DirectoryType directoryType);  }