private DeclaredType getHandlerTypeMirror() { if (handlerTypeMirror == null) { Optional<DeclaredType> optionalSuperType = nonObjectSuperclass(utils.getTypes(), utils.getElements(), getEventTypeMirror()); while (optionalSuperType.isPresent()) { DeclaredType superType = optionalSuperType.get(); if (isTypeOf(Event.class, superType)) { handlerTypeMirror = extractHandlerTypeFromEvent(superType); break; } else { optionalSuperType = nonObjectSuperclass(utils.getTypes(), utils.getElements(), superType); } } } return handlerTypeMirror; }