Class AbstractParameterConverter<A extends Annotation>

java.lang.Object
com.github.thought2code.mcp.annotated.server.converter.AbstractParameterConverter<A>
Type Parameters:
A - the type of the annotation
All Implemented Interfaces:
ParameterConverter<A>
Direct Known Subclasses:
McpPromptParameterConverter, McpToolParameterConverter

public abstract class AbstractParameterConverter<A extends Annotation> extends Object implements ParameterConverter<A>
This abstract class is used to convert the value of a parameter annotated with AbstractParameterConverter to the required type, and provides a default implementation for the convertAll(Parameter[], Map) method.
Author:
codeboyzhou
  • Constructor Details

    • AbstractParameterConverter

      public AbstractParameterConverter()
  • Method Details

    • convertAll

      public List<Object> convertAll(Parameter[] methodParameters, Map<String,Object> args)
      Converts the values of all parameters annotated with the specified annotation to the required types.
      Parameters:
      methodParameters - the parameters of the method
      args - the arguments passed to the method
      Returns:
      the converted values of all parameters