クラス Bindable<T>

java.lang.ObjectSE
org.springframework.boot.context.properties.bind.Bindable<T>
型パラメーター:
T - ソース型

public final class Bindable<T> extends ObjectSE
Binder によってバインドできるソース。
導入:
2.0.0
作成者:
Phillip Webb, Madhura Bhave
関連事項:
  • メソッドの詳細

    • getType

      public ResolvableType getType()
      バインドするアイテムの型を返します。
      戻り値:
      バインドされる型
    • getBoxedType

      public ResolvableType getBoxedType()
      バインドするアイテムのボックス化された型を返します。
      戻り値:
      バインドされるアイテムのボックス化された型
    • getValue

      public SupplierSE<T> getValue()
      オブジェクト値または null を提供するサプライヤーを返します。
      戻り値:
      値または null
    • getAnnotations

      public AnnotationSE[] getAnnotations()
      バインディングに影響を与える可能性のある関連するアノテーションを返します。
      戻り値:
      関連するアノテーション
    • getAnnotation

      public <A extends AnnotationSE> A getAnnotation(ClassSE<A> type)
      バインディングに影響を与える可能性がある単一の関連付けられたアノテーションを返します。
      型パラメーター:
      A - アノテーション型
      パラメーター:
      type - アノテーション型
      戻り値:
      関連するアノテーションまたは null
    • hasBindRestriction

      public boolean hasBindRestriction(Bindable.BindRestriction bindRestriction)
      指定されたバインド制限が追加されている場合、true を返します。
      パラメーター:
      bindRestriction - チェックするバインド制限
      戻り値:
      バインド制限が追加されている場合
      導入:
      2.5.0
    • getBindMethod

      public BindMethod getBindMethod()
      このバインド可能オブジェクトのバインドに使用される method を返します。特定のバインドメソッドが必要ない場合は null を返します。
      戻り値:
      バインドメソッドまたは null
      導入:
      3.0.8
    • equals

      public boolean equals(ObjectSE obj)
      オーバーライド:
      クラス ObjectSEequalsSE 
    • hashCode

      public int hashCode()
      オーバーライド:
      クラス ObjectSEhashCode 
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString 
    • withAnnotations

      public Bindable<T> withAnnotations(AnnotationSE... annotations)
      指定されたアノテーションを使用して、更新された Bindable インスタンスを作成します。
      パラメーター:
      annotations - アノテーション
      戻り値:
      更新された Bindable
    • withExistingValue

      public Bindable<T> withExistingValue(T existingValue)
      既存の値を使用して、更新された Bindable インスタンスを作成します。Java Bean バインディングが使用されることを意味します。
      パラメーター:
      existingValue - 既存の値
      戻り値:
      更新された Bindable
    • withSuppliedValue

      public Bindable<T> withSuppliedValue(SupplierSE<T> suppliedValue)
      値サプライヤーで更新された Bindable インスタンスを作成します。
      パラメーター:
      suppliedValue - 値のサプライヤー
      戻り値:
      更新された Bindable
    • withBindRestrictions

      public Bindable<T> withBindRestrictions(Bindable.BindRestriction... additionalRestrictions)
      追加のバインド制限を使用して、更新された Bindable インスタンスを作成します。
      パラメーター:
      additionalRestrictions - 適用する追加の制限
      戻り値:
      更新された Bindable
      導入:
      2.5.0
    • withBindMethod

      public Bindable<T> withBindMethod(BindMethod bindMethod)
      特定のバインドメソッドを使用して、更新された Bindable インスタンスを作成します。value object binding を使用するには、現在のインスタンスに既存の値または指定された値があってはなりません。
      パラメーター:
      bindMethod - バインド可能なものをバインドするために使用するメソッド
      戻り値:
      更新された Bindable
      導入:
      3.0.8
    • ofInstance

      public static <T> Bindable<T> ofInstance(T instance)
      インスタンスに等しい既存の値を使用して、指定されたインスタンスの型の新しい Bindable を作成します。
      型パラメーター:
      T - ソース型
      パラメーター:
      instance - インスタンス (null であってはなりません)
      戻り値:
      Bindable インスタンス
      関連事項:
    • of

      public static <T> Bindable<T> of(ClassSE<T> type)
      指定された型の新しい Bindable を作成します。
      型パラメーター:
      T - ソース型
      パラメーター:
      type - 型 (null であってはなりません)
      戻り値:
      Bindable インスタンス
      関連事項:
    • listOf

      public static <E> Bindable<ListSE<E>> listOf(ClassSE<E> elementType)
      指定された要素型の新しい Bindable ListSE を作成します。
      型パラメーター:
      E - 要素型
      パラメーター:
      elementType - リスト要素型
      戻り値:
      Bindable インスタンス
    • setOf

      public static <E> Bindable<SetSE<E>> setOf(ClassSE<E> elementType)
      指定された要素型の新しい Bindable SetSE を作成します。
      型パラメーター:
      E - 要素型
      パラメーター:
      elementType - セット要素型
      戻り値:
      Bindable インスタンス
    • mapOf

      public static <K, V> Bindable<MapSE<K,V>> mapOf(ClassSE<K> keyType, ClassSE<V> valueType)
      指定されたキーと値の型の新しい Bindable MapSE を作成します。
      型パラメーター:
      K - キー型
      V - 値の型
      パラメーター:
      keyType - マップキー型
      valueType - マップ値型
      戻り値:
      Bindable インスタンス
    • of

      public static <T> Bindable<T> of(ResolvableType type)
      指定された型の新しい Bindable を作成します。
      型パラメーター:
      T - ソース型
      パラメーター:
      type - 型 (null であってはなりません)
      戻り値:
      Bindable インスタンス
      関連事項: