com.google.common.eventbus.SubscriptionIntrospector Maven / Gradle / Ivy
package com.google.common.eventbus;
import com.google.common.base.Preconditions;
import java.lang.reflect.Field;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@SuppressWarnings({"UnstableApiUsage", "rawtypes"})
public class SubscriptionIntrospector {
private static final String SUBSCRIBERS_FIELD = "subscribers";
private final EventBus eventbus;
private Map> subscribers;
public SubscriptionIntrospector(final EventBus eventbus) {
this.eventbus = eventbus;
}
public Set getListenedEvents() {
return extractSubscribers().keySet();
}
public Set