@@ -0,0 +1,2004 @@
+package com.wizzardo.http.template;%0A%0Aimport com.wizzardo.epoll.readable.ReadableByteArray;%0Aimport com.wizzardo.epoll.readable.ReadableData;%0Aimport com.wizzardo.tools.evaluation.EvalTools;%0Aimport com.wizzardo.tools.evaluation.Expression;%0Aimport com.wizzardo.tools.misc.Unchecked;%0A%0Aimport java.nio.charset.StandardCharsets;%0Aimport java.util.Map;%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0A/**%0A * @author: moxa%0A * Date: 2/11/13%0A */%0Apublic class ExpressionHolder implements Renderable %7B%0A    private volatile boolean prepared = false;%0A    private String string;%0A    private Expression expression;%0A%0A    public ExpressionHolder(String s) %7B%0A        string = s;%0A    %7D%0A%0A    protected ExpressionHolder() %7B%0A    %7D%0A%0A    public ReadableData get(Map%3CString, Object%3E model) %7B%0A        return new ReadableByteArray(String.valueOf(getRaw(model)).getBytes(StandardCharsets.UTF_8));%0A    %7D%0A%0A    private static Pattern p = Pattern.compile(%22%5C%5C$%5C%5C%7B(%5B%5E%5C%5C%7B%5C%5C%7D%5D+)%5C%5C%7D%7C%5C%5C$(%5B%5E%5C%5C., -%5D+)%7C(%5C%5C%5B.+%5C%5C%5D)%22);%0A%0A    public Object getRaw(Map%3CString, Object%3E model) %7B%0A        if (!prepared) %7B%0A            synchronized (this) %7B%0A                if (!prepared) %7B%0A                    Unchecked.run(() -%3E %7B%0A                        Matcher m = p.matcher(string);%0A                        if (m.find()) %7B%0A                            String exp = m.group(1);%0A                            if (exp == null) %7B%0A                                exp = m.group(2);%0A                            %7D%0A                            if (exp == null) %7B%0A                                exp = m.group(3);%0A                            %7D%0A                            expression = EvalTools.prepare(exp, model);%0A                        %7D else%0A                            expression = EvalTools.prepare(string, model);%0A                    %7D);%0A                    prepared = true;%0A                %7D%0A            %7D%0A        %7D%0A        return Unchecked.call(() -%3E expression.get(model));%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return string;%0A    %7D%0A%7D

add ExpressionHolder