Class MethodCache
java.lang.Object
com.github.thought2code.mcp.annotated.reflect.MethodCache
This class caches information about a Java method, including its name, declaring class,
parameters, and annotations.
- Author:
- codeboyzhou
-
Constructor Summary
ConstructorsConstructorDescriptionMethodCache(Method method) Creates a new instance ofMethodCachewith the specified method. -
Method Summary
Modifier and TypeMethodDescriptionbooleanClass<?>Returns the class that declares the cached method.Returns the annotationMcpPrompton the cached method.Returns the annotationMcpPromptCompletionon the cached method.Returns the annotationMcpResourceon the cached method.Returns the annotationMcpResourceCompletionon the cached method.Returns the annotationMcpToolon the cached method.Returns the method cached by thisMethodCacheinstance.Returns the name of the cached method.Returns the signature of the cached method.Returns the parameters of the cached method.Class<?>Returns the return type of the cached method.inthashCode()static MethodCacheCreates a new instance ofMethodCachewith the specified method.toString()
-
Constructor Details
-
MethodCache
Creates a new instance ofMethodCachewith the specified method.- Parameters:
method- the method to cache
-
-
Method Details
-
of
Creates a new instance ofMethodCachewith the specified method.- Parameters:
method- the method to cache- Returns:
- a new instance of
MethodCachewith the specified method
-
getMethod
Returns the method cached by thisMethodCacheinstance.- Returns:
- the method cached by this
MethodCacheinstance
-
getMethodName
Returns the name of the cached method.- Returns:
- the name of the cached method
-
getDeclaringClass
Returns the class that declares the cached method.- Returns:
- the class that declares the cached method
-
getParameters
Returns the parameters of the cached method.- Returns:
- the parameters of the cached method
-
getReturnType
Returns the return type of the cached method.- Returns:
- the return type of the cached method
-
getMethodSignature
Returns the signature of the cached method.- Returns:
- the signature of the cached method
-
getMcpResourceAnnotation
Returns the annotationMcpResourceon the cached method.- Returns:
- the annotation
McpResourceon the cached method
-
getMcpPromptAnnotation
Returns the annotationMcpPrompton the cached method.- Returns:
- the annotation
McpPrompton the cached method
-
getMcpToolAnnotation
Returns the annotationMcpToolon the cached method.- Returns:
- the annotation
McpToolon the cached method
-
getMcpPromptCompletionAnnotation
Returns the annotationMcpPromptCompletionon the cached method.- Returns:
- the annotation
McpPromptCompletionon the cached method
-
getMcpResourceCompletionAnnotation
Returns the annotationMcpResourceCompletionon the cached method.- Returns:
- the annotation
McpResourceCompletionon the cached method
-
equals
-
hashCode
public int hashCode() -
toString
-