avoid warning
Class is a raw type. References to generic type Class<T> should be
parameterized
narrow down type of class from <?> to <? extends Listener>