接口 BindConstructorProvider

所有已知实现类:
ConfigurationPropertiesBindConstructorProvider
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface BindConstructorProvider
Strategy interface used to determine a specific constructor to use when binding.
从以下版本开始:
4.0
作者:
Madhura Bhave, Harry Yang
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    Default BindConstructorProvider implementation that only returns a value when there's a single constructor and when the bindable has no existing value.
  • 方法概要

    修饰符和类型
    方法
    说明
    getBindConstructor(Bindable<?> bindable, boolean isNestedConstructorBinding)
    Return the bind constructor to use for the given bindable, or null if constructor binding is not supported.
  • 字段详细资料

  • 方法详细资料

    • getBindConstructor

      @Nullable Constructor<?> getBindConstructor(Bindable<?> bindable, boolean isNestedConstructorBinding)
      Return the bind constructor to use for the given bindable, or null if constructor binding is not supported.
      参数:
      bindable - the bindable to check
      isNestedConstructorBinding - if this binding is nested within a constructor binding
      返回:
      the bind constructor or null