|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mockrunner.tag.TagUtil
public class TagUtil
Util class for tag test framework.
Please note, that the methods of this class take
Object parameters where JspTag
or JspContext would be suitable. The reason is,
that these classes do not exist in J2EE 1.3. This class is
usable with J2EE 1.3 and J2EE 1.4.
| Constructor Summary | |
|---|---|
TagUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
createNestedTagInstance(java.lang.Class tag,
java.lang.Object pageContext,
java.util.Map attributes)
Creates an NestedTag instance wrapping the
specified tag. |
static java.lang.Object |
createNestedTagInstance(java.lang.Object tag,
java.lang.Object pageContext,
java.util.Map attributes)
Creates an NestedTag instance wrapping the
specified tag. |
static java.lang.String |
dumpTag(NestedTag tag,
java.lang.StringBuffer buffer,
int level)
Helper method to dump tags incl. child tags. |
static void |
dumpTagTree(java.util.List bodyList,
java.lang.StringBuffer buffer,
int level)
Helper method to dump tags incl. child tags. |
static void |
evalBody(java.util.List bodyList,
java.lang.Object pageContext)
Handles body evaluation of a tag. |
static void |
handleException(javax.servlet.jsp.tagext.Tag tag,
java.lang.Throwable exc)
Handles an exception that is thrown during tag lifecycle processing. |
static void |
handleFinally(javax.servlet.jsp.tagext.Tag tag)
Handles the finally block of tag lifecycle processing. |
static void |
populateTag(java.lang.Object tag,
java.util.Map attributes)
Populates the specified attributes to the specified tag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TagUtil()
| Method Detail |
|---|
public static java.lang.Object createNestedTagInstance(java.lang.Class tag,
java.lang.Object pageContext,
java.util.Map attributes)
NestedTag instance wrapping the
specified tag. Returns an instance of NestedStandardTag
or NestedBodyTag depending on the
type of specified tag.
tag - the tag classpageContext - the corresponding PageContext or JspContextattributes - the attribute map
NestedTag
java.lang.IllegalArgumentException - if tag is null
public static java.lang.Object createNestedTagInstance(java.lang.Object tag,
java.lang.Object pageContext,
java.util.Map attributes)
NestedTag instance wrapping the
specified tag. Returns an instance of NestedStandardTag
or NestedBodyTag depending on the
type of specified tag.
tag - the tagpageContext - the corresponding PageContext or JspContextattributes - the attribute map
NestedTag
java.lang.IllegalArgumentException - if tag is null
public static void handleException(javax.servlet.jsp.tagext.Tag tag,
java.lang.Throwable exc)
throws javax.servlet.jsp.JspException
doCatch(), if the tag implements
TryCatchFinally.
tag - the tagexc - the exception to be handled
javax.servlet.jsp.JspExceptionpublic static void handleFinally(javax.servlet.jsp.tagext.Tag tag)
doFinally(), if the tag implements
TryCatchFinally.
tag - the tag
public static void populateTag(java.lang.Object tag,
java.util.Map attributes)
tag - the tagattributes - the attribute map
public static void evalBody(java.util.List bodyList,
java.lang.Object pageContext)
throws javax.servlet.jsp.JspException
NestedTag,
the NestedTag.doLifecycle() method of
this tag is called. If the child is an instance of
DynamicChild, the
DynamicChild.evaluate() method is called
and the result is written to the out JspWriter as a
string. If the result is another object (usually a string) it is written
to the out JspWriter (the toString method will
be called).
bodyList - the list of body entriespageContext - the corresponding PageContext or JspContext
javax.servlet.jsp.JspException
public static java.lang.String dumpTag(NestedTag tag,
java.lang.StringBuffer buffer,
int level)
public static void dumpTagTree(java.util.List bodyList,
java.lang.StringBuffer buffer,
int level)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||