//
ArrayList<InterfaceDeclaration> intfList = new ArrayList<InterfaceDeclaration>();
intfList.add(_eventSet);
for (int i = 0; i < intfList.size(); i++)
{
InterfaceDeclaration intfDecl = intfList.get(i);
//
// Don't add events that are derived from a super event set.
//
/* todo: why does this happen? in this case, the events from super @EventSet interfaces
won't be added to the event adapter which results in an incomplete
implementation of the event set interface.
/*
if (_superEventSet != null && _superEventSet.getClassName().equals(intfDecl.getQualifiedName()))
continue;
*/
// Add all declared methods, but ignore the mystery <clinit> methods
for (MethodDeclaration methodDecl : intfDecl.getMethods())
if (!methodDecl.toString().equals("<clinit>()"))
events.add(new AptEvent(this, methodDecl, _ap));
//
// Add all superinterfaces of the target interface to the list
//
for (InterfaceType superType: intfDecl.getSuperinterfaces())
{
InterfaceDeclaration superDecl = superType.getDeclaration();
if (superDecl != null && !intfList.contains(superDecl))
intfList.add(superDecl);
}
}