@SuppressWarnings("rawtypes")
    public GenericMapTemplate(TemplateRegistry registry, Class<? extends Template> tmpl) {
        try {
            constructor = tmpl.getConstructor(new Class<?>[] { Template.class, Template.class });
            constructor.newInstance(new Object[] { new AnyTemplate(registry), new AnyTemplate(registry) });
            // AnyTemplate.getInstance(registry),
            // AnyTemplate.getInstance(registry)});
        } catch (NoSuchMethodException e) {
            throw new IllegalArgumentException(e);
        } catch (InvocationTargetException e) {
            throw new IllegalArgumentException(e);
        } catch (IllegalAccessException e) {
            throw new IllegalArgumentException(e);
        } catch (InstantiationException e) {
            throw new IllegalArgumentException(e);
        }
    }