class EventStubGenerator {

    public GeneratedClass getEventizer() {
        ClassBuilder cb = new ClassBuilder(myEventizerName(), eventizerPackage);
        addGeneratedAnnotation(cb);
        cb.implement(eventizerInterface);
        cb.imports.addPackageImport(stubsPackage);

        String listenerType = cb.imports.getSimpleName(listenerInterface);
        String senderType = cb.imports.getSimpleName(senderInterface);

        cb.addMethod("" +
                "    @Override\n" +
                "    public Class<" + listenerType + "> getType() {\n" +
                "        return " + listenerType + ".class;\n" +
                "    }\n");

        cb.addMethod("" +
                "    @Override\n" +
                "    public " + listenerType + " newFrontend(" + senderType + " target) {\n" +
                "        return new " + myFrontendName() + "(target);\n" +
                "    }\n");

        cb.addMethod("" +
                "    @Override\n" +
                "    public " + senderType + " newBackend(" + listenerType + " target) {\n" +
                "        return new " + myBackendName() + "(target);\n" +
                "    }\n");

        return cb.build();
    }

    public  EventStubGenerator(TypeElement listenerType, String targetPackage);

}