org.apache.commons.digester
Class ObjectParamRule
public class ObjectParamRule
Rule implementation that saves a parameter for use by a surrounding
CallMethodRule
.
This parameter may be:
- an arbitrary Object defined programatically, assigned when the element pattern associated with the Rule is matched
See
ObjectParamRule(int paramIndex, Object param)
- an arbitrary Object defined programatically, assigned if the element pattern AND specified attribute name are matched
See
ObjectParamRule(int paramIndex, String attributeName, Object param)
- 1.4
protected String | attributeName - The attribute which we are attempting to match
|
protected Object | param - The parameter we wish to pass to the method call
|
protected int | paramIndex - The zero-relative index of the parameter we are saving.
|
ObjectParamRule(int paramIndex, Object param) - Construct a "call parameter" rule that will save the given Object as
the parameter value.
|
ObjectParamRule(int paramIndex, String attributeName, Object param) - Construct a "call parameter" rule that will save the given Object as
the parameter value, provided that the specified attribute exists.
|
void | begin(String namespace, String name, Attributes attributes) - Process the start of this element.
|
String | toString() - Render a printable version of this Rule.
|
begin , begin , body , body , end , end , finish , getDigester , getNamespaceURI , setDigester , setNamespaceURI |
attributeName
protected String attributeName
The attribute which we are attempting to match
param
protected Object param
The parameter we wish to pass to the method call
paramIndex
protected int paramIndex
The zero-relative index of the parameter we are saving.
ObjectParamRule
public ObjectParamRule(int paramIndex,
Object param)
Construct a "call parameter" rule that will save the given Object as
the parameter value.
paramIndex
- The zero-relative parameter numberparam
- the parameter to pass along
ObjectParamRule
public ObjectParamRule(int paramIndex,
String attributeName,
Object param)
Construct a "call parameter" rule that will save the given Object as
the parameter value, provided that the specified attribute exists.
paramIndex
- The zero-relative parameter numberattributeName
- The name of the attribute to matchparam
- the parameter to pass along
begin
public void begin(String namespace,
String name,
Attributes attributes)
throws Exception
Process the start of this element.
- begin in interface Rule
attributes
- The attribute list for this element
toString
public String toString()
Render a printable version of this Rule.
Copyright (c) 2001-2004 - Apache Software Foundation