public ContainerTypeDescription[] getDescriptionsForContainerAdapter(Class containerAdapter) { if (containerAdapter == null) throw new NullPointerException("containerAdapter cannot be null"); //$NON-NLS-1$ List result = new ArrayList(); List descriptions = getDescriptions(); for (Iterator i = descriptions.iterator(); i.hasNext();) { ContainerTypeDescription description = (ContainerTypeDescription) i.next(); String[] supportedAdapters = description.getSupportedAdapterTypes(); if (supportedAdapters != null) { for (int j = 0; j < supportedAdapters.length; j++) { if (supportedAdapters[j].equals(containerAdapter.getName())) result.add(description); } } } return (ContainerTypeDescription[]) result.toArray(new ContainerTypeDescription[] {}); }