1 52 53 package freemarker.core; 54 55 import freemarker.template.*; 56 57 final class ParentheticalExpression extends Expression { 58 59 private final Expression nested; 60 61 ParentheticalExpression(Expression nested) { 62 this.nested = nested; 63 } 64 65 boolean isTrue(Environment env) throws TemplateException { 66 return nested.isTrue(env); 67 } 68 69 public String getCanonicalForm() { 70 return "(" + nested.getCanonicalForm() + ")"; 71 } 72 73 TemplateModel _getAsTemplateModel(Environment env) throws TemplateException 74 { 75 return nested.getAsTemplateModel(env); 76 } 77 78 public boolean isLiteral() { 79 return nested.isLiteral(); 80 } 81 82 Expression _deepClone(String name, Expression subst) { 83 return new ParentheticalExpression(nested.deepClone(name, subst)); 84 } 85 } 86 | Popular Tags |