|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.tag.layout.LayoutRenderTagPath
public class LayoutRenderTagPath
Uniquely identifies a LayoutRenderTag
within a page. Within a single page, any number of
render tags can be accessible via the same "path," where a path consists of zero or more
component tags that are parents of the render tag. This class helps to distinguish between
multiple render tags with the same component path by assigning sequential indexes to them.
Constructor Summary | |
---|---|
LayoutRenderTagPath(LayoutRenderTag tag)
Construct a new instance to identify the specified tag. |
Method Summary | |
---|---|
protected List<String> |
calculateComponentPath(LayoutRenderTag tag)
Calculate the path to a render tag. |
boolean |
equals(Object obj)
|
List<String> |
getComponentPath()
Get the names of the LayoutComponentTag s that are parent tags of the render tag. |
int |
getIndex()
Get the index (zero-based) of the combined render page and component path within the page. |
int |
hashCode()
|
protected int |
incrementIndex(PageContext pageContext)
Get the next index for this path from the specified page context. |
boolean |
isPathComponent(LayoutComponentTag tag)
True if the specified tag is a component that must execute so that the current component tag can execute. |
protected boolean |
isPathComponent(LayoutComponentTag tag,
Iterator<String> path)
Recursive method called from isPathComponent(LayoutComponentTag) that returns true
if the specified tag's name is present in the component path iterator at the same position
where this tag occurs in the render/component tag tree. |
String |
toString()
|
String |
toStringWithoutIndex()
Get a string representation of this instance without including the index. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LayoutRenderTagPath(LayoutRenderTag tag)
Method Detail |
---|
protected List<String> calculateComponentPath(LayoutRenderTag tag)
tag
- The render tag.
protected int incrementIndex(PageContext pageContext)
public List<String> getComponentPath()
LayoutComponentTag
s that are parent tags of the render tag.
public int getIndex()
public boolean isPathComponent(LayoutComponentTag tag) throws StripesJspException
tag
- The tag to check to see if it is part of this path.
StripesJspException
protected boolean isPathComponent(LayoutComponentTag tag, Iterator<String> path)
isPathComponent(LayoutComponentTag)
that returns true
if the specified tag's name is present in the component path iterator at the same position
where this tag occurs in the render/component tag tree. For example, if the path iterator
contains the component names ["foo", "bar"]
then this method will return true if the
tag's name is "bar"
and it is a child of a render tag that is a child of a component
tag whose name is "foo"
.
tag
- The tag to checkpath
- The path to the check the tag againstpublic boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public String toStringWithoutIndex()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |