Class MethodDelegationBinder.Processor
java.lang.Object
net.bytebuddy.implementation.bind.MethodDelegationBinder.Processor
- All Implemented Interfaces:
MethodDelegationBinder.Record
- Enclosing interface:
MethodDelegationBinder
@Enhance
public static class MethodDelegationBinder.Processor
extends Object
implements MethodDelegationBinder.Record
A helper class that allows to identify a best binding for a given type and source method choosing from a list of given
target methods by using a given
MethodDelegationBinder
and an MethodDelegationBinder.AmbiguityResolver.
The
Processor will:
- Try to bind the
sourcemethod using theMethodDelegationBinder. - Find a best method among the successful bindings using the
AmbiguityResolver.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.MethodDelegationBinder.Record
MethodDelegationBinder.Record.Illegal -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDelegationBinder.AmbiguityResolverThe processor's ambiguity resolver.private final MethodDelegationBinder.BindingResolverThe binding resolver being used to select the relevant method binding.private final List<? extends MethodDelegationBinder.Record> The delegation records to consider. -
Constructor Summary
ConstructorsConstructorDescriptionProcessor(List<? extends MethodDelegationBinder.Record> records, MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDelegationBinder.BindingResolver bindingResolver) Creates a new processor. -
Method Summary
Modifier and TypeMethodDescriptionbind(Implementation.Target implementationTarget, MethodDescription source, MethodDelegationBinder.TerminationHandler terminationHandler, MethodDelegationBinder.MethodInvoker methodInvoker, Assigner assigner) Attempts a binding of a source method to this compiled target.
-
Field Details
-
records
The delegation records to consider. -
ambiguityResolver
The processor's ambiguity resolver. -
bindingResolver
The binding resolver being used to select the relevant method binding.
-
-
Constructor Details
-
Processor
public Processor(List<? extends MethodDelegationBinder.Record> records, MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDelegationBinder.BindingResolver bindingResolver) Creates a new processor.- Parameters:
records- The delegation records to consider.ambiguityResolver- The ambiguity resolver to apply.bindingResolver- The binding resolver being used to select the relevant method binding.
-
-
Method Details
-
bind
public MethodDelegationBinder.MethodBinding bind(Implementation.Target implementationTarget, MethodDescription source, MethodDelegationBinder.TerminationHandler terminationHandler, MethodDelegationBinder.MethodInvoker methodInvoker, Assigner assigner) Attempts a binding of a source method to this compiled target.- Specified by:
bindin interfaceMethodDelegationBinder.Record- Parameters:
implementationTarget- The target of the current implementation onto which this binding is to be applied.source- The method that is to be bound to thetargetmethod.terminationHandler- The termination handler to apply.methodInvoker- The method invoker to use.assigner- The assigner to use.- Returns:
- A binding representing this attempt to bind the
sourcemethod to thetargetmethod.
-