public class CallParamRule extends Rule
Rule implementation that saves a parameter for use by a surrounding
CallMethodRule
.
This parameter may be:
CallParamRule(int paramIndex, String attributeName)
CallParamRule(int paramIndex)
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.String |
attributeName |
The attribute from which to save the parameter value
|
protected ArrayStack<java.lang.String> |
bodyTextStack |
Stack is used to allow nested body text to be processed.
|
protected boolean |
fromStack |
Is the parameter to be set from the stack?
|
protected int |
paramIndex |
The zero-relative index of the parameter we are saving.
|
protected int |
stackIndex |
The position of the object from the top of the stack
|
digester, namespaceURI
Constructor | Description |
---|---|
CallParamRule(int paramIndex) |
Construct a "call parameter" rule that will save the body text of this
element as the parameter value.
|
CallParamRule(int paramIndex,
java.lang.String attributeName) |
Construct a "call parameter" rule that will save the value of the
specified attribute as the parameter value.
|
Modifier and Type | Method | Description |
---|---|---|
void |
begin(java.lang.String namespace,
java.lang.String name,
org.xml.sax.Attributes attributes) |
Process the start of this element.
|
void |
body(java.lang.String namespace,
java.lang.String name,
java.lang.String bodyText) |
Process the body text of this element.
|
void |
end(java.lang.String namespace,
java.lang.String name) |
Process any body texts now.
|
java.lang.String |
toString() |
Render a printable version of this Rule.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
protected final java.lang.String attributeName
protected final int paramIndex
protected final boolean fromStack
protected final int stackIndex
protected ArrayStack<java.lang.String> bodyTextStack
public CallParamRule(int paramIndex)
paramIndex
- The zero-relative parameter numberpublic CallParamRule(int paramIndex, java.lang.String attributeName)
paramIndex
- The zero-relative parameter numberattributeName
- The name of the attribute to savepublic void begin(java.lang.String namespace, java.lang.String name, org.xml.sax.Attributes attributes) throws java.lang.Exception
begin
in class Rule
namespace
- the namespace URI of the matching element, or an
empty string if the parser is not namespace aware or the element has
no namespacename
- the local name if the parser is namespace aware, or just
the element name otherwiseattributes
- The attribute list for this elementjava.lang.Exception
- if an error occurs while processing the eventpublic void body(java.lang.String namespace, java.lang.String name, java.lang.String bodyText) throws java.lang.Exception
body
in class Rule
namespace
- the namespace URI of the matching element, or an
empty string if the parser is not namespace aware or the element has
no namespacename
- the local name if the parser is namespace aware, or just
the element name otherwisebodyText
- The body text of this elementjava.lang.Exception
- if an error occurs while processing the eventpublic void end(java.lang.String namespace, java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.