接口 TodayStrategies.ArgumentResolver
- 封闭类:
- TodayStrategies
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
Strategy for resolving constructor arguments based on their type.
-
方法概要
修饰符和类型方法说明default TodayStrategies.ArgumentResolverand(TodayStrategies.ArgumentResolver argumentResolver) Create a new composedTodayStrategies.ArgumentResolverby combining this resolver with the given resolver.default <T> TodayStrategies.ArgumentResolverCreate a new composedTodayStrategies.ArgumentResolverby combining this resolver with the given type and value.default <T> TodayStrategies.ArgumentResolverandSupplied(Class<T> type, Supplier<T> valueSupplier) Create a new composedTodayStrategies.ArgumentResolverby combining this resolver with the given type and value.Factory method that creates a newTodayStrategies.ArgumentResolverfrom a lambda friendly function.none()Factory method that returns anTodayStrategies.ArgumentResolverthat always returnsnull.static <T> TodayStrategies.ArgumentResolverFactory method that can be used to create anTodayStrategies.ArgumentResolverthat resolves only the given type.static <T> TodayStrategies.ArgumentResolverofSupplied(Class<T> type, Supplier<T> valueSupplier) Factory method that can be used to create anTodayStrategies.ArgumentResolverthat resolves only the given type.<T> TResolve the given argument if possible.
-
方法详细资料
-
resolve
Resolve the given argument if possible.- 类型参数:
T- the argument type- 参数:
type- the argument type- 返回:
- the resolved argument value or
null
-
and
Create a new composedTodayStrategies.ArgumentResolverby combining this resolver with the given type and value.- 类型参数:
T- the argument type- 参数:
type- the argument typevalue- the argument value- 返回:
- a new composite
TodayStrategies.ArgumentResolverinstance
-
andSupplied
Create a new composedTodayStrategies.ArgumentResolverby combining this resolver with the given type and value.- 类型参数:
T- the argument type- 参数:
type- the argument typevalueSupplier- the argument value supplier- 返回:
- a new composite
TodayStrategies.ArgumentResolverinstance
-
and
Create a new composedTodayStrategies.ArgumentResolverby combining this resolver with the given resolver.- 参数:
argumentResolver- the argument resolver to add- 返回:
- a new composite
TodayStrategies.ArgumentResolverinstance
-
none
Factory method that returns anTodayStrategies.ArgumentResolverthat always returnsnull.- 返回:
- a new
TodayStrategies.ArgumentResolverinstance
-
of
Factory method that can be used to create anTodayStrategies.ArgumentResolverthat resolves only the given type.- 类型参数:
T- the argument type- 参数:
type- the argument typevalue- the argument value- 返回:
- a new
TodayStrategies.ArgumentResolverinstance
-
ofSupplied
Factory method that can be used to create anTodayStrategies.ArgumentResolverthat resolves only the given type.- 类型参数:
T- the argument type- 参数:
type- the argument typevalueSupplier- the argument value supplier- 返回:
- a new
TodayStrategies.ArgumentResolverinstance
-
from
Factory method that creates a newTodayStrategies.ArgumentResolverfrom a lambda friendly function. The given function is provided with the argument type and must provide an instance of that type ornull.- 参数:
function- the resolver function- 返回:
- a new
TodayStrategies.ArgumentResolverinstance backed by the function
-