public abstract class GenericTag extends JspContainerNode
| Modifier and Type | Field and Description |
|---|---|
protected TagInstance |
_tag |
protected java.lang.Class<?> |
_tagClass |
protected TagInfo |
_tagInfo |
protected VariableInfo[] |
_varInfo |
_attributeNames, _attributeValues, _children, _hasJspAttribute_endAttributeLine, _endLine, _filename, _gen, _name, _ns, _parent, _parseState, _sourcePath, _startLine| Constructor and Description |
|---|
GenericTag() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected boolean |
isReuse()
Returns true if the tag instance can be reused
|
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.
|
addAttribute, addAttribute, addAttributeChild, addChildEnd, addText, findScriptingNode, generateChildren, generateChildrenEmpty, generateClassEpilogueChildren, generateDeclarationChildren, generatePrologueChildren, generateStatic, generateTagReleaseChildren, generateTagStateChildren, getAttribute, getChildren, getStaticText, hasChildren, hasCustomTag, hasScriptingElement, hasTag, isChildrenStatic, isEmpty, isSingleExpression, isWhitespace, printXmlChildrenaddNamespace, addNamespaceRec, attributeToBoolean, classToString, convertParameterValue, endAttributes, error, error, error, escapeJavaString, generateDeclaration, generateELValue, generateEmpty, generateEndLocation, generateFragment, generateIncludeUrl, generateObject, generateParentTag, generateStartLocation, generateTagRelease, generateTagState, getEndAttributeLine, getEndLine, getFilename, getGenerator, getNamespaceContext, getNamespacePrefix, getParent, getParentTagName, getParentTagNode, getQName, getRuntimeAttribute, getSegment, getStartLine, getStaticText, getTagName, hasDeferredAttribute, hasDeferredAttribute, hasELAttribute, hasELAttribute, hasNamespace, hasNamespace, hasRuntimeAttribute, hasScripting, hasScripting, invokeFragment, isInFragment, isSimpleTag, isStatic, loadClass, printJspId, printXmlAttribute, printXmlOpen, printXmlText, setEndAttributeLocation, setEndLocation, setGenerator, setNamespace, setParent, setParseState, setQName, setStartLocation, toELObject, toString, xmlAttrText, xmlTextprotected TagInstance _tag
protected TagInfo _tagInfo
protected java.lang.Class<?> _tagClass
protected VariableInfo[] _varInfo
public void setTagInfo(TagInfo tagInfo)
public TagInfo getTagInfo()
public boolean isJsp21()
JspNodepublic boolean isPre21Taglib()
JspNodeisPre21Taglib in class JspNodepublic TagInstance getTag()
JspNodepublic java.lang.String getCustomTagName()
getCustomTagName in class JspNodepublic boolean isSimple()
public void setTagClass(java.lang.Class cl)
public VariableInfo[] getVarInfo()
public java.lang.String getBodyContent()
getBodyContent in class JspNodepublic void addChild(JspNode node) throws JspParseException
addChild in class JspContainerNodeJspParseExceptionpublic 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()
public java.lang.String getJsfBodyVar()
getJsfBodyVar in class JspNodepublic void generateClassEpilogue(JspJavaWriter out) throws java.io.IOException
JspNodegenerateClassEpilogue in class JspNodeout - the output writer for the generated java.java.io.IOExceptionpublic void generatePrologue(JspJavaWriter out) throws java.lang.Exception
generatePrologue in class JspNodejava.lang.Exceptionpublic void generatePrologueDeclare(JspJavaWriter out) throws java.lang.Exception
JspNodegeneratePrologueDeclare in class JspNodejava.lang.Exceptionpublic void printXml(WriteStream os) throws java.io.IOException
public abstract void generate(JspJavaWriter out) throws java.lang.Exception
protected void fillAttributes(JspJavaWriter out, java.lang.String name) throws java.lang.Exception
java.lang.Exceptionprotected boolean hasVarDeclaration(int scope)
throws java.lang.Exception
java.lang.Exceptionprotected void printVarDeclaration(JspJavaWriter out, int scope) throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to printjava.lang.Exceptionprotected void printVarDeclare(JspJavaWriter out, int scope) throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to printjava.lang.Exceptionprotected void printVarAssign(JspJavaWriter out, int scope) throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to printjava.lang.Exceptionprotected VariableInfo[] fillVariableInfo(TagVariableInfo[] tagVars, TagData tagData) throws JspParseException
tagVars - the implicit tag variables for the tagtagData - the parsed tag attributesJspParseExceptionprotected void printVarDeclare(JspJavaWriter out, int scope, VariableInfo var) throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to printjava.lang.Exceptionprotected void printVarAssign(JspJavaWriter out, int scope, VariableInfo var) throws java.lang.Exception
out - the stream to the java code.scope - the variable scope to printjava.lang.Exceptionprotected boolean isReuse()
protected boolean isDeclared()
protected boolean hasScriptlet(JspNode node)
protected void validateClass(java.lang.String className,
java.lang.String varName)
throws JspParseException
JspParseException