public static class MethodDelegationBinder.MethodBinding.Builder extends Object
MethodDelegationBinder.MethodBinding
by adding parameter bindings incrementally.Constructor and Description |
---|
Builder(MethodDelegationBinder.MethodInvoker methodInvoker,
MethodDescription target)
Creates a new builder for the binding of a given method.
|
Modifier and Type | Method and Description |
---|---|
boolean |
append(MethodDelegationBinder.ParameterBinding<?> parameterBinding)
Appends a stack manipulation for the next parameter of the target method.
|
MethodDelegationBinder.MethodBinding |
build(StackManipulation returnValueStackManipulation)
Creates a binding that represents the bindings collected by this
Builder. |
int |
getCurrentParameterIndex()
Returns the current parameter index that will be bound on the next call of
append(net.bytebuddy.instrumentation.method.bytecode.bind.MethodDelegationBinder.ParameterBinding) . |
String |
toString() |
public Builder(MethodDelegationBinder.MethodInvoker methodInvoker, MethodDescription target)
methodInvoker
- The method invoker that is used to create the method invocation of the target
method.target
- The target method that is target of the binding.public boolean append(MethodDelegationBinder.ParameterBinding<?> parameterBinding)
parameterBinding
- A binding representing the next subsequent parameter of the method.false
if the parameterBindingToken
was already bound. A conflicting binding should
usually abort the attempt of binding a method and this Builder
should be discarded.public MethodDelegationBinder.MethodBinding build(StackManipulation returnValueStackManipulation)
Builder.
returnValueStackManipulation
- A stack manipulation applied to the target method's return value.public int getCurrentParameterIndex()
append(net.bytebuddy.instrumentation.method.bytecode.bind.MethodDelegationBinder.ParameterBinding)
.Copyright © 2014. All rights reserved.