Top Description Fields Constructors Methods
org.apache.tomcat.util.digester

public Class CallParamRule

extends Rule
Class Inheritance
Known Direct Subclasses
org.apache.tomcat.util.descriptor.web.CallParamMultiRule
Imports
org.xml.sax.Attributes

Rule implementation that saves a parameter for use by a surrounding CallMethodRule.

This parameter may be:

Field Summary

Modifier and TypeField and Description
protected final String
attributeName

The attribute from which to save the parameter value

protected ArrayStack<String>
bodyTextStack

Stack is used to allow nested body text to be processed.

protected final boolean
fromStack

Is the parameter to be set from the stack?

protected final int
paramIndex

The zero-relative index of the parameter we are saving.

protected final int
stackIndex

The position of the object from the top of the stack

Inherited from org.apache.tomcat.util.digester.Rule:
digesternamespaceURIsm

Constructor Summary

AccessConstructor and Description
public
CallParamRule(int
The zero-relative parameter number
paramIndex
)

Construct a "call parameter" rule that will save the body text of this element as the parameter value.

public
CallParamRule(int
The zero-relative parameter number
paramIndex
,
String
The name of the attribute to save
attributeName
)

Construct a "call parameter" rule that will save the value of the specified attribute as the parameter value.

private
CallParamRule(String attributeName, int paramIndex, int stackIndex, boolean fromStack)

Method Summary

Modifier and TypeMethod and Description
public void
begin(String
the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace
namespace
,
String
the local name if the parser is namespace aware, or just the element name otherwise
name
,
Attributes
The attribute list for this element
attributes
)

Overrides org.apache.tomcat.util.digester.Rule.begin.

Process the start of this element.

public void
body(String
the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace
namespace
,
String
the local name if the parser is namespace aware, or just the element name otherwise
name
,
String
The body text of this element
bodyText
)

Overrides org.apache.tomcat.util.digester.Rule.body.

Process the body text of this element.

public void
end(String
the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace
namespace
,
String
the local name if the parser is namespace aware, or just the element name otherwise
name
)

Overrides org.apache.tomcat.util.digester.Rule.end.

Process any body texts now.

public String
toString()

Overrides java.lang.Object.toString.

Render a printable version of this Rule.

Inherited from org.apache.tomcat.util.digester.Rule:
finishgetDigestergetNamespaceURIsetDigestersetNamespaceURI

Field Detail

attributeNameback to summary
protected final String attributeName

The attribute from which to save the parameter value

bodyTextStackback to summary
protected ArrayStack<String> bodyTextStack

Stack is used to allow nested body text to be processed. Lazy creation.

fromStackback to summary
protected final boolean fromStack

Is the parameter to be set from the stack?

paramIndexback to summary
protected final int paramIndex

The zero-relative index of the parameter we are saving.

stackIndexback to summary
protected final int stackIndex

The position of the object from the top of the stack

Constructor Detail

CallParamRuleback to summary
public CallParamRule(int paramIndex)

Construct a "call parameter" rule that will save the body text of this element as the parameter value.

Parameters
paramIndex:int

The zero-relative parameter number

CallParamRuleback to summary
public CallParamRule(int paramIndex, String attributeName)

Construct a "call parameter" rule that will save the value of the specified attribute as the parameter value.

Parameters
paramIndex:int

The zero-relative parameter number

attributeName:String

The name of the attribute to save

CallParamRuleback to summary
private CallParamRule(String attributeName, int paramIndex, int stackIndex, boolean fromStack)

Method Detail

beginback to summary
public void begin(String namespace, String name, Attributes attributes) throws Exception

Overrides org.apache.tomcat.util.digester.Rule.begin.

Process the start of this element.

Parameters
namespace:String

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:String

the local name if the parser is namespace aware, or just the element name otherwise

attributes:Attributes

The attribute list for this element

Annotations
@Override
Exceptions
Exception:

Doc from org.apache.tomcat.util.digester.Rule.begin.

if an error occurs while processing the event

bodyback to summary
public void body(String namespace, String name, String bodyText) throws Exception

Overrides org.apache.tomcat.util.digester.Rule.body.

Process the body text of this element.

Parameters
namespace:String

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:String

the local name if the parser is namespace aware, or just the element name otherwise

bodyText:String

The body text of this element

Annotations
@Override
Exceptions
Exception:

Doc from org.apache.tomcat.util.digester.Rule.body.

if an error occurs while processing the event

endback to summary
public void end(String namespace, String name)

Overrides org.apache.tomcat.util.digester.Rule.end.

Process any body texts now.

Parameters
namespace:String

Doc from org.apache.tomcat.util.digester.Rule.end.

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:String

Doc from org.apache.tomcat.util.digester.Rule.end.

the local name if the parser is namespace aware, or just the element name otherwise

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Render a printable version of this Rule.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override