private static boolean registerByClassName()

in src/main/java/org/apache/sling/testing/mock/caconfig/ContextPlugins.java [187:199]


    private static boolean registerByClassName(SlingContextImpl context, String className) {
        try {
            Class<?> clazz = Class.forName(className);
            context.registerInjectActivateService(clazz.newInstance());
            return true;
        } catch (ClassNotFoundException ex) {
            return false;
        } catch (InstantiationException ex) {
            throw new RuntimeException(ex);
        } catch (IllegalAccessException ex) {
            throw new RuntimeException(ex);
        }
    }