class EventStubGenerator {

    public GeneratedClass getBackend() {
        JavaVar target = JavaVar.of(listenerInterface, "target");

        ClassBuilder cb = new ClassBuilder(myBackendName(), stubsPackage);
        addGeneratedAnnotation(cb);
        cb.implement(senderInterface);
        cb.fieldsAndConstructorParameters(Arrays.asList(target));

        cb.addMethod("" +
                "    @Override\n" +
                "    public void send(" + cb.imports.getSimpleName(eventInterface) + " message) {\n" +
                "        message.fireOn(" + target.getName() + ");\n" +
                "    }\n");

        return cb.build();
    }

    public  EventStubGenerator(TypeElement listenerType, String targetPackage);

}