public class JavaTagGenerator extends JavaJspGenerator
JspParser parses the JSP file into an XML-DOM tree. JspGenerator generates code from that tree.
_cacheDepends, _className, _config, _declarations, _depends, _fullClassName, _ideHack, _isCacheable, _isUncacheable, _parseState, _pkg, _rootNode, _strings, _tagId, _tagManager, _topTag
_jspBuilder, _jspCompiler, _jspCompilerInstance, _jspParser, _lineMap
Constructor and Description |
---|
JavaTagGenerator(ParseTagManager tagManager) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(TldAttribute attribute)
Adds an attribute.
|
void |
addVariable(TldVariable var)
Adds a variable.
|
TldAttribute |
findAttribute(java.lang.String name)
Finds an attribute.
|
TldVariable |
findNameFromAttributeVariable(java.lang.String name)
Finds a variable.
|
TldVariable |
findVariable(java.lang.String name)
Finds a variable.
|
protected void |
generate(JspJavaWriter out)
Generates the Java code.
|
protected void |
generateAttributes(JspJavaWriter out)
Generates the attribute definitions.
|
protected void |
generateClassHeader(JspJavaWriter out)
Generates the class header.
|
protected void |
generateDoTag(JspJavaWriter out,
JspNode node)
Prints the _jspService header
|
protected void |
generateDoTagImpl(JspJavaWriter out,
JspNode node)
Prints the _jspService header
|
protected void |
generateDynamicAttributes(JspJavaWriter out)
Generates the attribute definitions.
|
protected void |
generatePrologue(JspJavaWriter out)
Generates prologue stuff
|
protected void |
generateTagAttributes(JspJavaWriter out)
Generates the attribute definitions.
|
protected void |
generateTagInfo(JspJavaWriter out)
Generates the attribute definitions.
|
TagInfo |
generateTagInfo(java.lang.String className,
TagLibraryInfo taglib)
Returns the tags taginfo.
|
protected void |
generateTagLibrary(JspJavaWriter out)
Generates the attribute definitions.
|
protected void |
generateTagVariablesAtEnd(JspJavaWriter out)
Generates the variable setting.
|
java.util.ArrayList<TldAttribute> |
getAttributes()
Returns the attributes.
|
java.lang.String |
getBodyContent()
Gets the body content.
|
java.lang.String |
getDescription() |
java.lang.String |
getDisplayName() |
java.lang.String |
getDynamicAttributes()
Gets the body content.
|
java.lang.String |
getExample() |
java.lang.String |
getLargeIcon() |
java.lang.String |
getSmallIcon() |
java.util.ArrayList<TldVariable> |
getVariables()
Returns the variables.
|
void |
init() |
protected boolean |
isStaticDoTag() |
boolean |
isTag() |
void |
setBodyContent(java.lang.String bodyContent)
Sets the body content.
|
void |
setDescription(java.lang.String description)
Returns true if the XML declaration should be ignored.
|
void |
setDisplayName(java.lang.String displayName) |
void |
setDynamicAttributes(java.lang.String dynamicAttributes)
Sets the name of the dynamic attributes map
|
void |
setExample(java.lang.String example) |
void |
setLargeIcon(java.lang.String largeIcon) |
void |
setSmallIcon(java.lang.String smallIcon) |
addBeanClass, addDeclaration, addDeclared, addDepend, addDepend, addDepend, addExpr, addFragment, addImport, addMethodExpr, addOptionalTaglib, addString, addTaglib, addTaglib, addTaglib, addTaglibDir, addValueExpr, addXPathExpr, addXPathExpr, error, error, fillSingleTaglibImports, generate, generateClassFooter, generateJspId, generatePageFooter, generatePageHeader, generateStatic, genExpr, getBeanClass, getClass, getConfig, getDependList, getELContext, getFragment, getPageData, getParseState, getRecycleTags, getRootTag, getSourceLines, getTag, getTagClass, getTagManager, hasScripting, init, isDeclared, isJsfPrologueInit, isPre21, isPrototype, isStatic, isStaticEncoding, setJsfPrologueInit, setPageConfig, setParseState, setRootNode, setTagManager, uniqueId, validate
getJspBuilder, getJspCompiler, getJspCompilerInstance, getJspParser, getLineMap, isELIgnore, isTagDependent, setJspBuilder, setJspCompiler, setJspCompilerInstance, setJspParser
public JavaTagGenerator(ParseTagManager tagManager)
public void init()
init
in class JavaJspGenerator
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setDisplayName(java.lang.String displayName)
public java.lang.String getDisplayName()
public void setSmallIcon(java.lang.String smallIcon)
public java.lang.String getSmallIcon()
public void setLargeIcon(java.lang.String largeIcon)
public java.lang.String getLargeIcon()
public void setExample(java.lang.String example)
public java.lang.String getExample()
public void setBodyContent(java.lang.String bodyContent)
public java.lang.String getBodyContent()
public void setDynamicAttributes(java.lang.String dynamicAttributes)
public java.lang.String getDynamicAttributes()
public void addAttribute(TldAttribute attribute)
public java.util.ArrayList<TldAttribute> getAttributes()
public TldAttribute findAttribute(java.lang.String name)
public void addVariable(TldVariable var)
public TldVariable findVariable(java.lang.String name)
public TldVariable findNameFromAttributeVariable(java.lang.String name)
public java.util.ArrayList<TldVariable> getVariables()
public boolean isTag()
isTag
in class JavaJspGenerator
protected void generate(JspJavaWriter out) throws java.lang.Exception
generate
in class JavaJspGenerator
java.lang.Exception
protected boolean isStaticDoTag()
protected void generateClassHeader(JspJavaWriter out) throws java.io.IOException, JspParseException
generateClassHeader
in class JavaJspGenerator
doc
- the XML document representing the JSP page.java.io.IOException
JspParseException
protected void generateAttributes(JspJavaWriter out) throws java.io.IOException, JspParseException
out
- the writer to the .java sourcejava.io.IOException
JspParseException
protected void generateDynamicAttributes(JspJavaWriter out) throws java.io.IOException, JspParseException
out
- the writer to the .java sourcejava.io.IOException
JspParseException
protected void generateDoTag(JspJavaWriter out, JspNode node) throws java.lang.Exception
java.lang.Exception
protected void generateTagAttributes(JspJavaWriter out) throws java.io.IOException, JspParseException
out
- the writer to the .java sourcejava.io.IOException
JspParseException
protected void generateDoTagImpl(JspJavaWriter out, JspNode node) throws java.lang.Exception
java.lang.Exception
protected void generatePrologue(JspJavaWriter out) throws java.lang.Exception
out
- the writer to the .java sourcejava.lang.Exception
protected void generateTagVariablesAtEnd(JspJavaWriter out) throws java.io.IOException, JspParseException
out
- the writer to the .java sourcejava.io.IOException
JspParseException
public TagInfo generateTagInfo(java.lang.String className, TagLibraryInfo taglib)
JspGenerator
generateTagInfo
in class JspGenerator
protected void generateTagInfo(JspJavaWriter out) throws java.io.IOException, JspParseException
out
- the writer to the .java sourcejava.io.IOException
JspParseException
protected void generateTagLibrary(JspJavaWriter out) throws java.io.IOException, JspParseException
out
- the writer to the .java sourcejava.io.IOException
JspParseException