square/otto — pull request #15 by naixx (2012-07-28 14:01:26+00:00)
Title: Allow to use Otto with AndroidAnnotations' generated classes. 

There is a problem using https://github.com/excilys/androidannotations with Otto. When we pass `this` to Otto, it can see generated by AA class, which doesn't have any `@Subscribe` and `@Produce` annotations.
The first solution is to wrap all annotated methods on ClassA_ in the AndroidAnnotations project, something like this:

@EActivity
class ClassActivity{
@Subscribe public void onMyEvent(Event event){
//...
}
}

Generated class could be:

class ClassActivity_{
@Subscribe public void onMyEvent_(Event event){
onMyEvent(event);
}
}

We use wrappers for methods to call `this.onMyEvent` which could be overriden in `ClassActivity_`

But it is rather complicated to generate lots of code. The easiest way is to modify Otto a bit. We assume, that ClassA_ is generated by AA from ClassA.