public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<Argument> annotation,
MethodDescription source,
ParameterDescription target,
Implementation.Target implementationTarget,
Assigner assigner,
Assigner.Typing typing) {
Argument argument = annotation.loadSilent();
if (argument.value() < 0) {
throw new IllegalArgumentException("@Argument annotation on " + target + " specifies negative index");
} else if (source.getParameters().size() <= argument.value()) {
return MethodDelegationBinder.ParameterBinding.Illegal.INSTANCE;
}
return argument.bindingMechanic().makeBinding(source.getParameters().get(argument.value()).getType(),
target.getType(),
argument.value(),
assigner,
typing,
source.getParameters().get(argument.value()).getOffset());
}
}