aino-komal / mvp4g

Automatically exported from code.google.com/p/mvp4g
0 stars 0 forks source link

Parent Eventbus method not found if method is defined in a super interface #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
if you have this code:

public interface OneCommonEventBusInterface {

   @Event(..., historyConverter=HistoryConverter1.class)
   String oneEvent();

}

public interface OneParentEventBusInterface extends OneCommonEventBusInterface {
   ...
}

public interface OneChildEventBusInterface {

   @Event(..., forwardToParent=true)
   String oneEvent();

}

you will get this error message: "Event oneEvent: you can't generate a token 
for this event if it has no history converter."

This is because getMethods()of JClassType doesn't return methods defined in a 
super class so the method defined in OneCommonEventBusInterface is not found.

workaround: override the method defined in super class:
public interface OneParentEventBusInterface extends OneCommonEventBusInterface {

   @Event(..., historyConverter=HistoryConverter1.class)
   String oneEvent();

}

Original issue reported on code.google.com by plcoir...@gmail.com on 3 May 2011 at 8:17

GoogleCodeExporter commented 9 years ago
Fixed in the last snapshot.

Original comment by plcoir...@gmail.com on 10 Feb 2012 at 3:38