DescriptorEngine { public String[] getAvailableDictionaryClasses() { List<String> classList = new ArrayList<String>(); for (IImplementationSpecification spec : speclist) { String[] tmp = getDictionaryClass(spec); if (tmp != null) classList.addAll(Arrays.asList(tmp)); } Set<String> uniqueClasses = new HashSet<String>(classList); return (String[]) uniqueClasses.toArray(new String[]{}); } DescriptorEngine(List<String> classNames, IChemObjectBuilder builder);  DescriptorEngine(Class<? extends IDescriptor> c, IChemObjectBuilder builder); void process(IAtomContainer molecule); String getDictionaryType(String identifier); String getDictionaryType(IImplementationSpecification descriptorSpecification); String[] getDictionaryClass(String identifier); String[] getDictionaryClass(IImplementationSpecification descriptorSpecification); String getDictionaryDefinition(String identifier); String getDictionaryDefinition(DescriptorSpecification descriptorSpecification); String getDictionaryTitle(String identifier); String getDictionaryTitle(DescriptorSpecification descriptorSpecification); List<IImplementationSpecification> getDescriptorSpecifications(); void setDescriptorSpecifications(List<IImplementationSpecification> specs); List<String> getDescriptorClassNames(); List<IDescriptor> getDescriptorInstances(); void setDescriptorInstances(List<IDescriptor> descriptors); String[] getAvailableDictionaryClasses(); static List<String> getDescriptorClassNameByInterface(String interfaceName, String[] jarFileNames); static List<String> getDescriptorClassNameByPackage(String packageName, String[] jarFileNames); List<IDescriptor> instantiateDescriptors(List<String> descriptorClassNames); List<IImplementationSpecification> initializeSpecifications(List<IDescriptor> descriptors);  }
@Test public void testAvailableClass() { DescriptorEngine engine = new DescriptorEngine(IMolecularDescriptor.class, DefaultChemObjectBuilder.getInstance()); String[] availClasses = engine.getAvailableDictionaryClasses(); Assert.assertEquals(5, availClasses.length); }