public final class CallMethodBuilder extends Object
LinkedRuleBuilder.callMethod(String)
.Modifier and Type | Method and Description |
---|---|
protected CallMethodRule |
createRule()
Provides an instance of
Rule . |
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.
|
protected void |
reportError(String methodChain,
String message) |
LinkedRuleBuilder |
then()
Come back to the main
LinkedRuleBuilder . |
CallMethodBuilder |
useExactMatch(boolean useExactMatch)
Should
MethodUtils.invokeExactMethod be used for the reflection. |
CallMethodBuilder |
usingElementBodyAsArgument()
Prepare the
CallMethodRule to be invoked using the matching element body as argument. |
CallMethodBuilder |
withParamCount(int paramCount)
The number of parameters to collect, or zero for a single argument from the body of this element.
|
CallMethodBuilder |
withParamTypes(Class<?>... paramTypes)
Sets the Java classes that represent the parameter types of the method arguments.
|
CallMethodBuilder |
withParamTypes(String... paramTypeNames)
Sets the Java class names that represent the parameter types of the method arguments.
|
CallMethodBuilder |
withTargetOffset(int targetOffset)
Sets the location of the target object.
|
public CallMethodBuilder withTargetOffset(int targetOffset)
targetOffset
- location of the target object.public CallMethodBuilder withParamTypes(String... paramTypeNames)
java.lang.Boolean.TYPE
for a boolean
parameter.paramTypeNames
- The Java classes names that represent the parameter types of the method argumentspublic CallMethodBuilder withParamTypes(Class<?>... paramTypes)
java.lang.Boolean.TYPE
for a boolean
parameter.paramTypes
- The Java classes that represent the parameter types of the method argumentspublic CallMethodBuilder useExactMatch(boolean useExactMatch)
MethodUtils.invokeExactMethod
be used for the reflection.useExactMatch
- Flag to mark exact matching or notpublic CallMethodBuilder withParamCount(int paramCount)
paramCount
- The number of parameters to collect, or zero for a single argument
from the body of this element.public CallMethodBuilder usingElementBodyAsArgument()
CallMethodRule
to be invoked using the matching element body as argument.protected CallMethodRule createRule()
Rule
. Must never return null.public final LinkedRuleBuilder then()
LinkedRuleBuilder
.LinkedRuleBuilder
public final String getNamespaceURI()
public final R get()
Rule
. Must never return null.get
in interface RuleProvider<R extends Rule>
Rule
.protected final void reportError(String methodChain, String message)
public final String getPattern()
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.