|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.jsp.java.JspNode
com.caucho.jsp.java.JspContainerNode
com.caucho.jsp.java.GenericTag
public abstract class GenericTag
Represents a custom tag.
| Field Summary | |
|---|---|
protected TagInstance |
_tag
|
protected java.lang.Class<?> |
_tagClass
|
protected TagInfo |
_tagInfo
|
protected VariableInfo[] |
_varInfo
|
| Fields inherited from class com.caucho.jsp.java.JspContainerNode |
|---|
_attributeNames, _attributeValues, _children, _hasJspAttribute |
| Fields inherited from class com.caucho.jsp.java.JspNode |
|---|
_endAttributeLine, _endLine, _filename, _gen, _name, _ns, _parent, _parseState, _sourcePath, _startLine |
| Constructor Summary | |
|---|---|
GenericTag()
|
|
| Method Summary | |
|---|---|
void |
addChild(JspNode node)
Adds a child node. |
protected void |
addTagDepend()
|
void |
endElement()
Completes the element |
protected void |
fillAttributes(JspJavaWriter out,
java.lang.String name)
|
protected VariableInfo[] |
fillVariableInfo(TagVariableInfo[] tagVars,
TagData tagData)
Returns the VariableInfo corresponding the to tag vars and the tag data. |
abstract void |
generate(JspJavaWriter out)
Generates the code for a custom tag. |
void |
generateClassEpilogue(JspJavaWriter out)
Generates the code for the tag |
void |
generatePrologue(JspJavaWriter out)
Generates code before the actual JSP. |
void |
generatePrologueDeclare(JspJavaWriter out)
generates prologue data. |
java.lang.String |
getBodyContent()
Returns the body content. |
java.lang.String |
getCustomTagName()
Returns the tag name for the current tag. |
java.lang.String |
getJsfBodyVar()
Returns the variable containing the jsf body |
java.lang.String |
getJsfVar()
Returns the variable containing the jsf component |
TagInstance |
getTag()
Returns the TagInstance of the enclosing parent. |
TagInfo |
getTagInfo()
|
VariableInfo[] |
getVarInfo()
|
boolean |
hasScripting()
True if the node has scripting |
protected boolean |
hasScriptlet(JspNode node)
Returns true if the node or one of its children is a scriptlet |
protected boolean |
hasVarDeclaration(int scope)
Returns true if there is a tag variable declaration matching the scope. |
protected boolean |
isDeclared()
Returns true if the tag instance has been declared |
boolean |
isDeclaringInstance()
Returns true if this instance declares the tag. |
boolean |
isJsfParentRequired()
True if the jsf-parent setting is required. |
boolean |
isJsp21()
True for 2.1 or later taglib |
boolean |
isJstl()
True if this is a jstl node. |
boolean |
isPre21Taglib()
Return true for pre-21 taglib. |
boolean |
isSimple()
Returns true if the tag is a simple tag. |
protected void |
printVarAssign(JspJavaWriter out,
int scope)
Prints a tag variable declaration. |
protected void |
printVarAssign(JspJavaWriter out,
int scope,
VariableInfo var)
Prints a tag variable declaration. |
protected void |
printVarDeclaration(JspJavaWriter out,
int scope)
Prints a tag variable declaration. |
protected void |
printVarDeclare(JspJavaWriter out,
int scope)
Prints a tag variable declaration. |
protected void |
printVarDeclare(JspJavaWriter out,
int scope,
VariableInfo var)
Prints a tag variable declaration. |
void |
printXml(WriteStream os)
Generates the XML text representation for the tag validation. |
void |
setTagClass(java.lang.Class cl)
|
void |
setTagInfo(TagInfo tagInfo)
|
protected void |
validateClass(java.lang.String className,
java.lang.String varName)
Checks that the given class is a valid variable class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected TagInstance _tag
protected TagInfo _tagInfo
protected java.lang.Class<?> _tagClass
protected VariableInfo[] _varInfo
| Constructor Detail |
|---|
public GenericTag()
| Method Detail |
|---|
public void setTagInfo(TagInfo tagInfo)
public TagInfo getTagInfo()
public boolean isJsp21()
JspNode
isJsp21 in class JspNodepublic boolean isPre21Taglib()
JspNode
isPre21Taglib in class JspNodepublic TagInstance getTag()
JspNode
getTag in class JspNodepublic java.lang.String getCustomTagName()
getCustomTagName in class JspNodepublic boolean isSimple()
public boolean isJstl()
isJstl in class JspNodepublic void setTagClass(java.lang.Class cl)
public VariableInfo[] getVarInfo()
public java.lang.String getBodyContent()
getBodyContent in class JspNode
public void addChild(JspNode node)
throws JspParseException
addChild in class JspContainerNodeJspParseException
public void endElement()
throws java.lang.Exception
endElement in class JspNodejava.lang.Exceptionprotected void addTagDepend()
public boolean hasScripting()
hasScripting in class JspContainerNodepublic boolean isJsfParentRequired()
isJsfParentRequired in class JspContainerNodepublic boolean isDeclaringInstance()
public java.lang.String getJsfVar()
getJsfVar in class JspNodepublic java.lang.String getJsfBodyVar()
getJsfBodyVar in class JspNode
public void generateClassEpilogue(JspJavaWriter out)
throws java.io.IOException
JspNode
generateClassEpilogue in class JspNodeout - the output writer for the generated java.
java.io.IOException
public void generatePrologue(JspJavaWriter out)
throws java.lang.Exception
generatePrologue in class JspNodejava.lang.Exception
public void generatePrologueDeclare(JspJavaWriter out)
throws java.lang.Exception
JspNode
generatePrologueDeclare in class JspNodejava.lang.Exception
public void printXml(WriteStream os)
throws java.io.IOException
printXml in class JspNodeos - write stream to the generated XML.
java.io.IOException
public abstract void generate(JspJavaWriter out)
throws java.lang.Exception
generate in class JspNodeout - the output writer for the generated java.
java.lang.Exception
protected void fillAttributes(JspJavaWriter out,
java.lang.String name)
throws java.lang.Exception
java.lang.Exception
protected boolean hasVarDeclaration(int scope)
throws java.lang.Exception
java.lang.Exception
protected void printVarDeclaration(JspJavaWriter out,
int scope)
throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to print
java.lang.Exception
protected void printVarDeclare(JspJavaWriter out,
int scope)
throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to print
java.lang.Exception
protected void printVarAssign(JspJavaWriter out,
int scope)
throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to print
java.lang.Exception
protected VariableInfo[] fillVariableInfo(TagVariableInfo[] tagVars,
TagData tagData)
throws JspParseException
tagVars - the implicit tag variables for the tagtagData - the parsed tag attributes
JspParseException
protected void printVarDeclare(JspJavaWriter out,
int scope,
VariableInfo var)
throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to print
java.lang.Exception
protected void printVarAssign(JspJavaWriter out,
int scope,
VariableInfo var)
throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to print
java.lang.Exceptionprotected boolean isDeclared()
protected boolean hasScriptlet(JspNode node)
protected void validateClass(java.lang.String className,
java.lang.String varName)
throws JspParseException
JspParseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||