/*
* Note: we don't check for type mismatches here; we assume
* the expression evaluator will return the expected type
* (by virtue of knowledge we give it about what that type is).
* A ClassCastException here is truly unexpected, so we let it
* propagate up.
*/
if (begin_ != null) {
Object r = ExpressionEvaluatorManager.evaluate(
"begin", begin_, Integer.class, this, pageContext);
if (r == null)
throw new NullAttributeException("forTokens", "begin");
begin = ((Integer) r).intValue();
validateBegin();
}
if (end_ != null) {
Object r = ExpressionEvaluatorManager.evaluate(
"end", end_, Integer.class, this, pageContext);
if (r == null)
throw new NullAttributeException("forTokens", "end");
end = ((Integer) r).intValue();
validateEnd();
}
if (step_ != null) {
Object r = ExpressionEvaluatorManager.evaluate(
"step", step_, Integer.class, this, pageContext);
if (r == null)
throw new NullAttributeException("forTokens", "step");
step = ((Integer) r).intValue();
validateStep();
}
if (items_ != null) {
items = (String) ExpressionEvaluatorManager.evaluate(
"items", items_, String.class, this, pageContext);
// use the empty string to indicate "no iteration"
if (items == null)
items = "";
}
if (delims_ != null) {
delims = (String) ExpressionEvaluatorManager.evaluate(
"delims", delims_, String.class, this, pageContext);
// use the empty string to cause monolithic tokenization
if (delims == null)
delims = "";
}