类 ReflectiveOperationInvoker
- java.lang.Object
- org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker
- 所有已实现的接口:
OperationInvoker
public class ReflectiveOperationInvoker extends Object implements OperationInvoker
AnOperationInvoker
that invokes an operation using reflection.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 ReflectiveOperationInvoker(Object target, OperationMethod operationMethod, ParameterValueMapper parameterValueMapper)
Creates a new {code ReflectiveOperationInvoker} that will invoke the givenmethod
on the giventarget
.
构造器详细资料
ReflectiveOperationInvoker
public ReflectiveOperationInvoker(Object target, OperationMethod operationMethod, ParameterValueMapper parameterValueMapper)
Creates a new {code ReflectiveOperationInvoker} that will invoke the givenmethod
on the giventarget
. The givenparameterMapper
will be used to map parameters to the required types and the givenparameterNameMapper
will be used map parameters by name.- 参数:
target
- the target of the reflective calloperationMethod
- the method infoparameterValueMapper
- the parameter mapper
方法详细资料
invoke
public Object invoke(InvocationContext context)
从接口复制的说明:OperationInvoker
Invoke the underlying operation using the givencontext
.- 指定者:
invoke
在接口中OperationInvoker
- 参数:
context
- the context to use to invoke the operation- 返回:
- the result of the operation, may be
null