Class ForEachSupport
- java.lang.Object
-
- jakarta.servlet.jsp.tagext.TagSupport
-
- jakarta.servlet.jsp.jstl.core.LoopTagSupport
-
- org.apache.taglibs.standard.tag.common.core.ForEachSupport
-
- All Implemented Interfaces:
jakarta.servlet.jsp.jstl.core.LoopTag,jakarta.servlet.jsp.tagext.IterationTag,jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.Tag,jakarta.servlet.jsp.tagext.TryCatchFinally,Serializable
- Direct Known Subclasses:
ForEachTag,ForEachTag
public abstract class ForEachSupport extends jakarta.servlet.jsp.jstl.core.LoopTagSupportSupport for tag handlers for <forEach>, the core iteration tag in JSTL 1.0. This class extends LoopTagSupport and provides ForEach-specific functionality. The rtexprvalue library and the expression-evaluating library each have handlers that extend this class.
Localized here is the logic for handling the veritable smorgasbord of types supported by <forEach>, including arrays, Collections, and others. To see how the actual iteration is controlled, review the jakarta.servlet.jsp.jstl.core.LoopTagSupport class instead.
- Author:
- Shawn Bayern
- See Also:
LoopTagSupport, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceForEachSupport.ForEachIteratorprotected classForEachSupport.SimpleForEachIterator
-
Field Summary
Fields Modifier and Type Field Description protected ForEachSupport.ForEachIteratoritemsprotected ObjectrawItems
-
Constructor Summary
Constructors Constructor Description ForEachSupport()
-
Method Summary
-
Methods inherited from class jakarta.servlet.jsp.jstl.core.LoopTagSupport
doAfterBody, doCatch, doFinally, doStartTag, getCurrent, getDelims, getLoopStatus, setVar, setVarStatus, validateBegin, validateEnd, validateStep
-
Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Field Detail
-
items
protected ForEachSupport.ForEachIterator items
-
rawItems
protected Object rawItems
-
-
Method Detail
-
hasNext
protected boolean hasNext() throws jakarta.servlet.jsp.JspTagException- Specified by:
hasNextin classjakarta.servlet.jsp.jstl.core.LoopTagSupport- Throws:
jakarta.servlet.jsp.JspTagException
-
next
protected Object next() throws jakarta.servlet.jsp.JspTagException
- Specified by:
nextin classjakarta.servlet.jsp.jstl.core.LoopTagSupport- Throws:
jakarta.servlet.jsp.JspTagException
-
prepare
protected void prepare() throws jakarta.servlet.jsp.JspTagException- Specified by:
preparein classjakarta.servlet.jsp.jstl.core.LoopTagSupport- Throws:
jakarta.servlet.jsp.JspTagException
-
release
public void release()
- Specified by:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classjakarta.servlet.jsp.jstl.core.LoopTagSupport
-
supportedTypeForEachIterator
protected ForEachSupport.ForEachIterator supportedTypeForEachIterator(Object o) throws jakarta.servlet.jsp.JspTagException
- Throws:
jakarta.servlet.jsp.JspTagException
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(Object o) throws jakarta.servlet.jsp.JspTagException
- Throws:
jakarta.servlet.jsp.JspTagException
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(Object[] a)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(boolean[] a)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(byte[] a)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(char[] a)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(short[] a)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(int[] a)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(long[] a)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(float[] a)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(double[] a)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(Collection c)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(Iterator i)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(Enumeration e)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(Map m)
-
toForEachIterator
protected ForEachSupport.ForEachIterator toForEachIterator(String s)
-
-