@API(status = API.Status.STABLE)
    public @NonNull Collection<org.incendo.cloud.@NonNull Command<C>> parseContainers(
            final @NonNull ClassLoader classLoader
    ) throws Exception {
        final List<String> classNames;
        try (InputStream stream = classLoader.getResourceAsStream(CommandContainerProcessor.PATH)) {
            if (stream == null) {
                return Collections.emptyList();
            }

            try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8))) {
                classNames = reader.lines().distinct().collect(Collectors.toList());
            }
        }

        final List<Class<?>> classes = new ArrayList<>();
        for (final String className : classNames) {
            classes.add(Class.forName(className, true, classLoader));
        }
        classes.sort(COMMAND_CONTAINER_COMPARATOR);

        final List<Object> instances = new LinkedList<>();
        for (final Class<?> commandContainer : classes) {
            // We now have the class, and we now just need to decide what constructor to invoke.
            // We first try to find a constructor which takes in the parser.
            @MonotonicNonNull Object instance;
            try {
                instance = commandContainer.getConstructor(AnnotationParser.class).newInstance(this);
            } catch (final NoSuchMethodException ignored) {
                try {
                    // Then we try to find a no-arg constructor.
                    instance = commandContainer.getConstructor().newInstance();
                } catch (final NoSuchMethodException e) {
                    // If neither are found, we panic!
                    throw new IllegalStateException(
                            String.format(
                                    "Command container %s has no valid constructors",
                                    commandContainer
                            ),
                            e
                    );
                }
            }
            instances.add(instance);
        }

        return this.parse(instances);
    }
Parses all known {@link org.incendo.cloud.annotations.processing.CommandContainer command containers}.

@param classLoader class loader to use to scan for {@link CommandContainerProcessor#PATH}
@return Collection of parsed commands
@throws Exception re-throws all encountered exceptions.
@see org.incendo.cloud.annotations.processing.CommandContainer CommandContainer for more information.
cloud-annotations/src/main/java/org/incendo/cloud/annotations/AnnotationParser.java