Package org.apache.tomcat.util.digester
Class CallParamRule
java.lang.Object
org.apache.tomcat.util.digester.Rule
org.apache.tomcat.util.digester.CallParamRule
Rule implementation that saves a parameter for use by a surrounding
 CallMethodRule.
This parameter may be:
- from an attribute of the current element
 See CallParamRule(int paramIndex, String attributeName)
- from current the element body
 See CallParamRule(int paramIndex)
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final StringThe attribute from which to save the parameter valueprotected ArrayStack<String>Stack is used to allow nested body text to be processed.protected final booleanIs the parameter to be set from the stack?protected final intThe zero-relative index of the parameter we are saving.protected final intThe position of the object from the top of the stackFields inherited from class org.apache.tomcat.util.digester.Ruledigester, namespaceURI, sm
- 
Constructor SummaryConstructorsConstructorDescriptionCallParamRule(int paramIndex) Construct a "call parameter" rule that will save the body text of this element as the parameter value.CallParamRule(int paramIndex, String attributeName) Construct a "call parameter" rule that will save the value of the specified attribute as the parameter value.
- 
Method SummaryModifier and TypeMethodDescriptionvoidbegin(String namespace, String name, Attributes attributes) Process the start of this element.voidProcess the body text of this element.voidProcess any body texts now.toString()Render a printable version of this Rule.Methods inherited from class org.apache.tomcat.util.digester.Rulefinish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
- 
Field Details- 
attributeNameThe attribute from which to save the parameter value
- 
paramIndexprotected final int paramIndexThe zero-relative index of the parameter we are saving.
- 
fromStackprotected final boolean fromStackIs the parameter to be set from the stack?
- 
stackIndexprotected final int stackIndexThe position of the object from the top of the stack
- 
bodyTextStackStack is used to allow nested body text to be processed. Lazy creation.
 
- 
- 
Constructor Details- 
CallParamRulepublic CallParamRule(int paramIndex) Construct a "call parameter" rule that will save the body text of this element as the parameter value.- Parameters:
- paramIndex- The zero-relative parameter number
 
- 
CallParamRuleConstruct a "call parameter" rule that will save the value of the specified attribute as the parameter value.- Parameters:
- paramIndex- The zero-relative parameter number
- attributeName- The name of the attribute to save
 
 
- 
- 
Method Details- 
beginProcess the start of this element.- Overrides:
- beginin class- Rule
- Parameters:
- namespace- the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace
- name- the local name if the parser is namespace aware, or just the element name otherwise
- attributes- The attribute list for this element
- Throws:
- Exception- if an error occurs while processing the event
 
- 
bodyProcess the body text of this element.- Overrides:
- bodyin class- Rule
- Parameters:
- namespace- the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace
- name- the local name if the parser is namespace aware, or just the element name otherwise
- bodyText- The body text of this element
- Throws:
- Exception- if an error occurs while processing the event
 
- 
endProcess any body texts now.
- 
toStringRender a printable version of this Rule.
 
-