private static List loadReporters()

in dubbo-error-code-inspector/src/main/java/org/apache/dubbo/errorcode/config/ErrorCodeInspectorConfig.java [47:65]


    private static List<Reporter> loadReporters() {
        List<String> classNames = FileUtils.loadConfigurationFileInResources("reporter-classes.cfg");
        List<Reporter> tempReporters = new ArrayList<>();

        for (String clsName : classNames) {
            try {
                Class<? extends Reporter> cls = (Class<? extends Reporter>) Class.forName(clsName);
                Reporter r = cls.getConstructor().newInstance();

                tempReporters.add(r);

            } catch (InstantiationException | NoSuchMethodException | InvocationTargetException |
                     IllegalAccessException | ClassNotFoundException e) {
                throw new RuntimeException(e);
            }
        }

        return Collections.unmodifiableList(tempReporters);
    }