# Class Node.CustomTag

java.lang.Object
org.apache.jasper.compiler.Node
org.apache.jasper.compiler.Node.ChildInfoBase
org.apache.jasper.compiler.Node.CustomTag

All Implemented Interfaces:
  `TagConstants`

Enclosing class:
  `Node`

public static class Node.CustomTag extends Node.ChildInfoBase
Represents a custom tag

## Nested Class Summary

### Nested classes/interfaces inherited from class Node

`Node.AttributeDirective, Node.AttributeGenerator, Node.ChildInfo, Node.ChildInfoBase, 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

### Fields inherited from class Node

`attrs, beginJavaLine, body, endJavaLine, innerClassName, localName, namedAttributeNodes, nonTaglibXmlnsAttrs, parent, qName, startMark, taglibAttrs, text`

### Fields inherited from interface 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`

## Method Summary

Modifier and Type
Method
Description
`void`
`accept(Node.Visitor v)`
`boolean`
`checkIfAttributeIsJspFragment(String name)`
Checks to see if the attribute of the given name is of type JspFragment.
`Node.Nodes`
`getAtETag()`
Returns the nodes generated at the end tag by a tag plugin.
`Node.Nodes`
`getAtSTag()`
Returns the nodes generated at the start tag by a tag plugin.
`int`
`getCustomNestingLevel()`
Gets this custom tag's custom nesting level, which is given as the number of times this custom tag is nested inside itself.
`Node.CustomTag`
`getCustomTagParent()`
Returns the parent custom tag.
`Node.JspAttribute[]`
`getJspAttributes()`
Returns the JSP attributes for this custom tag.
`Integer`
`getNumCount()`
Returns the number count for this custom tag.
`String`
`getPrefix()`
Returns the tag prefix.
`List<Object>`
`getScriptingVars(int scope)`
Gets the scripting variables for the given scope that need to be declared.
`TagData`
`getTagData()`
Returns the tag data for this custom tag.
`TagFileInfo`
`getTagFileInfo()`
Returns the tag file information for this custom tag.
`Class<?>`
`getTagHandlerClass()`
Returns the tag handler class.
`String`
`getTagHandlerPoolName()`
Returns the tag handler pool name.
`TagInfo`
`getTagInfo()`
Returns the tag information for this custom tag.
`TagPluginContext`
`getTagPluginContext()`
Returns the tag plugin context for this custom tag.
`TagVariableInfo[]`
`getTagVariableInfos()`
Returns the tag variable information from the tag info.
`String`
`getURI()`
Returns the URI namespace that this custom action belongs to.
`VariableInfo[]`
`getVariableInfos()`
Returns the variable information computed from the tag data.
`boolean`
`hasEmptyBody()`
A custom action is considered to have an empty body if any of the following hold true: getBody() returns null all immediate children are jsp:attribute actions the action's jsp:body is empty
`boolean`
`implementsBodyTag()`
Returns whether the tag handler implements BodyTag.
`boolean`
`implementsDynamicAttributes()`
Returns whether the tag handler implements DynamicAttributes.
`boolean`
`implementsIterationTag()`
Returns whether the tag handler implements IterationTag.
`boolean`
`implementsJspIdConsumer()`
Returns whether the tag handler implements JspIdConsumer.
`boolean`
`implementsSimpleTag()`
Returns whether the tag handler implements SimpleTag.
`boolean`
`implementsTryCatchFinally()`
Returns whether the tag handler implements TryCatchFinally.
`boolean`
`isTagFile()`
Returns whether this custom action is supported by a tag file.
`void`
`setAtETag(Node.Nodes eTag)`
Sets the nodes generated at the end tag by a tag plugin.
`void`
`setAtSTag(Node.Nodes sTag)`
Sets the nodes generated at the start tag by a tag plugin.
`void`
`setCustomTagParent(Node.CustomTag n)`
Sets the parent custom tag.
`void`
`setJspAttributes(Node.JspAttribute[] jspAttrs)`
Sets the JSP attributes for this custom tag.
`void`
`setNumCount(Integer count)`
Sets the number count for this custom tag.
`void`
`setScriptingVars(List<Object> vec, int scope)`
Sets the scripting variables for the given scope.
`void`
`setTagData(TagData tagData)`
Sets the tag data for this custom tag.
`void`
`setTagHandlerClass(Class<?> hc)`
Sets the tag handler class.
`void`
`setTagHandlerPoolName(String s)`
Sets the tag handler pool name.
`void`
`setTagPluginContext(TagPluginContext tagPluginContext)`
Sets the tag plugin context for this custom tag.
`void`
`setUseTagPlugin(boolean use)`
Sets whether to use a tag plugin for this custom tag.
`boolean`
`useTagPlugin()`
Returns whether a tag plugin is used for this custom tag.

### Methods inherited from class Node.ChildInfoBase

`getChildInfo`

### Methods inherited from class Node

`getAttributes, getAttributeValue, getBeginJavaLine, getBody, getEndJavaLine, getInnerClassName, getLocalName, getNamedAttributeNode, getNamedAttributeNodes, getNonTaglibXmlnsAttributes, getParent, getQName, getRoot, getStart, getTaglibAttributes, getText, getTextAttribute, setAttributes, setBeginJavaLine, setBody, setEndJavaLine, setInnerClassName`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### accept

public void accept(Node.Visitor v) throws JasperException

Throws:
  `JasperException`

### getURI

public String getURI()
Returns the URI namespace that this custom action belongs to.

Returns:
  The URI namespace

### getPrefix

public String getPrefix()
Returns the tag prefix.

Returns:
  The tag prefix

### setJspAttributes

public void setJspAttributes(Node.JspAttribute[] jspAttrs)
Sets the JSP attributes for this custom tag.

Parameters:
  `jspAttrs` - The JSP attributes

### getJspAttributes

public Node.JspAttribute[] getJspAttributes()
Returns the JSP attributes for this custom tag.

Returns:
  The JSP attributes

### setTagData

public void setTagData(TagData tagData)
Sets the tag data for this custom tag.

Parameters:
  `tagData` - The tag data

### getTagData

public TagData getTagData()
Returns the tag data for this custom tag.

Returns:
  The tag data

### setTagHandlerPoolName

public void setTagHandlerPoolName(String s)
Sets the tag handler pool name.

Parameters:
  `s` - The tag handler pool name

### getTagHandlerPoolName

public String getTagHandlerPoolName()
Returns the tag handler pool name.

Returns:
  The tag handler pool name

### getTagInfo

public TagInfo getTagInfo()
Returns the tag information for this custom tag.

Returns:
  The tag info

### getTagFileInfo

public TagFileInfo getTagFileInfo()
Returns the tag file information for this custom tag.

Returns:
  The tag file info, or `null` if not a tag file

### isTagFile

public boolean isTagFile()
Returns whether this custom action is supported by a tag file.

Returns:
  `true` if this custom action is supported by a tag file, `false` otherwise

### getTagHandlerClass

public Class<?> getTagHandlerClass()
Returns the tag handler class.

Returns:
  The tag handler class

### setTagHandlerClass

public void setTagHandlerClass(Class<?> hc)
Sets the tag handler class.

Parameters:
  `hc` - The tag handler class

### implementsIterationTag

public boolean implementsIterationTag()
Returns whether the tag handler implements IterationTag.

Returns:
  `true` if the tag handler implements IterationTag

### implementsBodyTag

public boolean implementsBodyTag()
Returns whether the tag handler implements BodyTag.

Returns:
  `true` if the tag handler implements BodyTag

### implementsTryCatchFinally

public boolean implementsTryCatchFinally()
Returns whether the tag handler implements TryCatchFinally.

Returns:
  `true` if the tag handler implements TryCatchFinally

### implementsJspIdConsumer

public boolean implementsJspIdConsumer()
Returns whether the tag handler implements JspIdConsumer.

Returns:
  `true` if the tag handler implements JspIdConsumer

### implementsSimpleTag

public boolean implementsSimpleTag()
Returns whether the tag handler implements SimpleTag.

Returns:
  `true` if the tag handler implements SimpleTag

### implementsDynamicAttributes

public boolean implementsDynamicAttributes()
Returns whether the tag handler implements DynamicAttributes.

Returns:
  `true` if the tag handler implements DynamicAttributes

### getTagVariableInfos

public TagVariableInfo[] getTagVariableInfos()
Returns the tag variable information from the tag info.

Returns:
  The tag variable info array

### getVariableInfos

public VariableInfo[] getVariableInfos()
Returns the variable information computed from the tag data.

Returns:
  The variable info array

### setCustomTagParent

public void setCustomTagParent(Node.CustomTag n)
Sets the parent custom tag.

Parameters:
  `n` - The parent custom tag

### getCustomTagParent

public Node.CustomTag getCustomTagParent()
Returns the parent custom tag.

Returns:
  The parent custom tag

### setNumCount

public void setNumCount(Integer count)
Sets the number count for this custom tag.

Parameters:
  `count` - The number count

### getNumCount

public Integer getNumCount()
Returns the number count for this custom tag.

Returns:
  The number count

### setScriptingVars

public void setScriptingVars(List<Object> vec, int scope)
Sets the scripting variables for the given scope.

Parameters:
  `vec` - The list of scripting variables
  `scope` - The variable scope (AT_BEGIN, AT_END, or NESTED)
Throws:
  `IllegalArgumentException` - if the scope is invalid

### getScriptingVars

public List<Object> getScriptingVars(int scope)
Gets the scripting variables for the given scope that need to be declared.

Parameters:
  `scope` - The variable scope (AT_BEGIN, AT_END, or NESTED)
Returns:
  The list of scripting variables for the given scope
Throws:
  `IllegalArgumentException` - if the scope is invalid

### getCustomNestingLevel

public int getCustomNestingLevel()
Gets this custom tag's custom nesting level, which is given as the number of times this custom tag is nested inside itself.

Returns:
  The custom nesting level

### checkIfAttributeIsJspFragment

public boolean checkIfAttributeIsJspFragment(String name)
Checks to see if the attribute of the given name is of type JspFragment.

Parameters:
  `name` - The attribute to check
Returns:
  `true` if it is a JspFragment

### setUseTagPlugin

public void setUseTagPlugin(boolean use)
Sets whether to use a tag plugin for this custom tag.

Parameters:
  `use` - `true` to use a tag plugin

### useTagPlugin

public boolean useTagPlugin()
Returns whether a tag plugin is used for this custom tag.

Returns:
  `true` if a tag plugin is used

### setTagPluginContext

public void setTagPluginContext(TagPluginContext tagPluginContext)
Sets the tag plugin context for this custom tag.

Parameters:
  `tagPluginContext` - The tag plugin context

### getTagPluginContext

public TagPluginContext getTagPluginContext()
Returns the tag plugin context for this custom tag.

Returns:
  The tag plugin context

### setAtSTag

public void setAtSTag(Node.Nodes sTag)
Sets the nodes generated at the start tag by a tag plugin.

Parameters:
  `sTag` - The start tag nodes

### getAtSTag

public Node.Nodes getAtSTag()
Returns the nodes generated at the start tag by a tag plugin.

Returns:
  The start tag nodes

### setAtETag

public void setAtETag(Node.Nodes eTag)
Sets the nodes generated at the end tag by a tag plugin.

Parameters:
  `eTag` - The end tag nodes

### getAtETag

public Node.Nodes getAtETag()
Returns the nodes generated at the end tag by a tag plugin.

Returns:
  The end tag nodes

### hasEmptyBody

public boolean hasEmptyBody()
A custom action is considered to have an empty body if any of the following hold true:

- getBody() returns null
- all immediate children are jsp:attribute actions
- the action's jsp:body is empty

Returns:
  `true` if this custom action has an empty body, and `false` otherwise.