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