类 InvocationContext
java.lang.Object
org.springframework.boot.actuate.endpoint.InvocationContext
The context for the
invocation of an operation
.- 从以下版本开始:
- 2.0.0
- 作者:
- Andy Wilkinson, Phillip Webb
-
构造器概要
构造器构造器说明InvocationContext
(SecurityContext securityContext, Map<String, Object> arguments, OperationArgumentResolver... argumentResolvers) Creates a new context for an operation being invoked by the givensecurityContext
with the given availablearguments
. -
方法概要
修饰符和类型方法说明boolean
canResolve
(Class<?> type) Returns whether the context is capable of resolving an argument of the giventype
.Return the invocation arguments.<T> T
resolveArgument
(Class<T> argumentType) Resolves an argument with the givenargumentType
.
-
构造器详细资料
-
InvocationContext
public InvocationContext(SecurityContext securityContext, Map<String, Object> arguments, OperationArgumentResolver... argumentResolvers) Creates a new context for an operation being invoked by the givensecurityContext
with the given availablearguments
.- 参数:
securityContext
- the current security context. Nevernull
arguments
- the arguments available to the operation. Nevernull
argumentResolvers
- resolvers for additional arguments should be available to the operation.
-
-
方法详细资料
-
getArguments
Return the invocation arguments.- 返回:
- the arguments
-
resolveArgument
Resolves an argument with the givenargumentType
.- 类型参数:
T
- type of the argument- 参数:
argumentType
- type of the argument- 返回:
- resolved argument of the required type or
null
- 从以下版本开始:
- 2.5.0
- 另请参阅:
-
canResolve
Returns whether the context is capable of resolving an argument of the giventype
. Note that, even whentrue
is returned,argument resolution
will returnnull
if no argument of the required type is available.- 参数:
type
- argument type- 返回:
true
if resolution of arguments of the given type is possible, otherwisefalse
.- 从以下版本开始:
- 2.5.0
- 另请参阅:
-