All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.common.eventbus.AnnotationModule Maven / Gradle / Ivy

package com.google.common.eventbus;

import java.lang.annotation.Annotation;

import com.google.inject.AbstractModule;

public class AnnotationModule extends AbstractModule {
	
	private final Class annotationClass;
	
	public AnnotationModule() {
		this.annotationClass = Subscribe.class;
	}
	
	
	public AnnotationModule(Class annotation) {
		this.annotationClass = annotation;
	}
	
	@Override
	protected void configure() {		
		this.bind(SubscriberFindingStrategy.class).toInstance(new AnnotatedSubscriberFinder(this.annotationClass));			
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy