blob: 96bff96df2c18f3ebc632ab9d66e124bb35276e8 [file] [log] [blame]
package org.apache.commons.jelly;
import org.apache.commons.jelly.JellyException;
import org.apache.commons.jelly.TagLibrary;
import org.apache.commons.jelly.expression.ConstantExpression;
import org.apache.commons.jelly.expression.Expression;
import org.apache.commons.jelly.expression.ExpressionFactory;
public class TJTagLibrary extends TagLibrary {
public static final String NS = "jelly:test";
private static final ExpressionFactory TEST_FACTORY = new ExpressionFactory() {
/* (non-Javadoc)
* @see org.apache.commons.jelly.expression.ExpressionFactory#createExpression(java.lang.String)
*/
public Expression createExpression(String text) throws JellyException {
return new ConstantExpression("${TEST FACTORY: " + text + "}");
}
};
public TJTagLibrary() {
super(false);
registerTag(TJTest.TAG_NAME, TJTest.class);
registerTag(TJEcho.TAG_NAME, TJEcho.class);
}
/* (non-Javadoc)
* @see org.apache.commons.jelly.TagLibrary#getExpressionFactory()
*/
public ExpressionFactory getExpressionFactory() {
return TEST_FACTORY;
}
}