|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jet.taglib.TagInfo
public final class TagInfo
Define contextual information for a custom tag. The class is immutable. The Tag context is the mechanism by which custom tag code accesses the tag parameters code in a template.
Contextual information includes:
This class is instantiated in the compiled JET2 template. Clients would not normally instantiate instances of this class.
Constructor Summary | |
---|---|
TagInfo(java.lang.String tagName,
int line,
int start,
int end,
java.lang.String[] attrNames,
java.lang.String[] attrValues)
Deprecated. Use TagInfo(String, int, int, String[], String[]) instead. |
|
TagInfo(java.lang.String tagName,
int line,
int col,
java.lang.String[] attrNames,
java.lang.String[] attrValues)
|
Method Summary | |
---|---|
java.lang.String |
getAttribute(java.lang.String name)
Return the value of an attribute. |
java.lang.String[] |
getAttributeNames()
Return an array of attribute names |
int |
getCol()
Return the one-based column number of the start of the tag withing the tag's start line. |
int |
getLine()
Return the one-based line number of the start of the tag. |
java.lang.String |
getTagName()
Return the tag name, as specified in the input, complete with namespace prefix. |
boolean |
hasAttribute(java.lang.String name)
Test whether an attribute value was set. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TagInfo(java.lang.String tagName, int line, int col, java.lang.String[] attrNames, java.lang.String[] attrValues)
public TagInfo(java.lang.String tagName, int line, int start, int end, java.lang.String[] attrNames, java.lang.String[] attrValues)
TagInfo(String, int, int, String[], String[])
instead.
tagName
- line
- start
- end
- attrNames
- attrValues
- Method Detail |
---|
public final int getLine()
public final java.lang.String getAttribute(java.lang.String name)
name
- the attribute name. Cannot be null
.
null
if the attribute was not set on the tag.
java.lang.NullPointerException
- if name
is null
.public final boolean hasAttribute(java.lang.String name)
name
- the attribute name. Cannot be null
.
true
if the attribute was set, false
otherwise.
java.lang.NullPointerException
- if name
is null
.public java.lang.String toString()
toString
in class java.lang.Object
public final java.lang.String getTagName()
public final java.lang.String[] getAttributeNames()
public final int getCol()
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |