![JAR search and dependency download from the Maven repository](/logo.png)
com.google.common.eventbus.SubscriberRegistry.class Maven / Gradle / Ivy
???? 4?
java/lang/Object ()V
com/google/common/collect/Maps newConcurrentMap &()Ljava/util/concurrent/ConcurrentMap; -com/google/common/eventbus/SubscriberRegistry subscribers $Ljava/util/concurrent/ConcurrentMap;
$com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object; #com/google/common/eventbus/EventBus bus %Lcom/google/common/eventbus/EventBus;
! " findAllSubscribers 8(Ljava/lang/Object;)Lcom/google/common/collect/Multimap; $ % & ' ( "com/google/common/collect/Multimap asMap ()Ljava/util/Map; * + , - .
java/util/Map entrySet ()Ljava/util/Set; 0 1 2 3 4
java/util/Set iterator ()Ljava/util/Iterator; 6 7 8 9 : java/util/Iterator hasNext ()Z 6 < = > next ()Ljava/lang/Object; @ java/util/Map$Entry ? B C > getKey E java/lang/Class ? G H > getValue J java/util/Collection L M N O "java/util/concurrent/ConcurrentMap get Q (java/util/concurrent/CopyOnWriteArraySet
P L T U V putIfAbsent 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
X Y Z [ V "com/google/common/base/MoreObjects firstNonNull
P ] ^ _ addAll (Ljava/util/Collection;)Z
P a b _ removeAll d "java/lang/IllegalArgumentException f java/lang/StringBuilder
e i 5missing event subscriber for an annotated method. Is
e k l m append -(Ljava/lang/String;)Ljava/lang/StringBuilder;
e o l p -(Ljava/lang/Object;)Ljava/lang/StringBuilder; r registered?
e t u v toString ()Ljava/lang/String;
c x y (Ljava/lang/String;)V { java/util/AbstractCollection
} ~ ? ? &com/google/common/collect/ImmutableSet of *()Lcom/google/common/collect/ImmutableSet;
? ? ? getClass ()Ljava/lang/Class;
? ? ? flattenHierarchy ;(Ljava/lang/Class;)Lcom/google/common/collect/ImmutableSet;
} ? ? ? size ()I
? ? ? ? ? com/google/common/collect/Lists newArrayListWithCapacity (I)Ljava/util/ArrayList;
} ? 3 ? 2()Lcom/google/common/collect/UnmodifiableIterator;
P 1 ? ? ? ? ? java/util/List add (Ljava/lang/Object;)Z ? 1
? ? ? ? ? #com/google/common/collect/Iterators concat *(Ljava/util/Iterator;)Ljava/util/Iterator;
? ? ? ? ? &com/google/common/collect/HashMultimap create *()Lcom/google/common/collect/HashMultimap;
? ? ? getAnnotatedMethods <(Ljava/lang/Class;)Lcom/google/common/collect/ImmutableList;
? ? ? 'com/google/common/collect/ImmutableList ? java/lang/reflect/Method
? ? ? ? getParameterTypes ()[Ljava/lang/Class;
? ? ? ? ? %com/google/common/eventbus/Subscriber z(Lcom/google/common/eventbus/EventBus;Ljava/lang/Object;Ljava/lang/reflect/Method;)Lcom/google/common/eventbus/Subscriber; $ ? ? ? put '(Ljava/lang/Object;Ljava/lang/Object;)Z ? ? ? subscriberMethodsCache &Lcom/google/common/cache/LoadingCache; ? ? ? ? $com/google/common/cache/LoadingCache getUnchecked ? =com/google/common/util/concurrent/UncheckedExecutionException
? ? ? ? getCause ()Ljava/lang/Throwable;
? ? ? ? v java/lang/Throwable
getMessage
c ? ? *(Ljava/lang/String;Ljava/lang/Throwable;)V
? ? ? ? ? #com/google/common/reflect/TypeToken 8(Ljava/lang/Class;)Lcom/google/common/reflect/TypeToken;
? ? ? ? getTypes /()Lcom/google/common/reflect/TypeToken$TypeSet;
? ? ? ? . +com/google/common/reflect/TypeToken$TypeSet rawTypes
? ? ?
newHashMap ()Ljava/util/HashMap;
D ? ? ? getDeclaredMethods ()[Ljava/lang/reflect/Method; ? $com/google/common/eventbus/Subscribe
? ? ? ? isAnnotationPresent (Ljava/lang/Class;)Z
? ? ? : isSynthetic ? lMethod %s has @Subscribe annotation but has %s parameters. Subscriber methods must have exactly 1 parameter.
? ? ?
checkArgument )(ZLjava/lang/String;Ljava/lang/Object;I)V
D ? ? : isPrimitive {@Subscribe method %s's parameter is %s. Subscriber methods cannot accept primitives. Consider changing the parameter to %s.
D v getName
'com/google/common/primitives/Primitives wrap $(Ljava/lang/Class;)Ljava/lang/Class;
D
v
getSimpleName
? L(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V >com/google/common/eventbus/SubscriberRegistry$MethodIdentifier
(Ljava/lang/reflect/Method;)V * ? containsKey * ? V * values ()Ljava/util/Collection;
? !" copyOf A(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableList; $% ? flattenHierarchyCache
}'!( @(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;
*+,-. $com/google/common/cache/CacheBuilder
newBuilder (()Lcom/google/common/cache/CacheBuilder;
*01. weakKeys 345 apply #()Lcom/google/common/base/Function;
789:; #com/google/common/cache/CacheLoader from H(Lcom/google/common/base/Function;)Lcom/google/common/cache/CacheLoader;
*=>? build M(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/LoadingCache; 3 Signature ?Ljava/util/concurrent/ConcurrentMap;Ljava/util/concurrent/CopyOnWriteArraySet;>; RuntimeInvisibleAnnotations $Lcom/google/j2objc/annotations/Weak; ?Lcom/google/common/cache/LoadingCache;Lcom/google/common/collect/ImmutableList;>; zLcom/google/common/cache/LoadingCache;Lcom/google/common/collect/ImmutableSet;>;>; ((Lcom/google/common/eventbus/EventBus;)V Code LineNumberTable LocalVariableTable this /Lcom/google/common/eventbus/SubscriberRegistry; MethodParameters register (Ljava/lang/Object;)V newSet *Ljava/util/concurrent/CopyOnWriteArraySet; eventType Ljava/lang/Class; eventMethodsInListener Ljava/util/Collection; eventSubscribers entry Ljava/util/Map$Entry; listener Ljava/lang/Object; listenerMethods $Lcom/google/common/collect/Multimap; LocalVariableTypeTable SLjava/util/concurrent/CopyOnWriteArraySet; Ljava/lang/Class<*>; ?Ljava/util/Collection; jLjava/util/Map$Entry;Ljava/util/Collection;>; aLcom/google/common/collect/Multimap;Lcom/google/common/eventbus/Subscriber;>;
StackMapTable
unregister listenerMethodsForType currentSubscribers getSubscribersForTesting "(Ljava/lang/Class;)Ljava/util/Set; N(Ljava/lang/Class<*>;)Ljava/util/Set; 1Lcom/google/common/annotations/VisibleForTesting; getSubscribers ((Ljava/lang/Object;)Ljava/util/Iterator; event
eventTypes (Lcom/google/common/collect/ImmutableSet; subscriberIterators Ljava/util/List; >Lcom/google/common/collect/ImmutableSet;>; OLjava/util/List;>; Q(Ljava/lang/Object;)Ljava/util/Iterator; parameterTypes [Ljava/lang/Class; method Ljava/lang/reflect/Method; methodsInListener clazz [Ljava/lang/Class<*>; u(Ljava/lang/Object;)Lcom/google/common/collect/Multimap;Lcom/google/common/eventbus/Subscriber;>; e ?Lcom/google/common/util/concurrent/UncheckedExecutionException; [(Ljava/lang/Class<*>;)Lcom/google/common/collect/ImmutableList; getAnnotatedMethodsNotCached ident @Lcom/google/common/eventbus/SubscriberRegistry$MethodIdentifier; supertype
supertypes Ljava/util/Set; identifiers Ljava/util/Map; &Ljava/util/Set<+Ljava/lang/Class<*>;>; kLjava/util/Map;? [Ljava/lang/reflect/Method;v
concreteClass T(Ljava/lang/Class<*>;)Lcom/google/common/collect/ImmutableSet;>; lambda$static$0
SourceFile SubscriberRegistry.java RuntimeVisibleAnnotations