private static void tryToSetClassList(Object object, Node node) throws TikaConfigException {
        String name = node.getLocalName();
        try {
            Class interfaze =
                    Class.forName(node.getAttributes().getNamedItem("class").getTextContent());
            List items = new ArrayList<Object>();
            NodeList nodeList = node.getChildNodes();
            for (int i = 0; i < nodeList.getLength(); i++) {
                Node child = nodeList.item(i);
                if (child.getNodeType() == 1) {
                    Object item = buildClass(child, child.getLocalName(), interfaze);
                    setParams(item, child, new HashSet<>());
                    items.add(item);
                }
            }

            String setter = "set" + name.substring(0, 1).toUpperCase(Locale.US) + name.substring(1);
            Method m = object.getClass().getMethod(setter, List.class);
            m.invoke(object, items);

        } catch (ClassNotFoundException | InvocationTargetException | NoSuchMethodException |
                 IllegalAccessException e) {
            throw new TikaConfigException("couldn't build class for " + name, e);
        }
    }
Use this to build a list of components for a composite item (e.g.
CompositeMetadataFilter, FetcherManager), each with their own configurations

@param compositeElementName
@param itemName
@param is
@throws TikaConfigException
@throws IOException
tika-core/src/main/java/org/apache/tika/config/ConfigBase.java