Class ReflectiveOperationInvoker
java.lang.Object
org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker
- All Implemented Interfaces:
OperationInvoker
An
OperationInvoker
that invokes an operation using reflection.- Since:
- 2.0.0
- Author:
- Andy Wilkinson, Stephane Nicoll, Phillip Webb
-
Constructor Summary
ConstructorDescriptionReflectiveOperationInvoker
(Object target, OperationMethod operationMethod, ParameterValueMapper parameterValueMapper) Creates a newReflectiveOperationInvoker
that will invoke the givenmethod
on the giventarget
. -
Method Summary
Modifier and TypeMethodDescriptioninvoke
(InvocationContext context) Invoke the underlying operation using the givencontext
.toString()
-
Constructor Details
-
ReflectiveOperationInvoker
public ReflectiveOperationInvoker(Object target, OperationMethod operationMethod, ParameterValueMapper parameterValueMapper) Creates a newReflectiveOperationInvoker
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.- Parameters:
target
- the target of the reflective calloperationMethod
- the method infoparameterValueMapper
- the parameter mapper
-
-
Method Details
-
invoke
Description copied from interface:OperationInvoker
Invoke the underlying operation using the givencontext
.- Specified by:
invoke
in interfaceOperationInvoker
- Parameters:
context
- the context to use to invoke the operation- Returns:
- the result of the operation, may be
null
-
toString
-