Package org.apache.jasper.compiler
Class Node.CustomTag
java.lang.Object
org.apache.jasper.compiler.Node
org.apache.jasper.compiler.Node.CustomTag
- All Implemented Interfaces:
TagConstants
- Enclosing class:
Node
Represents a custom tag
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jasper.compiler.Node
Node.AttributeDirective, Node.AttributeGenerator, Node.ChildInfo, Node.Comment, Node.CustomTag, Node.Declaration, Node.DoBodyAction, Node.ELExpression, Node.Expression, Node.FallBackAction, Node.ForwardAction, Node.GetProperty, Node.IncludeAction, Node.IncludeDirective, Node.InvokeAction, Node.JspAttribute, Node.JspBody, Node.JspElement, Node.JspOutput, Node.JspRoot, Node.JspText, Node.NamedAttribute, Node.Nodes, Node.PageDirective, Node.ParamAction, Node.ParamsAction, Node.PlugIn, Node.Root, Node.ScriptingElement, Node.Scriptlet, Node.SetProperty, Node.TagDirective, Node.TaglibDirective, Node.TemplateText, Node.UninterpretedTag, Node.UseBean, Node.VariableDirective, Node.Visitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Node.Nodes
private Node.Nodes
The following two fields are used for holding the Java scriptlets that the tag plugins may generate.private Node.ChildInfo
private int
private Node.CustomTag
private boolean
private boolean
private boolean
private boolean
private boolean
private Node.JspAttribute[]
private int
private double
private Integer
private String
private javax.servlet.jsp.tagext.TagData
private javax.servlet.jsp.tagext.TagFileInfo
private Class
private String
private javax.servlet.jsp.tagext.TagInfo
private TagPluginContext
private String
private boolean
private javax.servlet.jsp.tagext.VariableInfo[]
Fields inherited from class org.apache.jasper.compiler.Node
attrs, beginJavaLine, body, endJavaLine, innerClassName, localName, namedAttributeNodes, nonTaglibXmlnsAttrs, parent, qName, startMark, taglibAttrs, text
Fields inherited from interface org.apache.jasper.compiler.TagConstants
ATTRIBUTE_ACTION, ATTRIBUTE_DIRECTIVE_ACTION, BODY_ACTION, DECLARATION_ACTION, DIRECTIVE_ACTION, DOBODY_ACTION, ELEMENT_ACTION, EXPRESSION_ACTION, FALLBACK_ACTION, FORWARD_ACTION, GET_PROPERTY_ACTION, INCLUDE_ACTION, INCLUDE_DIRECTIVE_ACTION, INVOKE_ACTION, JSP_ATTRIBUTE_ACTION, JSP_ATTRIBUTE_DIRECTIVE_ACTION, JSP_BODY_ACTION, JSP_DECLARATION_ACTION, JSP_DOBODY_ACTION, JSP_ELEMENT_ACTION, JSP_EXPRESSION_ACTION, JSP_FALLBACK_ACTION, JSP_FORWARD_ACTION, JSP_GET_PROPERTY_ACTION, JSP_INCLUDE_ACTION, JSP_INCLUDE_DIRECTIVE_ACTION, JSP_INVOKE_ACTION, JSP_OUTPUT_ACTION, JSP_PAGE_DIRECTIVE_ACTION, JSP_PARAM_ACTION, JSP_PARAMS_ACTION, JSP_PLUGIN_ACTION, JSP_ROOT_ACTION, JSP_SCRIPTLET_ACTION, JSP_SET_PROPERTY_ACTION, JSP_TAG_DIRECTIVE_ACTION, JSP_TAGLIB_DIRECTIVE_ACTION, JSP_TEXT_ACTION, JSP_TEXT_ACTION_END, JSP_URI, JSP_USE_BEAN_ACTION, JSP_VARIABLE_DIRECTIVE_ACTION, OUTPUT_ACTION, PAGE_DIRECTIVE_ACTION, PARAM_ACTION, PARAMS_ACTION, PLUGIN_ACTION, ROOT_ACTION, SCRIPTLET_ACTION, SET_PROPERTY_ACTION, TAG_DIRECTIVE_ACTION, TAGLIB_DIRECTIVE_ACTION, TEXT_ACTION, URN_JSPTAGDIR, URN_JSPTLD, USE_BEAN_ACTION, VARIABLE_DIRECTIVE_ACTION
-
Constructor Summary
ConstructorsConstructorDescriptionCustomTag
(String jspVersion, String qName, String prefix, String localName, String uri, Attributes attrs, Mark start, Node parent, javax.servlet.jsp.tagext.TagFileInfo tagFileInfo) CustomTag
(String jspVersion, String qName, String prefix, String localName, String uri, Attributes attrs, Mark start, Node parent, javax.servlet.jsp.tagext.TagInfo tagInfo, Class tagHandlerClass) CustomTag
(String jspVersion, String qName, String prefix, String localName, String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent, javax.servlet.jsp.tagext.TagFileInfo tagFileInfo) CustomTag
(String jspVersion, String qName, String prefix, String localName, String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent, javax.servlet.jsp.tagext.TagInfo tagInfo, Class tagHandlerClass) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Selects and invokes a method in the visitor class based on the node type.boolean
Checks to see if the attribute of the given name is of type JspFragment.int
int
getJspId()
double
getScriptingVars
(int scope) javax.servlet.jsp.tagext.TagData
javax.servlet.jsp.tagext.TagFileInfo
javax.servlet.jsp.tagext.TagInfo
javax.servlet.jsp.tagext.TagVariableInfo[]
getTempScriptingVar
(String scriptingVar) getURI()
javax.servlet.jsp.tagext.VariableInfo[]
boolean
Returns true if this custom action has an empty body, and false otherwise.boolean
boolean
boolean
boolean
boolean
boolean
private int
void
setAtETag
(Node.Nodes eTag) void
setAtSTag
(Node.Nodes sTag) void
void
setJspAttributes
(Node.JspAttribute[] jspAttrs) void
setJspId
(int jspId) void
setNumCount
(Integer count) void
setScriptingVars
(ArrayList<Object> vec, int scope) void
setTagData
(javax.servlet.jsp.tagext.TagData tagData) void
void
void
setTagPluginContext
(TagPluginContext tagPluginContext) void
setTempScriptingVar
(String scriptingVar, String tempScriptingVar) void
setUseTagPlugin
(boolean use) boolean
Methods inherited from class org.apache.jasper.compiler.Node
getAttributes, getAttributeValue, getBeginJavaLine, getBody, getEndJavaLine, getInnerClassName, getLocalName, getNamedAttributeNode, getNamedAttributeNodes, getNonTaglibXmlnsAttributes, getParent, getQName, getRoot, getStart, getTaglibAttributes, getText, getTextAttribute, isDummy, setAttributes, setBeginJavaLine, setBody, setEndJavaLine, setInnerClassName
-
Field Details
-
jspVersion
private double jspVersion -
uri
-
prefix
-
jspAttrs
-
tagData
private javax.servlet.jsp.tagext.TagData tagData -
tagHandlerPoolName
-
tagInfo
private javax.servlet.jsp.tagext.TagInfo tagInfo -
tagFileInfo
private javax.servlet.jsp.tagext.TagFileInfo tagFileInfo -
tagHandlerClass
-
varInfos
private javax.servlet.jsp.tagext.VariableInfo[] varInfos -
customNestingLevel
private int customNestingLevel -
childInfo
-
implementsIterationTag
private boolean implementsIterationTag -
implementsBodyTag
private boolean implementsBodyTag -
implementsTryCatchFinally
private boolean implementsTryCatchFinally -
implementsSimpleTag
private boolean implementsSimpleTag -
implementsDynamicAttributes
private boolean implementsDynamicAttributes -
atBeginScriptingVars
-
atEndScriptingVars
-
nestedScriptingVars
-
customTagParent
-
numCount
-
useTagPlugin
private boolean useTagPlugin -
tagPluginContext
-
jspId
private int jspId -
tempVars
-
atSTag
The following two fields are used for holding the Java scriptlets that the tag plugins may generate. Meaningful only if useTagPlugin is true; Could move them into TagPluginContextImpl, but we'll need to cast tagPluginContext to TagPluginContextImpl all the time... -
atETag
-
-
Constructor Details
-
CustomTag
-
CustomTag
public CustomTag(String jspVersion, String qName, String prefix, String localName, String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent, javax.servlet.jsp.tagext.TagInfo tagInfo, Class tagHandlerClass) -
CustomTag
-
CustomTag
public CustomTag(String jspVersion, String qName, String prefix, String localName, String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent, javax.servlet.jsp.tagext.TagFileInfo tagFileInfo)
-
-
Method Details
-
accept
Description copied from class:Node
Selects and invokes a method in the visitor class based on the node type. This is abstract and should be overrode by the extending classes.- Specified by:
accept
in classNode
- Parameters:
v
- The visitor class- Throws:
JasperException
-
getJspVersion
public double getJspVersion()- Returns:
- The jspVersion of the tag
-
getURI
- Returns:
- The URI namespace that this custom action belongs to
-
getPrefix
- Returns:
- The tag prefix
-
setJspAttributes
-
getJspAttributes
-
getChildInfo
-
setTagData
public void setTagData(javax.servlet.jsp.tagext.TagData tagData) -
getTagData
public javax.servlet.jsp.tagext.TagData getTagData() -
setTagHandlerPoolName
-
getTagHandlerPoolName
-
getTagInfo
public javax.servlet.jsp.tagext.TagInfo getTagInfo() -
getTagFileInfo
public javax.servlet.jsp.tagext.TagFileInfo getTagFileInfo() -
isTagFile
public boolean isTagFile() -
getTagHandlerClass
-
setTagHandlerClass
-
implementsIterationTag
public boolean implementsIterationTag() -
implementsBodyTag
public boolean implementsBodyTag() -
implementsTryCatchFinally
public boolean implementsTryCatchFinally() -
implementsSimpleTag
public boolean implementsSimpleTag() -
implementsDynamicAttributes
public boolean implementsDynamicAttributes() -
getTagVariableInfos
public javax.servlet.jsp.tagext.TagVariableInfo[] getTagVariableInfos() -
getVariableInfos
public javax.servlet.jsp.tagext.VariableInfo[] getVariableInfos() -
setCustomTagParent
-
getCustomTagParent
-
setNumCount
-
getNumCount
-
setScriptingVars
-
getScriptingVars
-
getCustomNestingLevel
public int getCustomNestingLevel() -
checkIfAttributeIsJspFragment
Checks to see if the attribute of the given name is of type JspFragment. -
setUseTagPlugin
public void setUseTagPlugin(boolean use) -
useTagPlugin
public boolean useTagPlugin() -
setTagPluginContext
-
getTagPluginContext
-
setAtSTag
-
getAtSTag
-
setAtETag
-
getAtETag
-
setJspId
public void setJspId(int jspId) -
getJspId
public int getJspId() -
makeCustomNestingLevel
private int makeCustomNestingLevel() -
hasEmptyBody
public boolean hasEmptyBody()Returns true if this custom action has an empty body, and false otherwise. A custom action is considered to have an empty body if the following holds true: - getBody() returns null, or - all immediate children are jsp:attribute actions, or - the action's jsp:body is empty. -
getTempScriptingVar
-
setTempScriptingVar
-