javax.servlet.jsp.tagext
public class TagAdapter extends Object implements Tag
Because SimpleTag does not extend Tag, and because Tag.setParent() only accepts a Tag instance, a classic tag handler (one that implements Tag) cannot have a SimpleTag as its parent. To remedy this, a TagAdapter is created to wrap the SimpleTag parent, and the adapter is passed to setParent() instead. A classic Tag Handler can call getAdaptee() to retrieve the encapsulated SimpleTag instance.
Since: 2.0
Constructor Summary | |
---|---|
TagAdapter(SimpleTag adaptee)
Creates a new TagAdapter that wraps the given SimpleTag and
returns the parent tag when getParent() is called.
|
Method Summary | |
---|---|
int | doEndTag()
Must not be called.
|
int | doStartTag()
Must not be called.
|
JspTag | getAdaptee()
Gets the tag that is being adapted to the Tag interface.
|
Tag | getParent()
Returns the parent of this tag, which is always
getAdaptee().getParent().
|
void | release()
Must not be called.
|
void | setPageContext(PageContext pc)
Must not be called.
|
void | setParent(Tag parentTag)
Must not be called. |
Parameters: adaptee The SimpleTag being adapted as a Tag.
Returns: always throws UnsupportedOperationException
Throws: UnsupportedOperationException Must not be called JspException never thrown
Returns: always throws UnsupportedOperationException
Throws: UnsupportedOperationException Must not be called JspException never thrown
Returns: the tag that is being adapted
Returns: The parent of the tag being adapted.
Throws: UnsupportedOperationException Must not be called
Parameters: pc ignored.
Throws: UnsupportedOperationException Must not be called
Parameters: parentTag ignored.
Throws: UnsupportedOperationException Must not be called.