Class Bindable<T>

    • Method Detail

      • getType

        public org.springframework.core.ResolvableType getType()
        Return the type of the item to bind.
        Returns:
        the type being bound
      • getBoxedType

        public org.springframework.core.ResolvableType getBoxedType()
        Return the boxed type of the item to bind.
        Returns:
        the boxed type for the item being bound
      • getValue

        public Supplier<TgetValue()
        Return a supplier that provides the object value or null.
        Returns:
        the value or null
      • getAnnotations

        public Annotation[] getAnnotations()
        Return any associated annotations that could affect binding.
        Returns:
        the associated annotations
      • getAnnotation

        public <A extends Annotation> A getAnnotation​(Class<A> type)
        Return a single associated annotations that could affect binding.
        Type Parameters:
        A - the annotation type
        Parameters:
        type - annotation type
        Returns:
        the associated annotation or null
      • listOf

        public static <E> Bindable<List<E>> listOf​(Class<E> elementType)
        Create a new BindableList of the specified element type.
        Type Parameters:
        E - the element type
        Parameters:
        elementType - the list element type
        Returns:
        a Bindable instance
      • setOf

        public static <E> Bindable<Set<E>> setOf​(Class<E> elementType)
        Create a new BindableSet of the specified element type.
        Type Parameters:
        E - the element type
        Parameters:
        elementType - the set element type
        Returns:
        a Bindable instance
      • mapOf

        public static <K,​V> Bindable<Map<K,​V>> mapOf​(Class<K> keyType,
                                                                 Class<V> valueType)
        Create a new BindableMap of the specified key and value type.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        keyType - the map key type
        valueType - the map value type
        Returns:
        a Bindable instance
      • of

        public static <T> Bindable<T> of​(org.springframework.core.ResolvableType type)
        Create a new Bindable of the specified type.
        Type Parameters:
        T - the source type
        Parameters:
        type - the type (must not be null)
        Returns:
        a Bindable instance
        See Also:
        of(Class)