Class AbstractParamTypeBuilder<R extends AbstractMethodRule>
- java.lang.Object
-
- org.apache.commons.digester3.binder.AbstractParamTypeBuilder<R>
-
- Type Parameters:
R- anyAbstractMethodRuleconcrete implementation, typicallySetNextRule,SetRootRuleandSetTopRule
- All Implemented Interfaces:
RuleProvider<R>
- Direct Known Subclasses:
SetNextBuilder,SetRootBuilder,SetTopBuilder
public abstract class AbstractParamTypeBuilder<R extends AbstractMethodRule> extends java.lang.Object
Builder chained when invokingLinkedRuleBuilder.setNext(String),LinkedRuleBuilder.setRoot(String)orLinkedRuleBuilder.setTop(String).- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract RcreateRule()Provides an instance ofRule.AbstractParamTypeBuilder<R>fireOnBegin(boolean fireOnBegin)Marks the rule be invoked whenbeginorendevents match.Rget()Provides an instance ofRule.java.lang.StringgetNamespaceURI()Returns the namespace URI for which this Rule is relevant, if any.java.lang.StringgetPattern()Returns the rule pattern associated to this builder.protected voidreportError(java.lang.String methodChain, java.lang.String message)LinkedRuleBuilderthen()Come back to the mainLinkedRuleBuilder.AbstractParamTypeBuilder<R>useExactMatch(boolean useExactMatch)Sets exact matching being used.AbstractParamTypeBuilder<R>withParameterType(java.lang.Class<?> paramType)Sets the Java class of the method's argument.AbstractParamTypeBuilder<R>withParameterType(java.lang.String paramType)Sets the Java class name of the method's argument.
-
-
-
Method Detail
-
withParameterType
public final AbstractParamTypeBuilder<R> withParameterType(java.lang.Class<?> paramType)
Sets the Java class of the method's argument. If you wish to use a primitive type, specify the corresonding Java wrapper class instead, such asjava.lang.Booleanfor abooleanparameter.- Parameters:
paramType- The Java class of the method's argument- Returns:
- this builder instance
-
withParameterType
public final AbstractParamTypeBuilder<R> withParameterType(java.lang.String paramType)
Sets the Java class name of the method's argument. If you wish to use a primitive type, specify the corresonding Java wrapper class instead, such asjava.lang.Booleanfor abooleanparameter.- Parameters:
paramType- The Java class name of the method's argument- Returns:
- this builder instance
-
useExactMatch
public final AbstractParamTypeBuilder<R> useExactMatch(boolean useExactMatch)
Sets exact matching being used.- Parameters:
useExactMatch- The exact matching being used- Returns:
- this builder instance
-
fireOnBegin
public final AbstractParamTypeBuilder<R> fireOnBegin(boolean fireOnBegin)
Marks the rule be invoked whenbeginorendevents match.- Parameters:
fireOnBegin- true, to invoke the rule atbegin, false forend- Returns:
- this builder instance
-
then
public final LinkedRuleBuilder then()
Come back to the mainLinkedRuleBuilder.- Returns:
- the main
LinkedRuleBuilder
-
getNamespaceURI
public final java.lang.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 ofRule. Must never return null.- Specified by:
getin interfaceRuleProvider<R extends Rule>- Returns:
- an instance of
Rule.
-
reportError
protected final void reportError(java.lang.String methodChain, java.lang.String message)
-
getPattern
public final java.lang.String getPattern()
Returns the rule pattern associated to this builder.- Returns:
- The rule pattern associated to this builder
-
createRule
protected abstract R createRule()
Provides an instance ofRule. Must never return null.- Returns:
- an instance of
Rule. - See Also:
RuleProvider.get()
-
-