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 java.lang.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 givenMethodDelegationBinderand anMethodDelegationBinder.AmbiguityResolver.
TheProcessorwill:- 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
Fields Modifier and Type Field Description private MethodDelegationBinder.AmbiguityResolverambiguityResolverThe processor's ambiguity resolver.private MethodDelegationBinder.BindingResolverbindingResolverThe binding resolver being used to select the relevant method binding.private java.util.List<? extends MethodDelegationBinder.Record>recordsThe delegation records to consider.
-
Constructor Summary
Constructors Constructor Description Processor(java.util.List<? extends MethodDelegationBinder.Record> records, MethodDelegationBinder.AmbiguityResolver ambiguityResolver, MethodDelegationBinder.BindingResolver bindingResolver)Creates a new processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDelegationBinder.MethodBindingbind(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 Detail
-
records
private final java.util.List<? extends MethodDelegationBinder.Record> records
The delegation records to consider.
-
ambiguityResolver
private final MethodDelegationBinder.AmbiguityResolver ambiguityResolver
The processor's ambiguity resolver.
-
bindingResolver
private final MethodDelegationBinder.BindingResolver bindingResolver
The binding resolver being used to select the relevant method binding.
-
-
Constructor Detail
-
Processor
public Processor(java.util.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 Detail
-
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.
-
-