private final Environment env;
private final Environment.Namespace fnsModel;
CaptureOutput(Environment env) throws TemplateException {
this.env = env;
TemplateModel nsModel = null;
if(namespaceExp != null) {
nsModel = namespaceExp.getAsTemplateModel(env);
if (!(nsModel instanceof Environment.Namespace)) {
throw new TemplateException(
"namespace parameter does not specify "
+ "a namespace. It is a "
+ nsModel.getClass().getName(), env);
}
}
fnsModel = (Environment.Namespace )nsModel;
}