T - the type of the beanBasicBeanBuilder, BasicImmutableBeanBuilder, BufferingBeanBuilder, DirectBeanBuilder, DirectFieldsBeanBuilder, DirectPrivateBeanBuilderpublic interface BeanBuilder<T extends Bean>
This interface allows a bean to be created even if it is immutable.
| Modifier and Type | Method | Description |
|---|---|---|
T |
build() |
Builds the bean from the state of the builder.
|
java.lang.Object |
get(java.lang.String propertyName) |
Gets the value of a single property previously added to the builder.
|
<P> P |
get(MetaProperty<P> metaProperty) |
Gets the value of a single property previously added to the builder.
|
BeanBuilder<T> |
set(java.lang.String propertyName,
java.lang.Object value) |
Sets the value of a single property into the builder.
|
BeanBuilder<T> |
set(MetaProperty<?> metaProperty,
java.lang.Object value) |
Sets the value of a single property into the builder.
|
java.lang.Object get(java.lang.String propertyName)
propertyName - the property name to query, not nulljava.lang.RuntimeException - thrown if the property name is invalid<P> P get(MetaProperty<P> metaProperty)
P - the type of the property.metaProperty - the meta-property to query, not nulljava.lang.RuntimeException - thrown if the property is invalidBeanBuilder<T> set(java.lang.String propertyName, java.lang.Object value)
This will normally behave as per a Map, however it may not
and as a general rule callers should only set each property once.
propertyName - the property name to set, not nullvalue - the property value, may be nullthis, for chaining, not nulljava.lang.RuntimeException - optionally thrown if the property name is invalidBeanBuilder<T> set(MetaProperty<?> metaProperty, java.lang.Object value)
This will normally behave as per a Map, however it may not
and as a general rule callers should only set each property once.
metaProperty - the meta-property to set, not nullvalue - the property value, may be nullthis, for chaining, not nulljava.lang.RuntimeException - optionally thrown if the property is invalidT build()
Once this method has been called, the builder is in an invalid state. The effect of further method calls is undetermined.
Copyright © 2007–2018 Joda.org. All rights reserved.