public Set < Method > subscriptionsOn ( Object subscriber ) { SubscriptionMethodFilter filter = new SubscriptionMethodFilter ( ) ; Class < ? > subscriberClass = subscriber . getClass ( ) ; List < Method > methods = Arrays . asList ( subscriberClass . getMethods ( ) ) ; Set < Method > subscriptions = new HashSet < Method > ( ) ; for ( Method method : methods ) { if ( filter . accepts ( method ) ) { subscriptions . add ( method ) ; } } return subscriptions ; }
Report the subscription methods declared on the subscriber .