From 821af30277f0954ef1daec2ee1bbd288a5172e87 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Fri, 30 Mar 2018 12:48:15 -0700 Subject: [PATCH] Add missing javadoc for Bindable Closes gh-12643 --- .../boot/context/properties/bind/Bindable.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java index 84b1cdb569..6e3a0abc13 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java @@ -66,6 +66,10 @@ public final class Bindable { return this.type; } + /** + * Return the boxed type of the item to bind. + * @return the boxed type for the item being bound + */ public ResolvableType getBoxedType() { return this.boxedType; } @@ -149,6 +153,11 @@ public final class Bindable { (annotations == null ? NO_ANNOTATIONS : annotations)); } + /** + * Create an updated {@link Bindable} instance with an existing value. + * @param existingValue the existing value + * @return an updated {@link Bindable} + */ public Bindable withExistingValue(T existingValue) { Assert.isTrue( existingValue == null || this.type.isArray() @@ -158,6 +167,11 @@ public final class Bindable { return new Bindable<>(this.type, this.boxedType, value, NO_ANNOTATIONS); } + /** + * Create an updated {@link Bindable} instance with a value supplier. + * @param suppliedValue the supplier for the value + * @return an updated {@link Bindable} + */ public Bindable withSuppliedValue(Supplier suppliedValue) { return new Bindable<>(this.type, this.boxedType, suppliedValue, NO_ANNOTATIONS); }