com.caucho.jstl.rt
Class CoreForEachTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.jstl.core.LoopTagSupport
          extended by com.caucho.jstl.rt.CoreForEachTag
All Implemented Interfaces:
java.io.Serializable, LoopTag, IterationTag, JspTag, Tag, TryCatchFinally

public class CoreForEachTag
extends LoopTagSupport

See Also:
Serialized Form

Nested Class Summary
static class CoreForEachTag.ArrayIterator
           
static class CoreForEachTag.RangeIterator
           
static class CoreForEachTag.StringIterator
           
 
Field Summary
protected  int _begin
           
protected  int _end
           
protected  boolean _hasItems
           
protected  java.lang.Object _items
           
protected  java.util.Iterator _iterator
           
 
Fields inherited from class javax.servlet.jsp.jstl.core.LoopTagSupport
begin, beginSpecified, deferredExpression, end, endSpecified, itemId, statusId, step, stepSpecified
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
CoreForEachTag()
           
 
Method Summary
protected  ValueExpression createIndexedExpression(int index)
           
protected  java.lang.String getDelims()
           
static ValueExpression getExpr(ValueExpression expr, java.lang.Integer i, java.lang.Object items, java.lang.String delims)
           
static java.util.Iterator getIterator(java.lang.Object items)
           
 boolean hasNext()
          Returns true if there are more items.
 java.lang.Object next()
          Returns the next item
 void prepare()
          Prepares the iterator.
 void setBegin(int begin)
          Sets the beginning value
 void setEnd(int end)
          Sets the ending value
 void setItems(java.lang.Object items)
          Sets the collection expression.
 void setStep(int step)
          Sets the step value
 
Methods inherited from class javax.servlet.jsp.jstl.core.LoopTagSupport
doAfterBody, doCatch, doFinally, doStartTag, getCurrent, getLoopStatus, setVar, setVarStatus, validateBegin, validateEnd, validateStep
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
doEndTag, getParent, release, setPageContext, setParent
 

Field Detail

_begin

protected int _begin

_end

protected int _end

_items

protected java.lang.Object _items

_hasItems

protected boolean _hasItems

_iterator

protected java.util.Iterator _iterator
Constructor Detail

CoreForEachTag

public CoreForEachTag()
Method Detail

setItems

public void setItems(java.lang.Object items)
Sets the collection expression.


setBegin

public void setBegin(int begin)
Sets the beginning value


setEnd

public void setEnd(int end)
Sets the ending value


setStep

public void setStep(int step)
Sets the step value


prepare

public void prepare()
             throws JspTagException
Prepares the iterator.

Specified by:
prepare in class LoopTagSupport
Throws:
JspTagException

hasNext

public boolean hasNext()
Returns true if there are more items.

Specified by:
hasNext in class LoopTagSupport

next

public java.lang.Object next()
Returns the next item

Specified by:
next in class LoopTagSupport

getIterator

public static java.util.Iterator getIterator(java.lang.Object items)
                                      throws JspTagException
Throws:
JspTagException

createIndexedExpression

protected ValueExpression createIndexedExpression(int index)
                                           throws JspTagException
Throws:
JspTagException

getDelims

protected java.lang.String getDelims()
Overrides:
getDelims in class LoopTagSupport

getExpr

public static ValueExpression getExpr(ValueExpression expr,
                                      java.lang.Integer i,
                                      java.lang.Object items,
                                      java.lang.String delims)
                               throws JspTagException
Throws:
JspTagException