class ReceiverGenerator implements IReceiverGenerator {

    @Override
    public IMessageReceiver generate(
            final Object objInstance,
            final IResolveDependencyStrategy wrapperResolutionStrategy,
            final String methodName
    ) throws InvalidArgumentException, ReceiverGeneratorException {
        if (
                null == objInstance ||
                null == methodName ||
                methodName.isEmpty() ||
                null == wrapperResolutionStrategy
        ) {
            throw new InvalidArgumentException("One of the arguments null or empty.");
        }
        try {
            Class<IMessageReceiver> clazz = generateClass(
                    objInstance,
                    methodName
            );
            return clazz.getConstructor(
                    new Class[]{objInstance.getClass(), IResolveDependencyStrategy.class}
            )
                    .newInstance(new Object[]{objInstance, wrapperResolutionStrategy});
        } catch (Throwable e) {
            throw new ReceiverGeneratorException(
                    "Could not generate message receiver because of the following error:",
                    e
            );
        }
    }

    public  ReceiverGenerator(final ClassLoader classLoader);

}