public final class AcpHandlerMethod
extends java.lang.Object
| 构造器和说明 |
|---|
AcpHandlerMethod(java.lang.Object bean,
java.lang.reflect.Method method,
java.lang.String acpMethod)
Create a handler method with an eager bean instance.
|
AcpHandlerMethod(java.util.function.Supplier<java.lang.Object> beanSupplier,
java.lang.reflect.Method method,
java.lang.String acpMethod)
Create a handler method with a lazy bean supplier.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
getAcpMethod()
Get the ACP method name (e.g., "initialize", "session/prompt").
|
java.lang.Object |
getBean()
Get the target bean instance.
|
java.lang.reflect.Method |
getMethod()
Get the method to invoke.
|
AcpMethodParameter[] |
getParameters()
Get the pre-computed parameter metadata.
|
AcpMethodParameter |
getReturnType()
Get the return type metadata.
|
java.lang.Object |
invoke(java.lang.Object[] args)
Invoke the method with the given arguments.
|
java.lang.String |
toString() |
public AcpHandlerMethod(java.lang.Object bean,
java.lang.reflect.Method method,
java.lang.String acpMethod)
bean - the target bean instancemethod - the method to invokeacpMethod - the ACP method name (e.g., "initialize", "session/prompt")public AcpHandlerMethod(java.util.function.Supplier<java.lang.Object> beanSupplier,
java.lang.reflect.Method method,
java.lang.String acpMethod)
beanSupplier - supplier for the target beanmethod - the method to invokeacpMethod - the ACP method namepublic java.lang.Object getBean()
public java.lang.reflect.Method getMethod()
public java.lang.String getAcpMethod()
public AcpMethodParameter[] getParameters()
public AcpMethodParameter getReturnType()
public java.lang.Object invoke(java.lang.Object[] args)
throws java.lang.Exception
args - the argumentsjava.lang.Exception - if invocation failspublic java.lang.String toString()
toString 在类中 java.lang.Object