Class AbstractFieldBuilder.DefaultInfo
java.lang.Object
org.dellroad.stuff.vaadin24.field.AbstractFieldBuilder.DefaultInfo
- Enclosing class:
- AbstractFieldBuilder<S extends AbstractFieldBuilder<S,
T>, T>
Holds static information gathered from scanning
@FieldBuilder.FieldDefault
annotations.
Instances are immutable.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Apply the alternate default value to the configured property in the given field, if possible.Get the annotated method that provides the alternate default value.Get the name of the field property provided.toString()
-
Constructor Details
-
DefaultInfo
Constructor.- Parameters:
method
- the annotated method that provides the alternate default valuepropertyName
- the name of the field property provided bymethod
- Throws:
IllegalArgumentException
- if either parameter is null
-
-
Method Details
-
getMethod
Get the annotated method that provides the alternate default value.- Returns:
- default providing method
-
getPropertyName
Get the name of the field property provided.- Returns:
- provided property name
-
applyTo
Apply the alternate default value to the configured property in the given field, if possible.- Parameters:
field
- field to update- Returns:
- true if successful, false if no such setter method exists, value is incompatible, etc.
- Throws:
IllegalArgumentException
- iffield
is null
-
toString
-