/** * Creates a {@code ClassSelector} based on the given class type that only matches if the * key being matched is assignable according to {@link Class#isAssignableFrom(Class)}. * * @param supertype The supertype to compare. * * @return The new {@link Selector}. */ public static Selector typeSelector(Class<?> supertype) { return new ClassSelector(supertype); }
/** * Creates a {@link Selector} based on the given class type that matches objects whose type is * assignable according to {@link Class#isAssignableFrom(Class)}. * * @param supertype * The supertype to use for matching * * @return The new {@link ClassSelector}. * * @see ClassSelector */ public static ClassSelector type(Class<?> supertype) { return new ClassSelector(supertype); }
this.on(new ClassSelector(Throwable.class), new Consumer<Event<Throwable>>() { Logger log;