Class GuiceInjectorModule
java.lang.Object
com.google.inject.AbstractModule
com.github.thought2code.mcp.annotated.di.GuiceInjectorModule
- All Implemented Interfaces:
com.google.inject.Module
public final class GuiceInjectorModule
extends com.google.inject.AbstractModule
This class is a Guice module that configures bindings for classes annotated with
McpServerApplication, McpResource, McpPrompt, and McpTool.- Author:
- codeboyzhou
-
Constructor Summary
ConstructorsConstructorDescriptionGuiceInjectorModule(Class<?> mainClass) Constructs a newGuiceInjectorModulewith the specified main class. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidorg.reflections.ReflectionsProvides aReflectionsinstance for the main class.Provides aResourceBundleinstance for the main class.Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Constructor Details
-
GuiceInjectorModule
Constructs a newGuiceInjectorModulewith the specified main class.- Parameters:
mainClass- the main class to use for configuration
-
-
Method Details
-
configure
protected void configure()- Overrides:
configurein classcom.google.inject.AbstractModule
-
provideReflections
@Provides public org.reflections.Reflections provideReflections()Provides aReflectionsinstance for the main class.- Returns:
- a
Reflectionsinstance for the main class
-
provideResourceBundle
Provides aResourceBundleinstance for the main class.- Returns:
- a
ResourceBundleinstance for the main class
-