类 ReflectionHelper
java.lang.Object
com.github.codeboyzhou.mcp.declarative.util.ReflectionHelper
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voiddoWithFields(Class<?> clazz, Consumer<Field> consumer) getMethodsAnnotatedWith(Class<?> clazz, Class<? extends Annotation> annotation) getParametersAnnotatedWith(Method method, Class<? extends Annotation> annotation) static ObjectinvokeMethod(Class<?> clazz, Method method) static ObjectinvokeMethod(Class<?> clazz, Method method, io.modelcontextprotocol.spec.McpSchema.JsonSchema schema, Map<String, Object> parameters) static ObjectinvokeMethod(Class<?> clazz, Method method, List<io.modelcontextprotocol.spec.McpSchema.PromptArgument> arguments, Map<String, Object> parameters)
-
构造器详细资料
-
ReflectionHelper
public ReflectionHelper()
-
-
方法详细资料
-
getMethodsAnnotatedWith
public static List<Method> getMethodsAnnotatedWith(Class<?> clazz, Class<? extends Annotation> annotation) -
getParametersAnnotatedWith
public static List<Parameter> getParametersAnnotatedWith(Method method, Class<? extends Annotation> annotation) -
doWithFields
-
invokeMethod
- 抛出:
Exception
-
invokeMethod
public static Object invokeMethod(Class<?> clazz, Method method, List<io.modelcontextprotocol.spec.McpSchema.PromptArgument> arguments, Map<String, Object> parameters) throws Exception- 抛出:
Exception
-
invokeMethod
public static Object invokeMethod(Class<?> clazz, Method method, io.modelcontextprotocol.spec.McpSchema.JsonSchema schema, Map<String, Object> parameters) throws Exception- 抛出:
Exception
-