@Override public MethodDelegationBinder.ParameterBinding<?> bind(final AnnotationDescription.Loadable<DefaultMethod> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner, Assigner.Typing typing) { if (!target.getType().asErasure().isAssignableFrom(Method.class)) { throw new IllegalStateException("Cannot assign Method type to " + target); } else if (source.isMethod()) { TypeDescription typeDescription = annotation.getValue(TARGET_TYPE).resolve(TypeDescription.class); Implementation.SpecialMethodInvocation specialMethodInvocation = (typeDescription.represents(void.class) ? MethodLocator.ForImplicitType.INSTANCE : new MethodLocator.ForExplicitType(typeDescription)).resolve(implementationTarget, source); if (specialMethodInvocation.isValid()) { return new MethodDelegationBinder.ParameterBinding.Anonymous(new DelegationMethod(specialMethodInvocation, annotation.getValue(CACHED).resolve(Boolean.class))); } else if (annotation.getValue(NULL_IF_IMPOSSIBLE).resolve(Boolean.class)) { return new MethodDelegationBinder.ParameterBinding.Anonymous(NullConstant.INSTANCE); } else { return MethodDelegationBinder.ParameterBinding.Illegal.INSTANCE; } } else if (annotation.getValue(NULL_IF_IMPOSSIBLE).resolve(Boolean.class)) { return new MethodDelegationBinder.ParameterBinding.Anonymous(NullConstant.INSTANCE); } else { return MethodDelegationBinder.ParameterBinding.Illegal.INSTANCE; } }