public ConstructorFunction(String classname, Environment env, Template template) throws TemplateException { this.env = env; cl = env.getNewBuiltinClassResolver().resolve(classname, env, template); if (!TemplateModel.class.isAssignableFrom(cl)) { throw new _MiscTemplateException(NewBI.this, env, "Class ", cl.getName(), " does not implement freemarker.template.TemplateModel"); } if (BeanModel.class.isAssignableFrom(cl)) { throw new _MiscTemplateException(NewBI.this, env, "Bean Models cannot be instantiated using the ?", key, " built-in"); } if (JYTHON_MODEL_CLASS != null && JYTHON_MODEL_CLASS.isAssignableFrom(cl)) { throw new _MiscTemplateException(NewBI.this, env, "Jython Models cannot be instantiated using the ?", key, " built-in"); } }
public ConstructorFunction(String classname, Environment env, Template template) throws TemplateException { this.env = env; cl = env.getNewBuiltinClassResolver().resolve(classname, env, template); if (!TM_CLASS.isAssignableFrom(cl)) { throw new TemplateException("Class " + cl.getName() + " does not implement freemarker.template.TemplateModel", env); } if (BEAN_MODEL_CLASS.isAssignableFrom(cl)) { throw new TemplateException("Bean Models cannot be instantiated using the ?new built-in", env); } if (JYTHON_MODEL_CLASS != null && JYTHON_MODEL_CLASS.isAssignableFrom(cl)) { throw new TemplateException("Jython Models cannot be instantiated using the ?new built-in", env); } }
public ConstructorFunction(String classname, Environment env, Template template) throws TemplateException { this.env = env; cl = env.getNewBuiltinClassResolver().resolve(classname, env, template); if (!TemplateModel.class.isAssignableFrom(cl)) { throw new _MiscTemplateException(NewBI.this, env, "Class ", cl.getName(), " does not implement freemarker.template.TemplateModel"); } if (BeanModel.class.isAssignableFrom(cl)) { throw new _MiscTemplateException(NewBI.this, env, "Bean Models cannot be instantiated using the ?", key, " built-in"); } if (JYTHON_MODEL_CLASS != null && JYTHON_MODEL_CLASS.isAssignableFrom(cl)) { throw new _MiscTemplateException(NewBI.this, env, "Jython Models cannot be instantiated using the ?", key, " built-in"); } }
public ConstructorFunction(String classname, Environment env, Template template) throws TemplateException { this.env = env; cl = env.getNewBuiltinClassResolver().resolve(classname, env, template); if (!TemplateModel.class.isAssignableFrom(cl)) { throw new _MiscTemplateException(NewBI.this, env, "Class ", cl.getName(), " does not implement freemarker.template.TemplateModel"); } if (BeanModel.class.isAssignableFrom(cl)) { throw new _MiscTemplateException(NewBI.this, env, "Bean Models cannot be instantiated using the ?", key, " built-in"); } if (JYTHON_MODEL_CLASS != null && JYTHON_MODEL_CLASS.isAssignableFrom(cl)) { throw new _MiscTemplateException(NewBI.this, env, "Jython Models cannot be instantiated using the ?", key, " built-in"); } }