org.apache.commons.digester3.binder
Class CallParamBuilder

java.lang.Object
  extended by org.apache.commons.digester3.binder.CallParamBuilder
All Implemented Interfaces:
RuleProvider<CallParamRule>

public final class CallParamBuilder
extends Object

Builder chained when invoking LinkedRuleBuilder.callParam().

Since:
3.0

Method Summary
protected  CallParamRule createRule()
          Provides an instance of Rule.
 CallParamBuilder fromAttribute(String attributeName)
          Sets the attribute from which to save the parameter value.
 CallParamBuilder fromStack(boolean fromStack)
          Flags the parameter to be set from the stack.
 R get()
          Provides an instance of Rule.
 String getNamespaceURI()
          Returns the namespace URI for which this Rule is relevant, if any.
 String getPattern()
          Returns the rule pattern associated to this builder.
 CallParamBuilder ofIndex(int paramIndex)
          Sets the zero-relative parameter number.
protected  void reportError(String methodChain, String message)
           
 LinkedRuleBuilder then()
          Come back to the main LinkedRuleBuilder.
 CallParamBuilder withStackIndex(int stackIndex)
          Sets the position of the object from the top of the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

ofIndex

public CallParamBuilder ofIndex(int paramIndex)
Sets the zero-relative parameter number.

Parameters:
paramIndex - The zero-relative parameter number
Returns:
this builder instance

fromAttribute

public CallParamBuilder fromAttribute(String attributeName)
Sets the attribute from which to save the parameter value.

Parameters:
attributeName - The attribute from which to save the parameter value
Returns:
this builder instance

fromStack

public CallParamBuilder fromStack(boolean fromStack)
Flags the parameter to be set from the stack.

Parameters:
fromStack - the parameter flag to be set from the stack
Returns:
this builder instance

withStackIndex

public CallParamBuilder withStackIndex(int stackIndex)
Sets the position of the object from the top of the stack.

Parameters:
stackIndex - The position of the object from the top of the stack
Returns:
this builder instance

createRule

protected CallParamRule createRule()
Provides an instance of Rule. Must never return null.

Returns:
an instance of Rule.
See Also:
get()

then

public final LinkedRuleBuilder then()
Come back to the main LinkedRuleBuilder.

Returns:
the main LinkedRuleBuilder

getNamespaceURI

public final String getNamespaceURI()
Returns the namespace URI for which this Rule is relevant, if any.

Returns:
The namespace URI for which this Rule is relevant, if any

get

public final R get()
Provides an instance of Rule. Must never return null.

Specified by:
get in interface RuleProvider<R extends Rule>
Returns:
an instance of Rule.

reportError

protected final void reportError(String methodChain,
                                 String message)

getPattern

public final String getPattern()
Returns the rule pattern associated to this builder.

Returns:
The rule pattern associated to this builder


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.