接口 BindConstructorProvider
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
Strategy interface used to determine a specific constructor to use when binding.
- 从以下版本开始:
- 4.0
- 作者:
- Madhura Bhave, Harry Yang
-
字段概要
字段修饰符和类型字段说明static final BindConstructorProviderDefaultBindConstructorProviderimplementation that only returns a value when there's a single constructor and when the bindable has no existing value. -
方法概要
修饰符和类型方法说明Constructor<?>getBindConstructor(Bindable<?> bindable, boolean isNestedConstructorBinding) Return the bind constructor to use for the given bindable, ornullif constructor binding is not supported.
-
字段详细资料
-
DEFAULT
DefaultBindConstructorProviderimplementation that only returns a value when there's a single constructor and when the bindable has no existing value.
-
-
方法详细资料
-
getBindConstructor
@Nullable Constructor<?> getBindConstructor(Bindable<?> bindable, boolean isNestedConstructorBinding) Return the bind constructor to use for the given bindable, ornullif constructor binding is not supported.- 参数:
bindable- the bindable to checkisNestedConstructorBinding- if this binding is nested within a constructor binding- 返回:
- the bind constructor or
null
-